From nobody Mon Jan 5 02:38:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkz582DJpz6NFMG for ; Mon, 05 Jan 2026 02:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkz581GTJz3D1F for ; Mon, 05 Jan 2026 02:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767580732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qclN7x0jmyQNVqxnHBIqwHoPOoVJ1bAGffuaK5HG3kk=; b=B99cZhdH6XSp7WRBGPBTCFsf/ReH1APXfRoywEtBzKRT9cix475Ej8eTxiuBrpWhMVRlOX 8QsKuNkHEDWr5VpsHjORmIEvEBZNo9m9B99C/AeFtwHQjfF2120zVzVZ7qELvb/OZy6OTS Huf1eZtHwEtfeAPNgDL3sf2H13JTOaAysUU8zNCyvGt4jdZ7sI5uwNFXhQt3kf4iLctXtA AzcqwlkzIFmF3hft+aQzBhLqRQo4knsHVjG0KPLn+0dt6B30gpaHqzmBY3amtcyWnGbEPK RDeO+t+6ZaMhfbGyrEE/6v0lPQ1QnJLRzWE7EAQfcmOrbApVIfah57PYOpz8KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767580732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qclN7x0jmyQNVqxnHBIqwHoPOoVJ1bAGffuaK5HG3kk=; b=A3o4m32xbM/3GREA4Ppn9HdfE5MLyrZHLqN4sUejfB3CqbNyEbrHhIir7kv0RpHXqRdv2B m81npDhoxf3g0EX/SSQ7Ch6c6MwXD4D2F2U7RPoyFEi52W6HlcYePCRv1OptHBIASZvmjD FPPqRpsJuXM/568aW+OCPLDYTLbJvy2G0rn9kEebCIXtN1iblp8KFl6UESnqGG3jnLhzT0 DyGekyJldIi9M7ddCU123gCrJT0Ylm4rUA9cfmy/wP2bL3kOW7UwuKIWyM/OxUggtH4a0k bNG1w5XHO2Q3LSIv0U6qkhNCdwmDyqh0DfaeVN3fl4AJwBrHVTZ6QvHb8CK98g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767580732; a=rsa-sha256; cv=none; b=RrP9EHmKGBb7gMRHJSGBT+5XGLCg1s3HEXE4PIibA1GcHK4RVXDjBcpdkwUY4dsMUfDjli 49xWa8hqpbnxVeAkIquq5DBQltVP+IeWaobc6bhZ8o6GkmhAcjqIwPZh4S1qtm11RSXJQF khLtzy+w7prLSwgHkP7UkRvJLP6dCD4JE7zt7QqeBu9IFHAgUmWLZLng6/h/yWBomAGuRK A/j3gXKAMsy/QHf7wnYvwADZns1mW/118RvWJXL+NQdbCwpL67MkyAc1SgChcVsVn9vuFG 4r9iiM1zTKfQ35b0WKHJSWpFGY7aTwqIoT5ZFx49mv7uYKETNW89HIk27dGdxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkz576ykHz11x7 for ; Mon, 05 Jan 2026 02:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eaec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 02:38:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jaeyoon Choi Subject: git: ef2d7cc11d04 - main - ufshci: Fix task management queue num_trackers on failure path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jaeyoon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef2d7cc11d04728f2b97d2b0188d77be77d5c252 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 02:38:51 +0000 Message-Id: <695b243b.3eaec.427c136c@gitrepo.freebsd.org> The branch main has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=ef2d7cc11d04728f2b97d2b0188d77be77d5c252 commit ef2d7cc11d04728f2b97d2b0188d77be77d5c252 Author: Jaeyoon Choi AuthorDate: 2026-01-05 02:35:52 +0000 Commit: Jaeyoon Choi CommitDate: 2026-01-05 02:35:52 +0000 ufshci: Fix task management queue num_trackers on failure path Fix a kernel panic caused by the task management queue using the transfer request queue’s num_entries value. Sponsored by: Samsung Electronic Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54243 --- sys/dev/ufshci/ufshci_ctrlr.c | 8 ++------ sys/dev/ufshci/ufshci_private.h | 2 +- sys/dev/ufshci/ufshci_req_queue.c | 14 +++++--------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/dev/ufshci/ufshci_ctrlr.c b/sys/dev/ufshci/ufshci_ctrlr.c index ce0da4cab907..0d7994a033c5 100644 --- a/sys/dev/ufshci/ufshci_ctrlr.c +++ b/sys/dev/ufshci/ufshci_ctrlr.c @@ -17,12 +17,8 @@ ufshci_ctrlr_fail(struct ufshci_controller *ctrlr) { ctrlr->is_failed = true; - ufshci_req_queue_fail(ctrlr, - ctrlr->task_mgmt_req_queue.qops.get_hw_queue( - &ctrlr->task_mgmt_req_queue)); - ufshci_req_queue_fail(ctrlr, - ctrlr->transfer_req_queue.qops.get_hw_queue( - &ctrlr->transfer_req_queue)); + ufshci_req_queue_fail(ctrlr, &ctrlr->task_mgmt_req_queue); + ufshci_req_queue_fail(ctrlr, &ctrlr->transfer_req_queue); } static void diff --git a/sys/dev/ufshci/ufshci_private.h b/sys/dev/ufshci/ufshci_private.h index bcb2bcef0230..0665f29d3896 100644 --- a/sys/dev/ufshci/ufshci_private.h +++ b/sys/dev/ufshci/ufshci_private.h @@ -499,7 +499,7 @@ int ufshci_utmr_req_queue_enable(struct ufshci_controller *ctrlr); void ufshci_utr_req_queue_disable(struct ufshci_controller *ctrlr); int ufshci_utr_req_queue_enable(struct ufshci_controller *ctrlr); void ufshci_req_queue_fail(struct ufshci_controller *ctrlr, - struct ufshci_hw_queue *hwq); + struct ufshci_req_queue *req_queue); int ufshci_req_queue_submit_request(struct ufshci_req_queue *req_queue, struct ufshci_request *req, bool is_admin); void ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr); diff --git a/sys/dev/ufshci/ufshci_req_queue.c b/sys/dev/ufshci/ufshci_req_queue.c index df7e4b159278..33008c6b1230 100644 --- a/sys/dev/ufshci/ufshci_req_queue.c +++ b/sys/dev/ufshci/ufshci_req_queue.c @@ -199,11 +199,10 @@ ufshci_req_queue_manual_complete_request(struct ufshci_req_queue *req_queue, void ufshci_req_queue_fail(struct ufshci_controller *ctrlr, - struct ufshci_hw_queue *hwq) + struct ufshci_req_queue *req_queue) { - struct ufshci_req_queue *req_queue; + struct ufshci_hw_queue *hwq = req_queue->qops.get_hw_queue(req_queue); struct ufshci_tracker *tr; - struct ufshci_request *req; int i; if (!mtx_initialized(&hwq->qlock)) @@ -211,16 +210,13 @@ ufshci_req_queue_fail(struct ufshci_controller *ctrlr, mtx_lock(&hwq->qlock); - req_queue = &ctrlr->transfer_req_queue; - - for (i = 0; i < req_queue->num_entries; i++) { + for (i = 0; i < req_queue->num_trackers; i++) { tr = hwq->act_tr[i]; - req = tr->req; if (tr->slot_state == UFSHCI_SLOT_STATE_RESERVED) { mtx_unlock(&hwq->qlock); - ufshci_req_queue_manual_complete_request(req_queue, req, - UFSHCI_DESC_ABORTED, + ufshci_req_queue_manual_complete_request(req_queue, + tr->req, UFSHCI_DESC_ABORTED, UFSHCI_RESPONSE_CODE_GENERAL_FAILURE); mtx_lock(&hwq->qlock); } else if (tr->slot_state == UFSHCI_SLOT_STATE_SCHEDULED) { From nobody Mon Jan 5 02:38:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkz593btKz6NFQM for ; Mon, 05 Jan 2026 02:38: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkz590Ltqz3D6B for ; Mon, 05 Jan 2026 02:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767580733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+LngJ+s4wcDgYyEbNv08UZa4vql1JfOrAoss2/EcPHw=; b=HMnlXl99OqPND+MKptq1PYaDBVlXbsF3Yx6kslhfWDXnu0vARnl0Q+CeEjpJ3yDbBlUias 28RanKGO5H2jwqFC8zKqaniQOZtfrg0Abywz7lz9bo1TnZ5NDxCqRvL3XBGG8ZuPE8f631 NNUAcau/NDScwaW1VsZoNJqyPE20n5aGi1m3aJ+sB5NgzGL7O2m3qzQgTp3oEP34/Z4fSI CUhPgK1GBQXsMWfG2UBDH39ayX29VSSnuLMgGXbkg6ZBZFqzljoQ7bte4ADM1JZtBzHdJB iBVBEW1RnIllBm0+XqtpmckzRU9Yhfbx4UOdmpX1tt1WDleDnYXSiYZ1r2r58g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767580733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+LngJ+s4wcDgYyEbNv08UZa4vql1JfOrAoss2/EcPHw=; b=t1FyrJKDwEpxeBSeYVTkhcfHHa6esXvFOAPFUfkFu8KOOUU9lCUgq3DAhol9ZRrGLHBo6n jWuyVJVX/SoJQnJ7qb9OWwn3NbxlqGopUDiJVq0RC8Ax7Y6NyMn0vU6RLwgx+aUN4O0TuL +4hkt1aODXhqqxTp8y98DDhYUgEQN38I5y2Ci7UuvJUie5g5rxmQLo3kf8sPso1nlF5xcS FdGh0fK81Z0dILSn/znFrz7Pp6+YF/uZBESncgamiyTcA2u0c8JAs3wA/4h2ONGUh5jGe0 Niu1zTG5m6oU5z48hyNMt/VO9+wY0KXB5UoKtCBUWLL+N/1tafKn9xH6vfhgvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767580733; a=rsa-sha256; cv=none; b=JZ5Zzgk0CKrt9gmLsDgfbupaZysj9nzd4qoYilPs/9ik6r1C595M1Ty7EYjs31R1s+z+9N wuPo0Tte89nxsSOv97P6KxVm9Hc4TxMi7mGyQA7mDe/w9MZMCGAtG02oqLh43aaCY3Aeof Fbel3FaGJZ4cKLGofMeKq5KjZKaraFGuWzgJvgagfQXZIjHL5AbuCxAOIQIdynu06rD6by tMSGJNpXpLBLwVEllqIUUl/eSkHk9P/WVx6xUtexxH+v/c+O5HK2uEdKLAUcpdKAkuleLo rJblJahTC8vPY24dbrs7swihmyAj314I/xXs4kxruKMIiNA/Ssnq/+Z25HzGZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkz586q0Wz11wF for ; Mon, 05 Jan 2026 02:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8e3c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 02:38:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jaeyoon Choi Subject: git: ece6e062ae4b - main - ufshci: Enable admin command retry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jaeyoon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ece6e062ae4b419736c8bb65874ece6be28c2100 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 02:38:52 +0000 Message-Id: <695b243c.8e3c.40ba7032@gitrepo.freebsd.org> The branch main has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=ece6e062ae4b419736c8bb65874ece6be28c2100 commit ece6e062ae4b419736c8bb65874ece6be28c2100 Author: Jaeyoon Choi AuthorDate: 2026-01-05 02:36:10 +0000 Commit: Jaeyoon Choi CommitDate: 2026-01-05 02:36:10 +0000 ufshci: Enable admin command retry Also, This patch fixes an issue where the admin command flag was not passed through. Sponsored by: Samsung Electronic Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54244 --- sys/dev/ufshci/ufshci_ctrlr.c | 17 ++++------------- sys/dev/ufshci/ufshci_ctrlr_cmd.c | 6 ++++-- sys/dev/ufshci/ufshci_dev.c | 3 ++- sys/dev/ufshci/ufshci_private.h | 6 ++---- sys/dev/ufshci/ufshci_req_queue.c | 7 +++---- sys/dev/ufshci/ufshci_sim.c | 3 ++- 6 files changed, 17 insertions(+), 25 deletions(-) diff --git a/sys/dev/ufshci/ufshci_ctrlr.c b/sys/dev/ufshci/ufshci_ctrlr.c index 0d7994a033c5..f011d03189e0 100644 --- a/sys/dev/ufshci/ufshci_ctrlr.c +++ b/sys/dev/ufshci/ufshci_ctrlr.c @@ -426,24 +426,15 @@ ufshci_ctrlr_submit_task_mgmt_request(struct ufshci_controller *ctrlr, struct ufshci_request *req) { return ( - ufshci_req_queue_submit_request(&ctrlr->task_mgmt_req_queue, req, - /*is_admin*/ false)); + ufshci_req_queue_submit_request(&ctrlr->task_mgmt_req_queue, req)); } int -ufshci_ctrlr_submit_admin_request(struct ufshci_controller *ctrlr, +ufshci_ctrlr_submit_transfer_request(struct ufshci_controller *ctrlr, struct ufshci_request *req) { - return (ufshci_req_queue_submit_request(&ctrlr->transfer_req_queue, req, - /*is_admin*/ true)); -} - -int -ufshci_ctrlr_submit_io_request(struct ufshci_controller *ctrlr, - struct ufshci_request *req) -{ - return (ufshci_req_queue_submit_request(&ctrlr->transfer_req_queue, req, - /*is_admin*/ false)); + return ( + ufshci_req_queue_submit_request(&ctrlr->transfer_req_queue, req)); } int diff --git a/sys/dev/ufshci/ufshci_ctrlr_cmd.c b/sys/dev/ufshci/ufshci_ctrlr_cmd.c index 253f31a93c2e..cac01894c062 100644 --- a/sys/dev/ufshci/ufshci_ctrlr_cmd.c +++ b/sys/dev/ufshci/ufshci_ctrlr_cmd.c @@ -44,12 +44,13 @@ ufshci_ctrlr_cmd_send_nop(struct ufshci_controller *ctrlr, ufshci_cb_fn_t cb_fn, req->request_size = sizeof(struct ufshci_nop_out_upiu); req->response_size = sizeof(struct ufshci_nop_in_upiu); + req->is_admin = true; upiu = (struct ufshci_nop_out_upiu *)&req->request_upiu; memset(upiu, 0, req->request_size); upiu->header.trans_type = UFSHCI_UPIU_TRANSACTION_CODE_NOP_OUT; - ufshci_ctrlr_submit_admin_request(ctrlr, req); + ufshci_ctrlr_submit_transfer_request(ctrlr, req); } void @@ -63,6 +64,7 @@ ufshci_ctrlr_cmd_send_query_request(struct ufshci_controller *ctrlr, req->request_size = sizeof(struct ufshci_query_request_upiu); req->response_size = sizeof(struct ufshci_query_response_upiu); + req->is_admin = true; upiu = (struct ufshci_query_request_upiu *)&req->request_upiu; memset(upiu, 0, req->request_size); @@ -75,5 +77,5 @@ ufshci_ctrlr_cmd_send_query_request(struct ufshci_controller *ctrlr, upiu->value_64 = param.value; upiu->length = param.desc_size; - ufshci_ctrlr_submit_admin_request(ctrlr, req); + ufshci_ctrlr_submit_transfer_request(ctrlr, req); } diff --git a/sys/dev/ufshci/ufshci_dev.c b/sys/dev/ufshci/ufshci_dev.c index 38c6de9731a4..406130c537a7 100644 --- a/sys/dev/ufshci/ufshci_dev.c +++ b/sys/dev/ufshci/ufshci_dev.c @@ -33,7 +33,8 @@ ufshci_dev_read_descriptor(struct ufshci_controller *ctrlr, &status, param); ufshci_completion_poll(&status); if (status.error) { - ufshci_printf(ctrlr, "ufshci_dev_read_descriptor failed!\n"); + ufshci_printf(ctrlr, + "Failed to send Read Descriptor query request!\n"); return (ENXIO); } diff --git a/sys/dev/ufshci/ufshci_private.h b/sys/dev/ufshci/ufshci_private.h index 0665f29d3896..b57142bf58fc 100644 --- a/sys/dev/ufshci/ufshci_private.h +++ b/sys/dev/ufshci/ufshci_private.h @@ -451,9 +451,7 @@ void ufshci_ctrlr_poll(struct ufshci_controller *ctrlr); int ufshci_ctrlr_submit_task_mgmt_request(struct ufshci_controller *ctrlr, struct ufshci_request *req); -int ufshci_ctrlr_submit_admin_request(struct ufshci_controller *ctrlr, - struct ufshci_request *req); -int ufshci_ctrlr_submit_io_request(struct ufshci_controller *ctrlr, +int ufshci_ctrlr_submit_transfer_request(struct ufshci_controller *ctrlr, struct ufshci_request *req); int ufshci_ctrlr_send_nop(struct ufshci_controller *ctrlr); @@ -501,7 +499,7 @@ int ufshci_utr_req_queue_enable(struct ufshci_controller *ctrlr); void ufshci_req_queue_fail(struct ufshci_controller *ctrlr, struct ufshci_req_queue *req_queue); int ufshci_req_queue_submit_request(struct ufshci_req_queue *req_queue, - struct ufshci_request *req, bool is_admin); + struct ufshci_request *req); void ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr); /* Request Single Doorbell Queue */ diff --git a/sys/dev/ufshci/ufshci_req_queue.c b/sys/dev/ufshci/ufshci_req_queue.c index 33008c6b1230..4c82b79d0e26 100644 --- a/sys/dev/ufshci/ufshci_req_queue.c +++ b/sys/dev/ufshci/ufshci_req_queue.c @@ -268,9 +268,8 @@ ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr) error = ufshci_req_queue_response_is_error(req_queue, ocs, &cpl.response_upiu); - /* TODO: Implement retry */ - // retriable = ufshci_completion_is_retry(cpl); - retriable = false; + /* Retry for admin commands */ + retriable = req->is_admin; retry = error && retriable && req->retries < req_queue->ctrlr->retry_count; if (retry) @@ -778,7 +777,7 @@ _ufshci_req_queue_submit_request(struct ufshci_req_queue *req_queue, int ufshci_req_queue_submit_request(struct ufshci_req_queue *req_queue, - struct ufshci_request *req, bool is_admin) + struct ufshci_request *req) { struct ufshci_hw_queue *hwq; uint32_t error; diff --git a/sys/dev/ufshci/ufshci_sim.c b/sys/dev/ufshci/ufshci_sim.c index 1589e7475ad4..bee1fff858ff 100644 --- a/sys/dev/ufshci/ufshci_sim.c +++ b/sys/dev/ufshci/ufshci_sim.c @@ -165,6 +165,7 @@ ufshchi_sim_scsiio(struct cam_sim *sim, union ccb *ccb) data_direction = UFSHCI_DATA_DIRECTION_NO_DATA_TRANSFER; } req->data_direction = data_direction; + req->is_admin = false; upiu = (struct ufshci_cmd_command_upiu *)&req->request_upiu; memset(upiu, 0, req->request_size); @@ -191,7 +192,7 @@ ufshchi_sim_scsiio(struct cam_sim *sim, union ccb *ccb) } memcpy(upiu->cdb, cdb, csio->cdb_len); - error = ufshci_ctrlr_submit_io_request(ctrlr, req); + error = ufshci_ctrlr_submit_transfer_request(ctrlr, req); if (error == EBUSY) { ccb->ccb_h.status = CAM_SCSI_BUSY; xpt_done(ccb); From nobody Mon Jan 5 11:48:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlCH0308Rz6MN7R for ; Mon, 05 Jan 2026 11:48: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlCH00TXFz3Gyk for ; Mon, 05 Jan 2026 11:48:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767613692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynNCUal9zNC7nAriXGln+UHvyJJReMVDo8aqChAVmGk=; b=TucsjhxO6vK6n2TsuYH87/XSC8yh9W01Eg7na/TFj1/Ce9D1D7lbygIme9e5zGi77waqiq izr35SHiM+xc+RcEEGMPCyWk1KDoy4N4jIxsiYkNoc3KwGCNxggAr35SdO7Efl39u+bS9M OZhuiKdDhfS516H+ccizyD5dfHlUC5mOF/2fHo3YtXYhVfm8OG+M9QHY+C2wrdCx6m8TiA pFDZdOAtk5iJRlkSm2gkaXtxq8VnT5ISevp43FMsiNec+tLnzchMgW8QgKx3HMj8GMnaug 6ornskTDHfhRgVaX5N6Jwdkbzg1n6oOH9wt+042Bxb/3BIjAGnYsrXYwJGR26w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767613692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynNCUal9zNC7nAriXGln+UHvyJJReMVDo8aqChAVmGk=; b=i9dOGWsHAurw8dyXN/iLdCo7ccJWvApcsxJ36GgICvINgVU0T/AltNAbgdkOEdUZMqz2R+ lR/5Cj9PLZVQ6GwnPbjBj9UNflbslHJa/8Zi8PuLkG2jg8Ze8SzvVShrr2rbhHnmm5Nts4 xquvcWQTcbc5naboEJuM2Ccxfd4Wy/KwsxV/hbT8YnoiihO1IS/xNLC4EzUPNs2bQ7hJGP ycNaf1lNdKo0PxRcTIeoRQVlEXOXjblrSbfyHeDOhe1pY/YQ55T7upOZrKJoULqmTrDP0J h54iBXMF+b8gzrKU8yxBBR6AyuUgqU30b9BWZ9tzHT0YPjH9b86Q5l+YLoy6bA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767613692; a=rsa-sha256; cv=none; b=xjy85cgcTo/aWmeCYSUSemATd1s1uKDUtijaXEzHKBXJJ4CN+1O6LFJHXRbaF53ph+LXao EaWv8sNjk82XbFC/vnxJE9AIYcYbLFgH0GyHjpRilzxNv/m3w3mwllas/+mAmEUfHcVrFi xWKqCxGJe3nGFLtCs4hJxysXTfTxCGOKsmETyfd9WWPJt07RHh3xLOFTEGSxKweDgSrn2A 7XZkeCSSOHU/rMvnGqfubDZ7JWe4dmP+IEKJFZ0wRElp1bzQGrYGMvt6KY4z8mSjODdBy7 +qEbxnx4cEje2cqbS8FOul5RrAzSBBuyQ5Jc1Uawb2FRnE503SP4Ous63F7jdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlCGz6S9qz4DF for ; Mon, 05 Jan 2026 11:48:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35e3f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 11:48:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: George V. Neville-Neil Subject: git: eb1c0d74cbb9 - main - Convert fully to Python 3. Remove licence text, only keep List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb1c0d74cbb99f329767b3d565ae57a3ec032bee Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 11:48:11 +0000 Message-Id: <695ba4fb.35e3f.3a916a95@gitrepo.freebsd.org> The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=eb1c0d74cbb99f329767b3d565ae57a3ec032bee commit eb1c0d74cbb99f329767b3d565ae57a3ec032bee Author: George V. Neville-Neil AuthorDate: 2026-01-05 11:40:12 +0000 Commit: George V. Neville-Neil CommitDate: 2026-01-05 11:40:12 +0000 Convert fully to Python 3. Remove licence text, only keep SPDX. Update to use argparse rather than OptionParser (now deprecated). --- tools/test/hwpmc/pmctest.py | 73 ++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 54 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 4bd4910b00a9..bda2f3500d7d 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -2,37 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause # # Copyright (c) 2012, Neville-Neil Consulting +# Copyright (c) 2026, George V. Neville-Neil # All rights reserved. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 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. -# -# Neither the name of Neville-Neil Consulting nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: George V. Neville-Neil -# # Description: A program to run a simple program against every available # pmc counter present in a system. @@ -44,17 +16,19 @@ # This should result in ls being run with every available counter # and the system should neither lock up nor panic. # -# The default is to wait after each counter is tested. Since the +# The default is not to wait after each counter is tested. Since the # prompt would go to stdout you won't see it, just press return # to continue or Ctrl-D to stop. -import sys import subprocess from subprocess import PIPE +import argparse -# Use input() for Python version 3 -if sys.version_info[0] == 3: - raw_input = input +def gather_counters(): + """Run program and return output as array of lines.""" + result = subprocess.run("pmccontrol -L", shell=True, capture_output=True, text=True) + tabbed = result.stdout.strip().split('\n') + return [line.replace('\t', '') for line in tabbed] # A list of strings that are not really counters, just # name tags that are output by pmccontrol -L @@ -62,37 +36,28 @@ notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ] def main(): - from optparse import OptionParser - - parser = OptionParser() - parser.add_option("-p", "--program", dest="program", - help="program to execute") - parser.add_option("-w", "--wait", action="store_true", dest="wait", - default=True, help="wait after each execution") + parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') + parser.add_argument('--program', type=str, required=True, help='target program') + parser.add_argument('--wait', action='store_true', help='Wait after each counter.') - (options, args) = parser.parse_args() + args = parser.parse_args() - if (options.program == None): - print("specify program, such as ls, with -p/--program") - sys.exit() - - p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE) - counters = p.communicate()[0] + counters = gather_counters() if len(counters) <= 0: print("no counters found") sys.exit() - for counter in counters.split(): + for counter in counters: if counter in notcounter: continue - p = subprocess.Popen(["pmcstat", "-p", counter, options.program], - stdout=PIPE) - result = p.communicate()[0] + p = subprocess.Popen(["pmcstat", "-p", counter, args.program], + text=True, stderr=PIPE) + result = p.communicate()[1] print(result) - if (options.wait == True): + if (args.wait == True): try: - value = raw_input("next?") + value = input("Waitin for you to press ENTER") except EOFError: sys.exit() From nobody Mon Jan 5 12:30:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlDCp6vKjz6MQC4 for ; Mon, 05 Jan 2026 12: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlDCp4696z3P6R for ; Mon, 05 Jan 2026 12:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767616230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Vy84ICw+pCb2kjJyixyRYQ/OqMiB6Nlc27PxpZNpVM=; b=oWQ6XbKow7hdVIi81Gd8g3yX+h7aIKT7FyCMKAD+sGf6yaUldY/R80TQVCOwi0w4BYZ0WI YkyCxInQese/owWQRb6Ct4oOSdEtf2zb4vsY2GrnJ8WVech9s0IL0nkr+aHTvyjaKAN+Az snNcVvQd+SRi1136IAAVx57NDn2TrRC8PnUf+kgC3SV4HuTGYT3yHJIXoaH+FqXj3/XNcG /n8v3LvO71Y4XPiRjXanLN7UipHgBIcZTaEEAchKlhGaR3EJwk2doTld9/i9cOzYYf8A3C En0/pEo6CP24pNaWWL6TPr86crCoFtZz4trLRj3BmIwkUxcylA2qJXQBu9/dZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767616230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Vy84ICw+pCb2kjJyixyRYQ/OqMiB6Nlc27PxpZNpVM=; b=rCy4apbcjZ5dAAeqWu9h5p6+yswSlWH8yjnjZRq54Q6/KQfYYLzpsWAXL3lUdqb+h8ucDg EuoRqlxN5O1Gjx/sOgiJxBmnosLR9Y5hENkNabHRKWTaWJ2y93M0UZAmQ4nC/TkHQo6XQM bfw7+SUluwFR+ZalGxE/WV3Z/0nmCyqvcU15mapegYHT4C7AcPwYEVfuDGlAvnqOXkE+/j nvYID5NKPmnWoxH28jZyqnEPn11dMkjEpfIoqdaEa7D5EX8k5ElAj/nq4HhFlqtTiWZSPM 47cR6hNNScShJYBSoRUP01LBbVSyxVJzDHTVCCpINBChrJnMvFXe+NG7LaJYxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767616230; a=rsa-sha256; cv=none; b=aeIvCBwb0VIXUdgPd+9FCAW4p8l0uYXoBx6J2GGM2bgFhYDhDJjzU/73XpdyVDBYS2IdCq MUuCJSQUtnvfYfZekBlXe/VTPdfCDKsxgZce0BbVqaVMccpsjPILTLepbbqwmAQfOYGOT6 hwEx77CZYu8bn/GaHu2xZR4GNUH0g26jyw434VfTYvn1R17t6TmGivPVzHfsQf8RE7Yl46 iHUEi0kqSvU1ILIQjCbTMO6ejPUrWWMNSHqzFNPav8p7730TruERbhKjkeP4Q8dPlOt0CR CC2nfz/gprZUi2DPnEnGT8h2Mqkbgq92EHRNec/UA0DoAjSdGFT4aBfwL5TnSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlDCp32Grz5VZ for ; Mon, 05 Jan 2026 12:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ba66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 12:30:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: George V. Neville-Neil Subject: git: 4a1b69ade6b5 - main - Start adding an exercise mode for programs under test. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a1b69ade6b5e8665dfb4d0cb683854705192a68 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 12:30:30 +0000 Message-Id: <695baee6.3ba66.24b8897@gitrepo.freebsd.org> The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=4a1b69ade6b5e8665dfb4d0cb683854705192a68 commit 4a1b69ade6b5e8665dfb4d0cb683854705192a68 Author: George V. Neville-Neil AuthorDate: 2026-01-05 12:30:22 +0000 Commit: George V. Neville-Neil CommitDate: 2026-01-05 12:30:22 +0000 Start adding an exercise mode for programs under test. In exercise mode we collect data for every available counter on a program and keep all of that in a directory in /tmp. --- tools/test/hwpmc/pmctest.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index bda2f3500d7d..f54541aeea1e 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -23,6 +23,7 @@ import subprocess from subprocess import PIPE import argparse +import tempfile def gather_counters(): """Run program and return output as array of lines.""" @@ -39,6 +40,7 @@ def main(): parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') parser.add_argument('--program', type=str, required=True, help='target program') parser.add_argument('--wait', action='store_true', help='Wait after each counter.') + parser.add_argument('--exercise', action='store_true', help='Exercise the program being studied using sampling counters.') args = parser.parse_args() @@ -48,19 +50,32 @@ def main(): print("no counters found") sys.exit() + if args.exercise == True: + tmpdir = tempfile.mkdtemp() + print("Exercising program ", args.program, " storing results data in ", tmpdir) + for counter in counters: if counter in notcounter: continue - p = subprocess.Popen(["pmcstat", "-p", counter, args.program], + if args.exercise == True: + p = subprocess.Popen(["pmcstat", + "-O", tmpdir + "/" + args.program + "-" + counter + ".pmc", + "-g", + "-P", counter, args.program], + text=True, stderr=PIPE) + result = p.communicate()[1] + print(result) + else: + p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] - print(result) - if (args.wait == True): - try: - value = input("Waitin for you to press ENTER") - except EOFError: - sys.exit() - + result = p.communicate()[1] + print(result) + if (args.wait == True): + try: + value = input("Waitin for you to press ENTER") + except EOFError: + sys.exit() + # The canonical way to make a python module into a script. # Remove if unnecessary. From nobody Mon Jan 5 14:17:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlGbq0QGhz6MYM2 for ; Mon, 05 Jan 2026 14:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlGbp4jhfz3cGM for ; Mon, 05 Jan 2026 14:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767622678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxV3k1Fk/tfk6LSI0fTB4KtYcKiXjy1EcBA8OUQK124=; b=HHVirjRRnuZy26ykBWGV9rKj5SgmCiwEmrIoO9Qr8yP1DgYcKVKfNrjLuEvOzXm4BzzlTQ ZUMHItcH8ZS3Ea5ZkJREKt6zxTj0h5u/YBcTRtrH84qubL0zpDatOSO0JP9/0YdN0N9DXH JXqQZ2dentMIhIupOpbt/gcwUyfSvFcd77g9TyMXO4ylxssaxaoH2WC5Onx7iuy97d9u4p tX7v+Dhh5/I+v7ReZDpR5UyOcrWaDnaOeuW1yrCsVm8GFw/o+zhoPpV640EbDxoRtGtAo4 ihn00om9HTyBVwjO3Ys7B0KY3ptRqf4/gbWIR26hAKYsPN87qi9SAfcdUcEakw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767622678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxV3k1Fk/tfk6LSI0fTB4KtYcKiXjy1EcBA8OUQK124=; b=FDbNbqkILf+5f6QDDy0p/DyKQIo2DD0WoukPTScW6NwI+F2sUavo8CwVJy690hZnkEHsbG mFWRZFJAUDtnUZLGAlHM6211XV4aAfEKETZ1Y7yV7H6sEJ+U0L0UadCjs2+FLBprGqCrKx fFnKW2EdiPPVEWq91yZc7aWlUCuvkmtgEsAez5Qir/+LgLEudjGd9dGA83ctL8RuBz7gCF GGqrh2A38Sbs0Rj0gEXYRK91JMc9aGAmjC5QnsK2X78NyNAaDVSLGBybbiS7CNySLSh0N/ 2FiWmF+5R5eV+g5T+WPGXLSRz5YKvNbEfxR+MvUv+7n9kitDEQVwGPkyLhg5HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767622678; a=rsa-sha256; cv=none; b=CKluq7ZgPftZ3JCN1Nw/B1FV++jXioqe9NDajRG4tTrQ0O48xGzucyONB7a16iBYrqTrzC GKjkBmh7aB0V3hHNoWQ/GJbL7ShWvnbciigDLryKNYGdmym4Om+LDnuTQIPa5J1REL8z2o LXSOPRqrSwT3j25H5BDvHhl/ip1gHmotnKne3+wCn7fMAyz3pfSx4P6TOVb4k61+HakjzL 1GnXRmxa59pz8e5KiyBefsGvQvGKMHv12wUO9t/nMkZ1zswtSLUUqblhR0QQhyRPsOQuVM yFZEzOmMp0wmPGhU9HZpD4FjId4NqEoF7MARZU2e06AvrK3HAKduxc0v1ec7qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlGbp41gxz7kf for ; Mon, 05 Jan 2026 14:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46403 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 14:17:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 684c762485d3 - main - git-arc: Try to make patching more useful List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 684c762485d31d769b9e1ebeaababa31f684d2de Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 14:17:58 +0000 Message-Id: <695bc816.46403.2733a59@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=684c762485d31d769b9e1ebeaababa31f684d2de commit 684c762485d31d769b9e1ebeaababa31f684d2de Author: Mark Johnston AuthorDate: 2026-01-05 14:17:11 +0000 Commit: Mark Johnston CommitDate: 2026-01-05 14:17:11 +0000 git-arc: Try to make patching more useful Add a raw mode, which fetches the patch file and applies it manually rather than using arc patch. This is handy because arc patch will always try to fetch your remotes if it can't find the base commit in your repo (even if you ask it not to make a commit). This is basically unusable in some of my workspaces where I have 20+ remotes configured, some of which may be unreachable. Add a stack mode, which causes git-arc to recursively apply parent revisions, going up the patch stack. Thus, to apply a full patch stack, just apply the final patch with -s. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D54403 --- tools/tools/git/git-arc.sh | 79 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 70 insertions(+), 9 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 98d29809d636..bff9b0607761 100755 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -59,7 +59,7 @@ Usage: git arc [-vy] Commands: create [-l] [-r [,...]] [-s subscriber[,...]] [|] list | - patch [-bc] [ ...] + patch [-bcrs] [ ...] stage [-b branch] [|] update [-l] [-m message] [|] @@ -226,6 +226,20 @@ diff2phid() jq -r "select(.response != []) | .response.${diff}.phid" } +phid2diff() +{ + local diff phid + + phid=$1 + if ! expr "$phid" : 'PHID-DREV-[0-9A-Za-z]*$' >/dev/null; then + err "invalid diff PHID $phid" + fi + diff=$(echo '{"constraints": {"phids": ["'"$phid"'"]}}' | + arc_call_conduit -- differential.revision.search | + jq -r '.response.data[0].id') + echo "D${diff}" +} + diff2status() { local diff tmp status summary @@ -244,6 +258,19 @@ diff2status() printf "%-14s %s\n" "${status}" "${summary}" } +diff2parents() +{ + local dep dependencies diff parents phid + + diff=$1 + phid=$(diff2phid "$diff") + for dep in $(echo '{"phids": ["'"$phid"'"]}' | + arc_call_conduit -- differential.query | + jq -r '.response[0].auxiliary."phabricator:depends-on"[]'); do + echo $(phid2diff $dep) + done +} + log2diff() { local diff @@ -651,13 +678,46 @@ patch_commit() git commit --author "${author}" --file "$tmp" } +apply_rev() +{ + local commit parent parents raw rev stack + + rev=$1 + commit=$2 + raw=$3 + stack=$4 + + if $stack; then + parents=$(diff2parents "$rev") + for parent in $parents; do + echo "Applying parent ${parent}..." + if ! apply_rev $parent $commit $raw $stack; then + return 1 + fi + done + fi + + if $raw; then + fetch -o /dev/stdout "https://reviews.freebsd.org/${rev}.diff" | git apply --index + else + arc patch --skip-dependencies --nobranch --nocommit --force $rev + fi + + if ${commit}; then + patch_commit $rev + fi + return 0 +} + gitarc__patch() { - local branch commit rev + local branch commit o raw rev stack branch=false commit=false - while getopts bc o; do + raw=false + stack=false + while getopts bcrs o; do case "$o" in b) require_clean_work_tree "patch -b" @@ -667,6 +727,12 @@ gitarc__patch() require_clean_work_tree "patch -c" commit=true ;; + r) + raw=true + ;; + s) + stack=true + ;; *) err_usage ;; @@ -682,13 +748,8 @@ gitarc__patch() patch_branch "$@" fi for rev in "$@"; do - if ! arc patch --skip-dependencies --nobranch --nocommit --force "$rev"; then - break - fi echo "Applying ${rev}..." - if ${commit}; then - patch_commit $rev - fi + apply_rev $rev $commit $raw $stack done } From nobody Mon Jan 5 14:17:59 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlGbq6v7kz6MYM3 for ; Mon, 05 Jan 2026 14:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlGbq4dXsz3cHy for ; Mon, 05 Jan 2026 14:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767622679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8CRECX90sCHiPNpiOIu9GBNZ9JhpNVuSIjolMrBXzKs=; b=NldtMpdOLn5SbjVlh8JDb3enKs26BNF5Jlix8rzno7snidBw42CglHJQhtvr51ysqDVhj0 ZK/MucYr+4d/IMUwByT5TXDOFPfTyFrKxmETzW8/0j2sWdh0zS/lhm9YJs7qXySBEEM3Fs zefMTOcidikQVXV0MWiZlvOLZKFcT+da06DKXq/i0UvQfwO15T2OSM/1lqr9i499rHlUId K4gTN43qtTvKF9Rc+BNKVs0XbzyP1RzvSSXkPWx2H2TLs16GrLFuVbZX6B2BpgpkIvZTlc 85gzCQzjsYsQEtn4lpu3vdROdlIhIXHGZYxSB9mi33TVlCYh9jFU5DiiRUHxtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767622679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8CRECX90sCHiPNpiOIu9GBNZ9JhpNVuSIjolMrBXzKs=; b=uxAaDY8cfFRtnTaO0BQSAgHE5daNCx1oVjwf6H4OH9y1lXGOQr8H59KOGidrBHYrk+AIdD zvinfc3zu+dY89ZZAAuYlOKqzhReREFgoSFMdDXbNqQhjnwAj0LVf78wJLbUPGwS9x1kiY Jztere0ooMxC6n3VBCv0JdQH7A0R72NGvM2B7WWsIQ5DnZRwUv+5RkLxxD+AsIP2GuWurk yKAgb8o97bjCCYxmhx+EzZHWJQc4z0ncIH6rMaYhcwneVRYBv5BQCUQ6EsE7y/0kAxomPq F11q2wKDcZiBmxJ/ocu0SSki07B6zjiGB4M1A/n1mzymZVGxv1x6F/qeGh8tQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767622679; a=rsa-sha256; cv=none; b=vJu8+KohxuHofIHn39wCGhLaBhl6kdgYtfH4fRb6MFbXE/6aXm7SJPYWqbZnG5hpIWzzvT lAmzPqjzlFZnTIV1wAkWA9Av9InzuHV+SjvF4i2sbz7Xe9yv6LJexEH2p7ax93Ce90Kt6m 9gyQSih6zhON+8y/Yq5ajeocktIcnV/LcSW4wUmfeqrAxAvjUKrG/reVT1s2FJWKxmAhTh Vk6wsvFRwYRkVLNyK/p1EpsD76WfkuEJ03C3IIac9ooEKdmYeseX5bFeGAG+WmZsEB9t47 eoIDZmq038gUHGkiBNmZ9wNnXGoOMjXDNcXP1G3JtQ8RTKgNrZQ7j8RCC8TN5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlGbq41tbz8Cc for ; Mon, 05 Jan 2026 14:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 446e9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 14:17:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1c8dafe61887 - main - git-arc: Try to improve documentation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c8dafe618878c563c3740061f83a85b0be10720 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 14:17:59 +0000 Message-Id: <695bc817.446e9.296b6841@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1c8dafe618878c563c3740061f83a85b0be10720 commit 1c8dafe618878c563c3740061f83a85b0be10720 Author: Mark Johnston AuthorDate: 2026-01-05 14:17:21 +0000 Commit: Mark Johnston CommitDate: 2026-01-05 14:17:21 +0000 git-arc: Try to improve documentation When I originally wrote git-arc, the usage string was the documentation. Later, a man page was added, largely copied from the usage string. Over time they have diverged slightly. It is silly to have two copies of the same information, so let's make the man page the source of truth. While here, document some options for git-arc-patch and rewrite a few sentences here and there in a way that I hope is clearer. Reviewed by: ziaee, ngie, adrian Differential Revision: https://reviews.freebsd.org/D54405 --- tools/tools/git/git-arc.1 | 81 +++++++++++++++++++++++++++++--------- tools/tools/git/git-arc.sh | 96 +--------------------------------------------- 2 files changed, 64 insertions(+), 113 deletions(-) diff --git a/tools/tools/git/git-arc.1 b/tools/tools/git/git-arc.1 index a056a2223e0e..0e2615d83fa4 100644 --- a/tools/tools/git/git-arc.1 +++ b/tools/tools/git/git-arc.1 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Janurary 15, 2025 +.Dd December 29, 2025 .Dt GIT-ARC 1 .Os .Sh NAME @@ -37,40 +37,59 @@ .Op Fl r Ar reviewer1 Ns Op Cm \&, Ns Ar reviewer2 ... .Op Fl s Ar subscriber1 Ns Op Cm \&, Ns Ar subscriber2 ... .Op Fl p Ar parent -.Op Ar commit ... Ns | Ns Ar commit-range +.Ar commit-ref Op Ar commit-ref ... .Nm -.Cm list Ar commit ... Ns | Ns Ar commit-range +.Cm list Ar commit-ref Op Ar commit-ref ... .Nm +.Op Fl bcrs .Cm patch .Op Fl c -.Ar diff1 Ns Op Cm \&, Ns Ar diff2 +.Ar diff1 Op Cm Ar diff2 Op Ar ... .Nm .Cm stage .Op Fl b Ar branch -.Op Ar commit ... Ns | Ns Ar commit-range +.Ar commit-ref Op Ar commit-ref ... .Nm .Cm update .Op Fl l .Op Fl m Ar message -.Op Ar commit ... Ns | Ns Ar commit-range +.Ar commit-ref Op Ar commit-ref ... .Sh DESCRIPTION The .Nm utility creates and manages .Fx Phabricator reviews based on git commits. +It is geared towards +.Fx +development. It requires the -.Pa devel/arcanist -port or package. +.Pa devel/git , +.Pa devel/arcanist-lib +and +.Pa textproc/jq +packages; these will be installed automatically if +.Nm +is installed via the +.Pa devel/freebsd-git-devtools +package. .Pp .Nm assumes a one-to-one relationship between git commits and -Differential Revisions, and the Differential Revision title must match -the summary line of the corresponding commit. -In particular, the commit summaries must be unique across all open +Differential Revisions, and requires the titles in a pair to match. +Commit titles must therefore be unique across all open Differential Revisions authored by the submitter. +If the title of either a commit or its associated Differential Revision is +changed, the other must be updated manually to maintain the match. .Pp The first parameter must be a verb. +Most verbs accept one or more git commit references: commit hashes, branch +names, commit ranges, and so on. +A branch name refers to the single commit at its tip; use a commit range to +operate on multiple commits. +See +.Xr git-rev-parse 1 +for details on specifying commit references. The available verbs are: .Bl -tag -width "create" .It Cm create @@ -96,19 +115,45 @@ stack in Phabricator. .It Cm list Print the associated Differential Revisions for the specified commits. .It Cm patch -Try to apply a patch from a Differential Revision to the currently +Try to apply patches from one or more Differential Revision to the currently checked out tree. +The following options are accepted: +.Bl -tag -width "-b" +.It Fl b +Switch to a new branch before applying the patches. +.It Fl c +Commit each applied patch to the git checkout. +The commit message and author are taken from the Differential Revision. +.It Fl r +Rather than using the +.Sy arc +command to apply the patch, download the raw patch file and apply it using +.Xr git-apply 1 . +This is useful for avoiding some misfeatures of +.Sy arc , +particularly its behavior of trying to update all remotes in the tree in some +cases. +.It Fl s +Recursively apply the parent revisions of the specified commit. +This can be used to apply patch stacks by specifying the top-most, i.e., +most recent commit in the stack. +.El .It Cm stage Prepare a series of commits to be pushed to the upstream .Fx repository. -The commits are cherry-picked to a branch (by default the -.Dq main -branch), review tags are added to the commit log message, and -the log message is opened in an editor for any last-minute +.Pp +First, the target branch is checked out; by default this is the +main branch but can be overridden with the +.Fl b +option. +Then, the specified commits are cherry-picked with review tags added to the +commit log message, and the log message is opened in an editor for any final updates. -The commits need not have associated Differential -Revisions. +The commits need not have associated Differential Revisions. +.Pp +This is intended to be used after code review has been completed, and the +commits are ready to be pushed to an upstream repository. .It Cm update Synchronize the Differential Revisions associated with the specified commits. diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index bff9b0607761..f15cade1f1e7 100755 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -63,102 +63,8 @@ Commands: stage [-b branch] [|] update [-l] [-m message] [|] -Description: - Create or manage FreeBSD Phabricator reviews based on git commits. There - is a one-to one relationship between git commits and Differential revisions, - and the Differential revision title must match the summary line of the - corresponding commit. In particular, commit summaries must be unique across - all open Differential revisions authored by you. - - The first parameter must be a verb. The available verbs are: - - create -- Create new Differential revisions from the specified commits. - list -- Print the associated Differential revisions for the specified - commits. - patch -- Apply patches from Differential revisions. By default, patches - are applied to the currently checked-out tree, unless -b is - supplied, in which case a new branch is first created. The -c - option commits the applied patch using the review's metadata. - stage -- Prepare a series of commits to be pushed to the upstream FreeBSD - repository. The commits are cherry-picked to a branch (main by - default), review tags are added to the commit log message, and - the log message is opened in an editor for any last-minute - updates. The commits need not have associated Differential - revisions. - update -- Synchronize the Differential revisions associated with the - specified commits. Currently only the diff is updated; the - review description and other metadata is not synchronized. - - The typical end-to-end usage looks something like this: - - $ git commit -m "kern: Rewrite in Rust" - $ git arc create HEAD - - $ git commit --amend - $ git arc update HEAD - - $ git arc stage HEAD - $ git push freebsd HEAD:main - -Config Variables: - These are manipulated by git-config(1). - - arc.assume_yes [bool] - -- Assume a "yes" answer to all prompts instead of - prompting the user. Equivalent to the -y flag. - - arc.browse [bool] -- Try to open newly created reviews in a browser tab. - Defaults to false. - - arc.list [bool] -- Always use "list mode" (-l) with create and update. - In this mode, the list of git revisions to use - is listed with a single prompt before creating or - updating reviews. The diffs for individual commits - are not shown. - - arc.verbose [bool] -- Verbose output. Equivalent to the -v flag. - -Examples: - Create a Phabricator review using the contents of the most recent commit in - your git checkout. The commit title is used as the review title, the commit - log message is used as the review description, markj@FreeBSD.org is added as - a reviewer. Also, the "Jails" reviewer group is added using its hashtag. - - $ git arc create -r markj,#jails HEAD - - Create a series of Phabricator reviews for each of HEAD~2, HEAD~ and HEAD. - Pairs of consecutive commits are linked into a patch stack. Note that the - first commit in the specified range is excluded. - - $ git arc create HEAD~3..HEAD - - Update the review corresponding to commit b409afcfedcdda. The title of the - commit must be the same as it was when the review was created. The review - description is not automatically updated. - - $ git arc update b409afcfedcdda - - Apply the patch in review D12345 to the currently checked-out tree, and stage - it. - - $ git arc patch D12345 - - Apply the patch in review D12345 to the currently checked-out tree, and - commit it using the review's title, summary and author. - - $ git arc patch -c D12345 - - Apply the patches in reviews D12345 and D12346 in a new branch, and commit - them using the review titles, summaries and authors. - - $ git arc patch -bc D12345 D12346 - - List the status of reviews for all the commits in the branch "feature": - - $ git arc list main..feature - +See git-arc(1) for details. __EOF__ - exit 1 } From nobody Mon Jan 5 16:06:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlK1X662Vz6MhhT for ; Mon, 05 Jan 2026 16:06: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlK1X5G4Vz3s24 for ; Mon, 05 Jan 2026 16:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767629216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHTDOcr1jP73wm9yHMRrwYCgU41s1u3ul4Nhyc11O18=; b=F2tn2SYn0t0RUv7vygq2BoePoa/+ACaz3qFBFHzBGQC7C2KA84iE03AK1SfEGWNYdsc61c Sdmn9qeg3g26wzce80SLLPDfazduplNNh6CD7RAHeXgjeeiDpQJA6fVn0yr0jgJpgxxB73 KrXd4S89hdJHctf7LILGeL/ewe3gzLvFz/4KrnoVIq0JRXdGZkaNxFJiamIjMwg67hf7Lk hvpqOQZveZceaUSwXSvAadB6+biw7HfeBu9WNkpZbSdv7dSofH7uKbL942Fcuawf9Gg9V4 x7xnVbmU9hVVGJzdm1Yc78PHVmoRQh+v3RwmdFaOep2Zt/PT/lmxi0RFFnQeGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767629216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHTDOcr1jP73wm9yHMRrwYCgU41s1u3ul4Nhyc11O18=; b=C2CbE3VhhZmxV6SMzol4nKqSZakR1+b1ytYBVrT17DyN57QKZ0H3oEIXoUhNXBoNLAH/It 9l94BnKf8qLYSYph51wMjY2/LyCG4fwB2be7KGOKQBtrBmx/A41EkQIwMzZw2CMXmkqcMU sweaRkSejh8tTwgmRY/pHnoyzWQUsYbCE3vBL9/HAU+uSCn8MPn9swdonZY/k9tjdwaoKf bFowZa33OveLTQmPNT6VPluvNiRDCkmEYMYYKpc3tXDDk9DUkQlbcUw54EXF8VBn9EFSB9 fQDdCVmxnUPKgKS8bX43akz3QQtthShfA5ohYj5UZE7pzqjhyKVNX0ks12f0qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767629216; a=rsa-sha256; cv=none; b=Ln35AJHvpDiBmcUMo0Qq9Kck6HRYBjMoYACRELhQO4fYeDYZHRdH04mOAbW7EJr1N5KGZH I3kvnB+zghINdeTK5wbvltOM0KmskPAAlnlb/MhUHArZFb2EsVui2OBPFAzMKxgA6TECWg hMqTBDrLB8GhN7ogmSveZpFLqDialXJmyzSJ1bPlL436K6LjT20zVqpjQNfDc/K+bkZ8RQ bWM7Ms6rzx9XamJQWwneVVk1Jvo8ubsWxgCs5YHZXX5to8yZkYQaPXuH4SuIo/wm2kVsge bzXrjV3J6+PNjOY3+hGc1avTcvg3jQuJgm4MZVhkltze4AVvwh6Xw5wG4xVttg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlK1X4l81zBSS for ; Mon, 05 Jan 2026 16:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2050f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:06:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 58a14d9596bd - main - inetd.conf: Correct rsync example List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58a14d9596bd9a72683cbd725e817fdabe926139 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:06:56 +0000 Message-Id: <695be1a0.2050f.a30f477@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=58a14d9596bd9a72683cbd725e817fdabe926139 commit 58a14d9596bd9a72683cbd725e817fdabe926139 Author: Ed Maste AuthorDate: 2026-01-05 14:51:28 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:04:46 +0000 inetd.conf: Correct rsync example There is no rsyncd binary in the rsync package; rsync is just invoked with --daemon. PR: 122037 Sponsored by: The FreeBSD Foundation --- usr.sbin/inetd/inetd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/inetd/inetd.conf b/usr.sbin/inetd/inetd.conf index e25a77d3ca9c..008c94cd53b3 100644 --- a/usr.sbin/inetd/inetd.conf +++ b/usr.sbin/inetd/inetd.conf @@ -125,7 +125,7 @@ # Example entry for insecure rsync server # This is best combined with encrypted virtual tunnel interfaces, which can be # found with: apropos if_ | grep tunnel -#rsync stream tcp nowait root /usr/local/bin/rsyncd rsyncd --daemon +#rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --daemon # # Let the system respond to date requests via tcpmux #tcpmux/+date stream tcp nowait guest /bin/date date From nobody Mon Jan 5 16:32:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKb00QPlz6Mk13 for ; Mon, 05 Jan 2026 16:32: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKZz3gWrz40QT for ; Mon, 05 Jan 2026 16:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kmI9+rxDzxBFS9e72HrhLlOEDEZo3qcms2GbnfGuS4=; b=q3HRjRstVq6FoJXmAc5Ipi3Lj2CN2ugstXXrU2p+9VAYEi2HPYvTANmooa4+ZQwCr87T8g DW/zWJcwnGY9uyL/jmBLvzQCfli+dI/JttKpWyFHYeuSy5DL7DiHe8NNxW0Jt59q7IHaEi AUb6bAS0tNqsOdWWXX3NUE4mbSB4f/G9cDzV1dK5/WqtR1+9HfbEK1HyxREemvf2r5Hjra SFW2lAr14YN0j/04VfR0QqicF8Y/Q4sDK9OXJjCY4p+/rHb3OIRY25/E/fS5XXXKshwSq6 4Z9otgTy9P7VQ50ln140SFlRUEHObf4mc1q4G7hKDIsWYtBmxAWnStTLxaUWeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kmI9+rxDzxBFS9e72HrhLlOEDEZo3qcms2GbnfGuS4=; b=bdL0iJLYYPoGt/wE7f5y5RHhAVQHbeC092RPiDbHmlCpF2qO0vCsRl1WbNABA9HFbpj8jV 0NKUlhsjAL8Y4h3eDnk/rVzpnZ4GtwgdTxcBmGKQhLvx6fD6a13o16WCTqC14PnnImHpGe O6zHZbh/Ev88ZjeGpgi3zyYx4xoLM13NLTM9rEREJnwj/euz9PpMoxj8dgOIfh1dqLGm7Y h8EhGRto4qTaYLtS+/joDWXxxqUH8pu7zNczZu7f+mnQmn8x/XGVnionNGDF/JkiBzIG6T eqIlBVpcJ0DOuPq4PO8yJsN4ToqgLzPAbHwO/jk79+clH1uIn2nW/NVW5okyrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630747; a=rsa-sha256; cv=none; b=hTjOWILV32WR8BvtUr/VN/d706eVtnG28KjbK62Ct1FxCu846eq284I5Ty/N5gpzt2JP0O U+GWqvjNFfR9GoSrz+kpbrW1rketzdm8keruF+FAdRvriuso82oVgilMKq/g2aET8Bil3g 7d1ZJVR0a4UhUgUgxWVQ2c5rmkRxOYkyY/wqjFmi1gm1c5UwtvDwCcsHYMZQMiwDU3gKTR A7ZmTToF4wLWVEO8yL9v1YAx5q8Wkh4oIJAnyjH3jXhMwv2Rlsh51L7DQVS4Ean9G0VljL 1K2M4Lp4Myjp/5Zf46tHFpNxRoqoG59vu0gs5krr30BdStLyuf0TPR6mCJ0Xag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKZz338BzCX1 for ; Mon, 05 Jan 2026 16:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23779 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:32:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 138e74ceadb2 - main - TCP Stacks, Improve rack to better handle reordering List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 138e74ceadb237cdd42fcda11ddef18b509f571d Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:32:27 +0000 Message-Id: <695be79b.23779.3ade954@gitrepo.freebsd.org> The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=138e74ceadb237cdd42fcda11ddef18b509f571d commit 138e74ceadb237cdd42fcda11ddef18b509f571d Author: Randall Stewart AuthorDate: 2026-01-05 16:30:22 +0000 Commit: Randall Stewart CommitDate: 2026-01-05 16:30:22 +0000 TCP Stacks, Improve rack to better handle reordering With a recent bug in the igb (and a few other) driver LRO mis-queuing, rack did things ok, better than the base stack, due to the rack reordering protections in rack, but there was still room for improvements. When a series of packets are completely mis-ordered you often times can get the acks shortly after you have entered recovery and retransmitted the first of the packets indicated in the sack stream. Then the cum-ack arrives basically acking all those packets. If you look at the time from when you sent the packet to when the ack came back you can quickly determine that the ack was not to what you just transmitted but instead was original and you had a completely false recovery entry. Dropping out of that you can then restore the congestion state and continue on your way. The Dup-acks that also arrive help increase your reordering windows which makes you less likely to repeat the scenario. Differential Revision: --- sys/netinet/tcp_stacks/rack.c | 94 +++++++++++++++++++++++++++++++++++---- sys/netinet/tcp_stacks/tcp_rack.h | 1 + 2 files changed, 87 insertions(+), 8 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 76bf8f2e3b17..f55abbf919b7 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -204,6 +204,7 @@ static int32_t rack_dnd_default = 0; /* For rr_conf = 3, what is the default fo static int32_t rack_rxt_controls = 0; static int32_t rack_fill_cw_state = 0; static uint8_t rack_req_measurements = 1; +static uint32_t rack_rtt_divisor = 2; static int32_t rack_enable_hw_pacing = 0; /* Due to CCSP keep it off by default */ static int32_t rack_hw_rate_caps = 0; /* 1; */ static int32_t rack_hw_rate_cap_per = 0; /* 0 -- off */ @@ -497,7 +498,7 @@ static uint64_t rack_get_gp_est(struct tcp_rack *rack); static void rack_log_sack_passed(struct tcpcb *tp, struct tcp_rack *rack, - struct rack_sendmap *rsm, uint32_t cts); + struct rack_sendmap *rsm, uint32_t cts, int line); static void rack_log_to_event(struct tcp_rack *rack, int32_t to_num, struct rack_sendmap *rsm); static int32_t rack_output(struct tcpcb *tp); @@ -1349,6 +1350,11 @@ rack_init_sysctls(void) OID_AUTO, "reset_ssth_rec_rto", CTLFLAG_RW, &rack_ssthresh_rest_rto_rec, 0, "When doing recovery -> rto -> recovery do we reset SSthresh?"); + SYSCTL_ADD_U32(&rack_sysctl_ctx, + SYSCTL_CHILDREN(rack_timers), + OID_AUTO, "rtt_divisor", CTLFLAG_RW, + &rack_rtt_divisor, 2, + "When calculating the rtt threshold what 1/N is a rtt that indicates reordering"); SYSCTL_ADD_U32(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_timers), OID_AUTO, "scoreboard_thresh", CTLFLAG_RW, @@ -2663,6 +2669,8 @@ rack_log_map_chg(struct tcpcb *tp, struct tcp_rack *rack, log.u_bbr.cur_del_rate = (uintptr_t)prev; log.u_bbr.delRate = (uintptr_t)rsm; log.u_bbr.rttProp = (uintptr_t)next; + if (rsm) + log.u_bbr.flex1 = rsm->r_flags; log.u_bbr.flex7 = 0; if (prev) { log.u_bbr.flex1 = prev->r_start; @@ -5584,6 +5592,7 @@ rack_cong_signal(struct tcpcb *tp, uint32_t type, uint32_t ack, int line) rack->r_ctl.rc_prr_delivered = 0; rack->r_ctl.rc_prr_out = 0; rack->r_fast_output = 0; + rack->r_ctl.recovery_rxt_cnt = 0; if (rack->rack_no_prr == 0) { rack->r_ctl.rc_prr_sndcnt = ctf_fixed_maxseg(tp); rack_log_to_prr(rack, 2, in_rec_at_entry, line); @@ -7416,6 +7425,7 @@ rack_remxt_tmr(struct tcpcb *tp) */ TAILQ_INIT(&rack->r_ctl.rc_tmap); + rack->r_ctl.recovery_rxt_cnt = 0; TQHASH_FOREACH(rsm, rack->r_ctl.tqh) { rsm->r_dupack = 0; if (rack_verbose_logging) @@ -8042,6 +8052,7 @@ rack_update_rsm(struct tcpcb *tp, struct tcp_rack *rack, /* We have retransmitted due to the SACK pass */ rsm->r_flags &= ~RACK_SACK_PASSED; rsm->r_flags |= RACK_WAS_SACKPASS; + rack->r_ctl.recovery_rxt_cnt += (rsm->r_end - rsm->r_start); } } @@ -8948,7 +8959,7 @@ ts_not_found: */ static void rack_log_sack_passed(struct tcpcb *tp, - struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t cts) + struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t cts, int line) { struct rack_sendmap *nrsm; uint32_t thresh; @@ -8997,6 +9008,7 @@ rack_log_sack_passed(struct tcpcb *tp, */ break; } + rack_log_dsack_event(rack, 12, __LINE__, nrsm->r_start, nrsm->r_end); nrsm->r_flags |= RACK_SACK_PASSED; nrsm->r_flags &= ~RACK_WAS_SACKPASS; } @@ -9172,6 +9184,39 @@ is_rsm_inside_declared_tlp_block(struct tcp_rack *rack, struct rack_sendmap *rsm return (1); } + +static int +rack_check_reorder_ack(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendmap *rsm, int the_end, uint32_t cts, int can_exit_recovery, int line) +{ + if ((rack_rtt_divisor > 0) && + (rsm->r_rtr_cnt == 2) && + IN_RECOVERY(tp->t_flags) && + (rsm->r_flags & RACK_WAS_SACKPASS)){ + uint32_t fractional, snt_to_ack; + + fractional = (tp->t_srtt / rack_rtt_divisor); + if (fractional == 0) + fractional = 1; + snt_to_ack = cts - (uint32_t)rsm->r_tim_lastsent[(rsm->r_rtr_cnt - 1)]; + if (snt_to_ack <= fractional) { + rack->r_ctl.rc_reorder_ts = cts; + KASSERT((rack->r_ctl.recovery_rxt_cnt >= (the_end - rsm->r_start)), + ("rsm:%p rack:%p recovery_rxt_cnt would go negative recovery_rxt_cnt:%u sub:%u", rsm, rack, rack->r_ctl.recovery_rxt_cnt, (the_end - rsm->r_start))); + rack->r_ctl.recovery_rxt_cnt -= (the_end - rsm->r_start); + rack_log_to_prr(rack, 18, rack->r_ctl.recovery_rxt_cnt, line); + if (can_exit_recovery && (rack->r_ctl.recovery_rxt_cnt == 0)) { + tp->snd_ssthresh = rack->r_ctl.rc_ssthresh_at_erec; + rack_exit_recovery(tp, rack, 4); + rack->r_might_revert = 0; + rack->r_ctl.retran_during_recovery = 0; + rack_log_to_prr(rack, 17, snt_to_ack, line); + } + return (1); + } + } + return (0); +} + static uint32_t rack_proc_sack_blk(struct tcpcb *tp, struct tcp_rack *rack, struct sackblk *sack, struct tcpopt *to, struct rack_sendmap **prsm, uint32_t cts, @@ -9183,6 +9228,7 @@ rack_proc_sack_blk(struct tcpcb *tp, struct tcp_rack *rack, struct sackblk *sack int insret __diagused; int32_t used_ref = 1; int can_use_hookery = 0; + int prohibit_marking = 0; start = sack->start; end = sack->end; @@ -9273,6 +9319,8 @@ do_rest_ofb: (rsm->bindex == next->bindex) && ((rsm->r_flags & RACK_STRADDLE) == 0) && ((next->r_flags & RACK_STRADDLE) == 0) && + ((rsm->r_flags & RACK_WAS_SACKPASS) == 0) && + ((next->r_flags & RACK_WAS_SACKPASS) == 0) && ((rsm->r_flags & RACK_IS_PCM) == 0) && ((next->r_flags & RACK_IS_PCM) == 0) && (rsm->r_flags & RACK_IN_GP_WIN) && @@ -9345,6 +9393,8 @@ do_rest_ofb: rack_log_retran_reason(rack, rsm, __LINE__, 0, 2); /* Now lets make sure our fudge block is right */ nrsm->r_start = start; + /* Check if the ack was too soon i.e. reordering + ack arrives too quickly */ + prohibit_marking = rack_check_reorder_ack(tp, rack, nrsm, nrsm->r_end, cts, 0, __LINE__); /* Now lets update all the stats and such */ rack_update_rtt(tp, rack, nrsm, to, cts, SACKED, 0); if (rack->app_limited_needs_set) @@ -9388,8 +9438,8 @@ do_rest_ofb: * Now that we have the next * one walk backwards from there. */ - if (nrsm && nrsm->r_in_tmap) - rack_log_sack_passed(tp, rack, nrsm, cts); + if (nrsm && nrsm->r_in_tmap && (prohibit_marking == 0)) + rack_log_sack_passed(tp, rack, nrsm, cts, __LINE__); } /* Now are we done? */ if (SEQ_LT(end, next->r_end) || @@ -9445,6 +9495,8 @@ do_rest_ofb: } rack_log_map_chg(tp, rack, NULL, rsm, nrsm, MAP_SACK_M2, end, __LINE__); rsm->r_flags &= (~RACK_HAS_FIN); + /* Check if the ack was too soon i.e. reordering + ack arrives too quickly */ + prohibit_marking = rack_check_reorder_ack(tp, rack, nrsm, nrsm->r_end, cts, 0, __LINE__); /* Position us to point to the new nrsm that starts the sack blk */ rsm = nrsm; } @@ -9521,6 +9573,8 @@ do_rest_ofb: } rack_update_rtt(tp, rack, rsm, to, cts, SACKED, 0); changed += (rsm->r_end - rsm->r_start); + /* Check if the ack was too soon i.e. reordering + ack arrives too quickly */ + prohibit_marking = rack_check_reorder_ack(tp, rack, rsm, rsm->r_end, cts, 0, __LINE__); /* You get a count for acking a whole segment or more */ if (rsm->r_flags & RACK_WAS_LOST) { /* @@ -9530,8 +9584,9 @@ do_rest_ofb: rack_mark_nolonger_lost(rack, rsm); } rack->r_ctl.rc_sacked += (rsm->r_end - rsm->r_start); - if (rsm->r_in_tmap) /* should be true */ - rack_log_sack_passed(tp, rack, rsm, cts); + if (rsm->r_in_tmap && (prohibit_marking == 0)) /* should be true */ + rack_log_sack_passed(tp, rack, rsm, cts, __LINE__); + /* Is Reordering occuring? */ if (rsm->r_flags & RACK_SACK_PASSED) { rsm->r_flags &= ~RACK_SACK_PASSED; @@ -9620,6 +9675,8 @@ do_rest_ofb: (rsm->bindex == prev->bindex) && ((rsm->r_flags & RACK_STRADDLE) == 0) && ((prev->r_flags & RACK_STRADDLE) == 0) && + ((prev->r_flags & RACK_WAS_SACKPASS) == 0) && + ((rsm->r_flags & RACK_WAS_SACKPASS) == 0) && ((rsm->r_flags & RACK_IS_PCM) == 0) && ((prev->r_flags & RACK_IS_PCM) == 0) && (rsm->r_flags & RACK_IN_GP_WIN) && @@ -9658,6 +9715,8 @@ do_rest_ofb: */ nrsm->r_end = end; rsm->r_dupack = 0; + /* Check if the ack was too soon i.e. reordering + ack arrives too quickly */ + prohibit_marking = rack_check_reorder_ack(tp, rack, nrsm, nrsm->r_end, cts, 0, __LINE__); /* * Which timestamp do we keep? It is rather * important in GP measurements to have the @@ -9807,6 +9866,8 @@ do_rest_ofb: nrsm->r_in_tmap = 1; } nrsm->r_dupack = 0; + /* Check if the ack was too soon i.e. reordering + ack arrives too quickly */ + prohibit_marking = rack_check_reorder_ack(tp, rack, nrsm, nrsm->r_end, cts, 0, __LINE__); rack_log_retran_reason(rack, nrsm, __LINE__, 0, 2); rack_update_rtt(tp, rack, rsm, to, cts, SACKED, 0); changed += (rsm->r_end - rsm->r_start); @@ -9818,8 +9879,8 @@ do_rest_ofb: } rack->r_ctl.rc_sacked += (rsm->r_end - rsm->r_start); - if (rsm->r_in_tmap) /* should be true */ - rack_log_sack_passed(tp, rack, rsm, cts); + if (rsm->r_in_tmap && (prohibit_marking == 0)) /* should be true */ + rack_log_sack_passed(tp, rack, rsm, cts, __LINE__); /* Is Reordering occuring? */ if (rsm->r_flags & RACK_SACK_PASSED) { rsm->r_flags &= ~RACK_SACK_PASSED; @@ -9857,6 +9918,10 @@ out: ((rsm->r_flags & RACK_IN_GP_WIN) == 0)) { break; } + /* We can't merge retransmitted with sack-pass set */ + if ((rsm->r_flags & RACK_WAS_SACKPASS) || + (next->r_flags & RACK_WAS_SACKPASS)) + break; if ((rsm->r_flags & RACK_IN_GP_WIN) && ((next->r_flags & RACK_IN_GP_WIN) == 0)) { break; @@ -9888,6 +9953,10 @@ out: ((rsm->r_flags & RACK_IN_GP_WIN) == 0)) { break; } + /* We can't merge retransmitted with sack-pass set */ + if ((rsm->r_flags & RACK_WAS_SACKPASS) || + (prev->r_flags & RACK_WAS_SACKPASS)) + break; if ((rsm->r_flags & RACK_IN_GP_WIN) && ((prev->r_flags & RACK_IN_GP_WIN) == 0)) { break; @@ -10254,6 +10323,7 @@ more: } rack_update_pcm_ack(rack, 1, rsm->r_start, rsm->r_end); } else { + (void)rack_check_reorder_ack(tp, rack, rsm, rsm->r_end, cts, 1, __LINE__); rack_update_pcm_ack(rack, 1, rsm->r_start, rsm->r_end); } if ((rsm->r_flags & RACK_TO_REXT) && @@ -10354,6 +10424,14 @@ more: } rsm->soff += (th_ack - rsm->r_start); rack_rsm_sender_update(rack, tp, rsm, 5); + + /* + * Handle the special case where we retransmitted part of a segment we + * in this case pass in th_ack which is shorter than r_end. + */ + if (rsm->r_flags & RACK_WAS_SACKPASS) { + rack_check_reorder_ack(tp, rack, rsm, th_ack, cts, 1, __LINE__); + } /* The trim will move th_ack into r_start for us */ tqhash_trim(rack->r_ctl.tqh, th_ack); /* Now do we need to move the mbuf fwd too? */ diff --git a/sys/netinet/tcp_stacks/tcp_rack.h b/sys/netinet/tcp_stacks/tcp_rack.h index cac17d9aeb50..2e2ced089f67 100644 --- a/sys/netinet/tcp_stacks/tcp_rack.h +++ b/sys/netinet/tcp_stacks/tcp_rack.h @@ -539,6 +539,7 @@ struct rack_control { uint32_t last_rcv_tstmp_for_rtt; uint32_t last_time_of_arm_rcv; uint32_t rto_ssthresh; + uint32_t recovery_rxt_cnt; uint32_t rc_saved_beta; uint32_t rc_saved_beta_ecn; /* * For newreno cc: rc_saved_beta and From nobody Mon Jan 5 16:49:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKyh37XKz6MlFc for ; Mon, 05 Jan 2026 16:49: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKyh0lrXz42Xb for ; Mon, 05 Jan 2026 16:49:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767631772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nC4Mc2OyaWfU5c1X7Jj+VXtnppHo9mUOsjb0WhUV0A=; b=fc7rOdRIXKVN5E1F/0RIr9btXapXNb/QbzIBt/4js8V2+enHErzrdnu6mnTtxWFJ2FUYL+ LuV+M0vNMcZnXn1lA9G7VQHwoomb/uwwb6Xvqzx12t7ZezmCXDfRfDPSImS7ze1typP57A LFIiw3FzYjCs+lUVgZ9ge2wKlWb3f1gU5gcl0m3ZnBOTqgq9J7McwULijUyEHHsoRklqYG cjd/QrJ92OLblzurDeTK8RWfxDstiW1Az6hd6Gm1ocXgPmpxdcKh2sWW1WP3OpA1xLr7PZ bVZYz+355zl6POTyEZDgFHxCVRxyIJ7ITaJluudcHXsi/6pk5MyUyBNV6fbHGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767631772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nC4Mc2OyaWfU5c1X7Jj+VXtnppHo9mUOsjb0WhUV0A=; b=h77iIk6nvxiRmUrzNtqORzVuwageH3O3lh8urtY6fRM7UkyQVg/fKsJhsORaVoz5GVHvsv se5Jg1dOJYH1chDDaiut8j518Jp2boxau/U9kb6TubXWVB4JlwZYNCSJI/VcBxKrMwlQhy EVxhyRlJsvI5J4Kbe+uAO3U4lOZfgzXHQg3D+f/C473CeYXPebRH9Jn1mFaIwocOVK0RUE Cmrg6SXi4hhDYoZhkfpaYwA1TiIvucawxm3F8xsR1gOaM/A15YiYKaOfhU5t32FI88ueoY UIXmNbEZcE1r1jTHWzjqVRylANYufRtq6+yPspXU7n/O/qEljB4TNMA+rw63Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767631772; a=rsa-sha256; cv=none; b=J1BtoK3VwnqmMg8RHxEgvmZnhPNvzh3ix9Dgm8bi43qW2UVsbKYDhDTsLDCSB30DNZ8zMG h83ayTY6Ws9Ebj282WpdvXfCUNa9Y/26igxfaoACaopUXyG0XAhf59tsy7ERTW9x4Rlk3e T3jTI7WN4axLP0U1r3XAp9SLNy/MgzVchMUoaM1AnACm1VJsJBMo2YcEO2uWV45ZEMhhLf +lE0+Ucukwc3DfTa29r2/Ha1lCdKoCOGTC6v/ETbF3EWavk+22NwDDy9GoheuPzLzWfVCC UUKrjdEPHW73Dl2Hzf7ug5YplGs37ZT03/9OFQse7V3ZXKKVmPYcHlRU+NqW/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKyg6v0yzD9M for ; Mon, 05 Jan 2026 16:49:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 245a9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:49:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3949c2b8c469 - main - release: Use make's `:H` rather than `/..` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3949c2b8c4691a6dff8be7b38805d56faab91187 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:49:31 +0000 Message-Id: <695beb9b.245a9.46da571c@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3949c2b8c4691a6dff8be7b38805d56faab91187 commit 3949c2b8c4691a6dff8be7b38805d56faab91187 Author: Ed Maste AuthorDate: 2025-12-26 16:36:43 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:49:04 +0000 release: Use make's `:H` rather than `/..` In general we want to strip subdir components, rather than appending `..`s. Reviewed by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54373 --- release/Makefile | 4 ++-- release/Makefile.vm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/release/Makefile b/release/Makefile index fc91b31df579..230eb66fc077 100644 --- a/release/Makefile +++ b/release/Makefile @@ -40,7 +40,7 @@ # TARGET/TARGET_ARCH: architecture of built release # -WORLDDIR?= ${.CURDIR}/.. +WORLDDIR?= ${.CURDIR:H} PORTSDIR?= /usr/ports .include "${WORLDDIR}/share/mk/bsd.compat.pre.mk" @@ -62,7 +62,7 @@ DISTDIR= dist # Define OSRELEASE by using newvers.sh .if !defined(OSRELEASE) || empty(OSRELEASE) .for _V in TYPE BRANCH REVISION -${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} +${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR:H}/sys/conf/newvers.sh); echo $$${_V} .endfor .for _V in ${TARGET_ARCH} .if !empty(TARGET:M${_V}) diff --git a/release/Makefile.vm b/release/Makefile.vm index 142fd6e7bdf5..3e5f4936b518 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -73,7 +73,7 @@ CLOUDWARE?= ${CLOUDWARE_GEN} .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) -${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} +${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR:H}/sys/conf/newvers.sh); echo $$${_V} . endif .endfor From nobody Mon Jan 5 17:15:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlLXW3My5z6MmJX for ; Mon, 05 Jan 2026 17:15: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlLXW2g4Zz44dV for ; Mon, 05 Jan 2026 17:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767633323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xMkELu5q9mq5dR1joBGfbgikuCFzdkQNTXZxgVq1awc=; b=cWpnLatmf0p3WLFaeKYDH95vNI4rBvyXyB4Q7vPqQ+nQfQPWlWfZrQxLoRcm/r59AT4Uwl S1qFA+xZ1U4vHtoqTNBqkFpuqU/hH3COGfvfhWW96qtxQAiuhU0mi1mBGeeIAtFW0PUsTp b7DPRS9vwUBsLBsWKVeZOiJnuJPNpZtfMSf/P/2pVRSNF+yf8N8Idx5VnRNA+ux28Q+dBb oKMV/VHj3tRippmpQiITRU4+ZPyiQumkqVWi4rrY5m4M2221VK3cTwn70hmFq6K6J9meGO WOnBfNblM3/p6Hb7crIofD6blpPF68V1Is4u4q8HJ88QHBxaG/pPS5BR09W9wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767633323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xMkELu5q9mq5dR1joBGfbgikuCFzdkQNTXZxgVq1awc=; b=IlgRN2q4j95k6s1OjJORsiWzFjV2Wg8h+2WX4IWmkNIIDitvz7leAVJhyr7NmbF3OD6rHZ XpcyNlyVIWnx90dbjAgPWMv/v292YxEq+XtgSHb6UV/IIJgAE+I/JH45RTjoO9FVnVjtFX oftHspAPNYogWrudoqeup9LOHVzjZLhCzlYksMYNTqPeJWtDxIMklNhpXMKxx9b197ZnPp R9W3Sm3KtXSHzKmg/WHen77TaVi10rJizGWA04odBqCc5RgA+LSva/Kk7wT+deAXIMh+ir RA2/Ju94QXtVQhNB/dlQFs56ZJuDpU2V4HJ6Bwm9oQzsimAxTyOTjFUuIl05OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767633323; a=rsa-sha256; cv=none; b=lW+nM5y3Hn0WOhvdVk5wmxieJO/jmJTFPICuQi4Q3IW8lyZvjh/7OzZHjZuaLZwv00p9ZU EywnD4NXYeYtk4h0YVimpS7U3hNbgz/gbhfC2NKKyB4OV3GL1DyoIUVowErLJ45pxWVeRt n917lDao8BxRp3LJBdFbyJzOlsXVff3C4MMwvxoMPHFjIPjM1cFutD0iBo9m5C7VVlhuqP K+hoacEWcG1mI1legqTvhWk5U0JvttHWlRmLUFEtwlIqr2NhL1EbTt9TLWTpz0G6vKz4Ml FImEPwNrp12XzjnwvSL0JRhhWTlAfESXRbH+5Xg86I6hHZofV+NGmvUFD3uWOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlLXW242KzV6y for ; Mon, 05 Jan 2026 17:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 274e1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 17:15:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 96156003ec0c - main - aq(4): Style, whitespace and misc cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96156003ec0c70de88a448d48d8e9bd37913589f Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 17:15:23 +0000 Message-Id: <695bf1ab.274e1.5ec2fc87@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=96156003ec0c70de88a448d48d8e9bd37913589f commit 96156003ec0c70de88a448d48d8e9bd37913589f Author: Ed Maste AuthorDate: 2025-11-19 15:34:25 +0000 Commit: Ed Maste CommitDate: 2026-01-05 17:15:06 +0000 aq(4): Style, whitespace and misc cleanup The compiled objects do not change other than a few diagnostic messages that include __LINE__. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54304 --- sys/dev/aq/aq_common.h | 26 +- sys/dev/aq/aq_dbg.c | 97 +- sys/dev/aq/aq_dbg.h | 38 +- sys/dev/aq/aq_device.h | 60 +- sys/dev/aq/aq_fw.c | 504 +++++----- sys/dev/aq/aq_fw.h | 35 +- sys/dev/aq/aq_fw1x.c | 399 ++++---- sys/dev/aq/aq_fw2x.c | 600 +++++------ sys/dev/aq/aq_hw.c | 1085 ++++++++++---------- sys/dev/aq/aq_hw.h | 242 ++--- sys/dev/aq/aq_hw_llh.c | 2120 ++++++++++++++++++++------------------- sys/dev/aq/aq_hw_llh.h | 873 ++++++++-------- sys/dev/aq/aq_hw_llh_internal.h | 2 +- sys/dev/aq/aq_irq.c | 94 +- sys/dev/aq/aq_main.c | 478 +++++---- sys/dev/aq/aq_media.c | 56 +- sys/dev/aq/aq_ring.c | 286 +++--- sys/dev/aq/aq_ring.h | 190 ++-- 18 files changed, 3721 insertions(+), 3464 deletions(-) diff --git a/sys/dev/aq/aq_common.h b/sys/dev/aq/aq_common.h index 5f52ce915bc5..af59ecf7af1e 100644 --- a/sys/dev/aq/aq_common.h +++ b/sys/dev/aq/aq_common.h @@ -37,14 +37,6 @@ #include -#define s8 __int8_t -#define u8 __uint8_t -#define u16 __uint16_t -#define s16 __int16_t -#define u32 __uint32_t -#define u64 __uint64_t -#define s64 __int64_t -#define s32 int #define ETIME ETIMEDOUT #define EOK 0 @@ -59,18 +51,18 @@ #endif #define AQ_HW_WAIT_FOR(_B_, _US_, _N_) \ - do { \ +do { \ unsigned int i; \ - for (i = _N_; (!(_B_)) && i; --i) { \ - usec_delay(_US_); \ - } \ - if (!i) { \ - err = -1; \ - } \ - } while (0) + for (i = _N_; (!(_B_)) && i; --i) { \ + usec_delay(_US_); \ + } \ + if (!i) { \ + err = -1; \ + } \ +} while (0) -#define LOWORD(a) ((u16)(a)) +#define LOWORD(a) ((uint16_t)(a)) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define AQ_VER "0.0.5" diff --git a/sys/dev/aq/aq_dbg.c b/sys/dev/aq/aq_dbg.c index 5340fc46a223..495991fafbdc 100644 --- a/sys/dev/aq/aq_dbg.c +++ b/sys/dev/aq/aq_dbg.c @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); const aq_debug_level dbg_level_ = lvl_detail; -const u32 dbg_categories_ = dbg_init | dbg_config | dbg_fw; +const uint32_t dbg_categories_ = dbg_init | dbg_config | dbg_fw; @@ -55,24 +55,25 @@ const u32 dbg_categories_ = dbg_init | dbg_config | dbg_fw; (BIT(BIT_BEGIN - BIT_END + 1) -1)) #define __field(TYPE, VAR) TYPE VAR; -void trace_aq_tx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]) +void +trace_aq_tx_descr(int ring_idx, unsigned int pointer, volatile uint64_t descr[2]) { #if AQ_CFG_DEBUG_LVL > 2 struct __entry{ __field(unsigned int, ring_idx) __field(unsigned int, pointer) /* Tx Descriptor */ - __field(u64, data_buf_addr) - __field(u32, pay_len) - __field(u8, ct_en) - __field(u8, ct_idx) - __field(u16, rsvd2) - __field(u8, tx_cmd) - __field(u8, eop) - __field(u8, dd) - __field(u16, buf_len) - __field(u8, rsvd1) - __field(u8, des_typ) + __field(uint64_t, data_buf_addr) + __field(uint32_t, pay_len) + __field(uint8_t, ct_en) + __field(uint8_t, ct_idx) + __field(uint16_t, rsvd2) + __field(uint8_t, tx_cmd) + __field(uint8_t, eop) + __field(uint8_t, dd) + __field(uint16_t, buf_len) + __field(uint8_t, rsvd1) + __field(uint8_t, des_typ) } entry; entry.ring_idx = ring_idx; @@ -98,27 +99,28 @@ void trace_aq_tx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2] #endif } -void trace_aq_rx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]) +void +trace_aq_rx_descr(int ring_idx, unsigned int pointer, volatile uint64_t descr[2]) { #if AQ_CFG_DEBUG_LVL > 2 - u8 dd; - u8 eop; - u8 rx_stat; - u8 rx_estat; - u8 rsc_cnt; - u16 pkt_len; - u16 next_desp; - u16 vlan_tag; - - u8 rss_type; - u8 pkt_type; - u8 rdm_err; - u8 avb_ts; - u8 rsvd; - u8 rx_cntl; - u8 sph; - u16 hdr_len; - u32 rss_hash; + uint8_t dd; + uint8_t eop; + uint8_t rx_stat; + uint8_t rx_estat; + uint8_t rsc_cnt; + uint16_t pkt_len; + uint16_t next_desp; + uint16_t vlan_tag; + + uint8_t rss_type; + uint8_t pkt_type; + uint8_t rdm_err; + uint8_t avb_ts; + uint8_t rsvd; + uint8_t rx_cntl; + uint8_t sph; + uint16_t hdr_len; + uint32_t rss_hash; rss_hash = DESCR_FIELD(descr[0], 63, 32); hdr_len = DESCR_FIELD(descr[0], 31, 22); @@ -149,24 +151,26 @@ void trace_aq_rx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2] #endif } -void trace_aq_tx_context_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]) +void +trace_aq_tx_context_descr(int ring_idx, unsigned int pointer, + volatile uint64_t descr[2]) { #if AQ_CFG_DEBUG_LVL > 2 struct __entry_s{ __field(unsigned int, ring_idx) __field(unsigned int, pointer) /* Tx Context Descriptor */ - __field(u16, out_len) - __field(u8, tun_len) - __field(u64, resvd3) - __field(u16, mss_len) - __field(u8, l4_len) - __field(u8, l3_len) - __field(u8, l2_len) - __field(u8, ct_cmd) - __field(u16, vlan_tag) - __field(u8, ct_idx) - __field(u8, des_typ) + __field(uint16_t, out_len) + __field(uint8_t, tun_len) + __field(uint64_t, resvd3) + __field(uint16_t, mss_len) + __field(uint8_t, l4_len) + __field(uint8_t, l3_len) + __field(uint8_t, l2_len) + __field(uint8_t, ct_cmd) + __field(uint16_t, vlan_tag) + __field(uint8_t, ct_idx) + __field(uint8_t, des_typ) } entry; struct __entry_s *__entry = &entry; __entry->ring_idx = ring_idx; @@ -192,7 +196,8 @@ void trace_aq_tx_context_descr(int ring_idx, unsigned int pointer, volatile u64 #endif } -void DumpHex(const void* data, size_t size) { +void +DumpHex(const void* data, size_t size) { #if AQ_CFG_DEBUG_LVL > 3 char ascii[17]; size_t i, j; @@ -234,4 +239,4 @@ void DumpHex(const void* data, size_t size) { } } #endif -} \ No newline at end of file +} diff --git a/sys/dev/aq/aq_dbg.h b/sys/dev/aq/aq_dbg.h index 8d02f483b2f7..d90a8599e085 100644 --- a/sys/dev/aq/aq_dbg.h +++ b/sys/dev/aq/aq_dbg.h @@ -38,8 +38,8 @@ #ifndef AQ_DBG_H #define AQ_DBG_H -#include #include +#include /* Debug levels: 0 - no debug @@ -78,10 +78,10 @@ Debug levels: #if AQ_CFG_DEBUG_LVL > 2 #define AQ_DBG_DUMP_DESC(desc) { \ - volatile u8 *raw = (volatile u8*)(desc); \ - printf( "07-00 %02X%02X%02X%02X %02X%02X%02X%02X 15-08 %02X%02X%02X%02X %02X%02X%02X%02X\n", \ - raw[7], raw[6], raw[5], raw[4], raw[3], raw[2], raw[1], raw[0], \ - raw[15], raw[14], raw[13], raw[12], raw[11], raw[10], raw[9], raw[8]); \ + volatile uint8_t *raw = (volatile uint8_t*)(desc); \ + printf( "07-00 %02X%02X%02X%02X %02X%02X%02X%02X 15-08 %02X%02X%02X%02X %02X%02X%02X%02X\n", \ + raw[7], raw[6], raw[5], raw[4], raw[3], raw[2], raw[1], raw[0], \ + raw[15], raw[14], raw[13], raw[12], raw[11], raw[10], raw[9], raw[8]); \ }\ #else @@ -90,27 +90,27 @@ Debug levels: typedef enum aq_debug_level { - lvl_error = LOG_ERR, - lvl_warn = LOG_WARNING, - lvl_trace = LOG_NOTICE, - lvl_detail = LOG_INFO, + lvl_error = LOG_ERR, + lvl_warn = LOG_WARNING, + lvl_trace = LOG_NOTICE, + lvl_detail = LOG_INFO, } aq_debug_level; typedef enum aq_debug_category { - dbg_init = 1, - dbg_config = 1 << 1, - dbg_tx = 1 << 2, - dbg_rx = 1 << 3, - dbg_intr = 1 << 4, - dbg_fw = 1 << 5, + dbg_init = 1, + dbg_config = 1 << 1, + dbg_tx = 1 << 2, + dbg_rx = 1 << 3, + dbg_intr = 1 << 4, + dbg_fw = 1 << 5, } aq_debug_category; #define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__) extern const aq_debug_level dbg_level_; -extern const u32 dbg_categories_; +extern const uint32_t dbg_categories_; #define log_base_(_lvl, _fmt, args...) printf( "atlantic: " _fmt "\n", ##args) @@ -130,9 +130,9 @@ extern const u32 dbg_categories_; #define trace(_cat, _fmt, args...) trace_base_(lvl_trace, _cat, _fmt, ##args) #define trace_detail(_cat, _fmt, args...) trace_base_(lvl_detail, _cat, _fmt, ##args) -void trace_aq_tx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]); -void trace_aq_rx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]); -void trace_aq_tx_context_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]); +void trace_aq_tx_descr(int ring_idx, unsigned int pointer, volatile uint64_t descr[2]); +void trace_aq_rx_descr(int ring_idx, unsigned int pointer, volatile uint64_t descr[2]); +void trace_aq_tx_context_descr(int ring_idx, unsigned int pointer, volatile uint64_t descr[2]); void DumpHex(const void* data, size_t size); #endif // AQ_DBG_H diff --git a/sys/dev/aq/aq_device.h b/sys/dev/aq/aq_device.h index 2c0d8df77cb9..2b170f710840 100644 --- a/sys/dev/aq/aq_device.h +++ b/sys/dev/aq/aq_device.h @@ -54,40 +54,40 @@ enum aq_media_type { AQ_LINK_10G ) struct aq_stats_s { - u64 prc; - u64 uprc; - u64 mprc; - u64 bprc; - u64 cprc; - u64 erpr; - u64 dpc; - u64 brc; - u64 ubrc; - u64 mbrc; - u64 bbrc; - - u64 ptc; - u64 uptc; - u64 mptc; - u64 bptc; - u64 erpt; - u64 btc; - u64 ubtc; - u64 mbtc; - u64 bbtc; + uint64_t prc; + uint64_t uprc; + uint64_t mprc; + uint64_t bprc; + uint64_t cprc; + uint64_t erpr; + uint64_t dpc; + uint64_t brc; + uint64_t ubrc; + uint64_t mbrc; + uint64_t bbrc; + + uint64_t ptc; + uint64_t uptc; + uint64_t mptc; + uint64_t bptc; + uint64_t erpt; + uint64_t btc; + uint64_t ubtc; + uint64_t mbtc; + uint64_t bbtc; }; enum aq_dev_state_e { - AQ_DEV_STATE_UNLOAD, - AQ_DEV_STATE_PCI_STOP, - AQ_DEV_STATE_DOWN, - AQ_DEV_STATE_UP, + AQ_DEV_STATE_UNLOAD, + AQ_DEV_STATE_PCI_STOP, + AQ_DEV_STATE_DOWN, + AQ_DEV_STATE_UP, }; struct aq_rx_filters { - unsigned int rule_cnt; - struct aq_rx_filter_vlan vlan_filters[AQ_HW_VLAN_MAX_FILTERS]; - struct aq_rx_filter_l2 etype_filters[AQ_HW_ETYPE_MAX_FILTERS]; + unsigned int rule_cnt; + struct aq_rx_filter_vlan vlan_filters[AQ_HW_VLAN_MAX_FILTERS]; + struct aq_rx_filter_l2 etype_filters[AQ_HW_ETYPE_MAX_FILTERS]; }; struct aq_vlan_tag { @@ -102,7 +102,7 @@ struct aq_dev { if_shared_ctx_t sctx; struct ifmedia * media; - struct aq_hw hw; + struct aq_hw hw; enum aq_media_type media_type; uint32_t link_speeds; @@ -142,7 +142,7 @@ int aq_update_hw_stats(aq_dev_t *aq_dev); void aq_initmedia(aq_dev_t *aq_dev); int aq_linkstat_isr(void *arg); int aq_isr_rx(void *arg); -void aq_mediastatus_update(aq_dev_t *aq_dev, u32 link_speed, const struct aq_hw_fc_info *fc_neg); +void aq_mediastatus_update(aq_dev_t *aq_dev, uint32_t link_speed, const struct aq_hw_fc_info *fc_neg); void aq_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr); int aq_mediachange(struct ifnet *ifp); void aq_if_update_admin_status(if_ctx_t ctx); diff --git a/sys/dev/aq/aq_fw.c b/sys/dev/aq/aq_fw.c index 3596074dbafc..fac720ba2327 100644 --- a/sys/dev/aq/aq_fw.c +++ b/sys/dev/aq/aq_fw.c @@ -55,10 +55,10 @@ __FBSDID("$FreeBSD$"); typedef enum aq_fw_bootloader_mode { - boot_mode_unknown = 0, - boot_mode_flb, - boot_mode_rbl_flash, - boot_mode_rbl_host_bootload, + boot_mode_unknown = 0, + boot_mode_flb, + boot_mode_rbl_flash, + boot_mode_rbl_host_bootload, } aq_fw_bootloader_mode; #define AQ_CFG_HOST_BOOT_DISABLE 0 @@ -67,22 +67,22 @@ typedef enum aq_fw_bootloader_mode #define MAC_FW_START_TIMEOUT_MS 10000 #define FW_LOADER_START_TIMEOUT_MS 10000 -const u32 NO_RESET_SCRATCHPAD_ADDRESS = 0; -const u32 NO_RESET_SCRATCHPAD_LEN_RES = 1; -const u32 NO_RESET_SCRATCHPAD_RBL_STATUS = 2; -const u32 NO_RESET_SCRATCHPAD_RBL_STATUS_2 = 3; -const u32 WRITE_DATA_COMPLETE = 0x55555555; -const u32 WRITE_DATA_CHUNK_DONE = 0xaaaaaaaa; -const u32 WRITE_DATA_FAIL_WRONG_ADDRESS = 0x66666666; +const uint32_t NO_RESET_SCRATCHPAD_ADDRESS = 0; +const uint32_t NO_RESET_SCRATCHPAD_LEN_RES = 1; +const uint32_t NO_RESET_SCRATCHPAD_RBL_STATUS = 2; +const uint32_t NO_RESET_SCRATCHPAD_RBL_STATUS_2 = 3; +const uint32_t WRITE_DATA_COMPLETE = 0x55555555; +const uint32_t WRITE_DATA_CHUNK_DONE = 0xaaaaaaaa; +const uint32_t WRITE_DATA_FAIL_WRONG_ADDRESS = 0x66666666; -const u32 WAIT_WRITE_TIMEOUT = 1; -const u32 WAIT_WRITE_TIMEOUT_COUNT = 1000; +const uint32_t WAIT_WRITE_TIMEOUT = 1; +const uint32_t WAIT_WRITE_TIMEOUT_COUNT = 1000; -const u32 RBL_STATUS_SUCCESS = 0xabba; -const u32 RBL_STATUS_FAILURE = 0xbad; -const u32 RBL_STATUS_HOST_BOOT = 0xf1a7; +const uint32_t RBL_STATUS_SUCCESS = 0xabba; +const uint32_t RBL_STATUS_FAILURE = 0xbad; +const uint32_t RBL_STATUS_HOST_BOOT = 0xf1a7; -const u32 SCRATCHPAD_FW_LOADER_STATUS = (0x40 / sizeof(u32)); +const uint32_t SCRATCHPAD_FW_LOADER_STATUS = (0x40 / sizeof(uint32_t)); extern struct aq_firmware_ops aq_fw1x_ops; @@ -95,258 +95,268 @@ int mac_soft_reset_rbl_(struct aq_hw* hw, aq_fw_bootloader_mode* mode); int wait_init_mac_firmware_(struct aq_hw* hw); -int aq_fw_reset(struct aq_hw* hw) +int +aq_fw_reset(struct aq_hw* hw) { - int ver = AQ_READ_REG(hw, 0x18); - u32 bootExitCode = 0; - int k; - - for (k = 0; k < 1000; ++k) { - u32 flbStatus = reg_glb_daisy_chain_status1_get(hw); - bootExitCode = AQ_READ_REG(hw, 0x388); - if (flbStatus != 0x06000000 || bootExitCode != 0) - break; - } - - if (k == 1000) { - aq_log_error("Neither RBL nor FLB started"); - return (-EBUSY); - } - - hw->rbl_enabled = bootExitCode != 0; - - trace(dbg_init, "RBL enabled = %d", hw->rbl_enabled); - - /* Having FW version 0 is an indicator that cold start - * is in progress. This means two things: - * 1) Driver have to wait for FW/HW to finish boot (500ms giveup) - * 2) Driver may skip reset sequence and save time. - */ - if (hw->fast_start_enabled && !ver) { - int err = wait_init_mac_firmware_(hw); - /* Skip reset as it just completed */ - if (!err) - return (0); - } - - aq_fw_bootloader_mode mode = boot_mode_unknown; - int err = mac_soft_reset_(hw, &mode); - if (err < 0) { - aq_log_error("MAC reset failed: %d", err); - return (err); - } - - switch (mode) { - case boot_mode_flb: - aq_log("FLB> F/W successfully loaded from flash."); - hw->flash_present = true; - return wait_init_mac_firmware_(hw); - - case boot_mode_rbl_flash: - aq_log("RBL> F/W loaded from flash. Host Bootload disabled."); - hw->flash_present = true; - return wait_init_mac_firmware_(hw); - - case boot_mode_unknown: - aq_log_error("F/W bootload error: unknown bootloader type"); - return (-ENOTSUP); - - case boot_mode_rbl_host_bootload: + int ver = AQ_READ_REG(hw, 0x18); + uint32_t bootExitCode = 0; + int k; + + for (k = 0; k < 1000; ++k) { + uint32_t flbStatus = reg_glb_daisy_chain_status1_get(hw); + bootExitCode = AQ_READ_REG(hw, 0x388); + if (flbStatus != 0x06000000 || bootExitCode != 0) + break; + } + + if (k == 1000) { + aq_log_error("Neither RBL nor FLB started"); + return (-EBUSY); + } + + hw->rbl_enabled = bootExitCode != 0; + + trace(dbg_init, "RBL enabled = %d", hw->rbl_enabled); + + /* Having FW version 0 is an indicator that cold start + * is in progress. This means two things: + * 1) Driver have to wait for FW/HW to finish boot (500ms giveup) + * 2) Driver may skip reset sequence and save time. + */ + if (hw->fast_start_enabled && !ver) { + int err = wait_init_mac_firmware_(hw); + /* Skip reset as it just completed */ + if (!err) + return (0); + } + + aq_fw_bootloader_mode mode = boot_mode_unknown; + int err = mac_soft_reset_(hw, &mode); + if (err < 0) { + aq_log_error("MAC reset failed: %d", err); + return (err); + } + + switch (mode) { + case boot_mode_flb: + aq_log("FLB> F/W successfully loaded from flash."); + hw->flash_present = true; + return wait_init_mac_firmware_(hw); + + case boot_mode_rbl_flash: + aq_log("RBL> F/W loaded from flash. Host Bootload disabled."); + hw->flash_present = true; + return wait_init_mac_firmware_(hw); + + case boot_mode_unknown: + aq_log_error("F/W bootload error: unknown bootloader type"); + return (-ENOTSUP); + + case boot_mode_rbl_host_bootload: #if AQ_CFG_HOST_BOOT_DISABLE - aq_log_error("RBL> Host Bootload mode: this driver does not support Host Boot"); - return (-ENOTSUP); + aq_log_error("RBL> Host Bootload mode: this driver does not support Host Boot"); + return (-ENOTSUP); #else - trace(dbg_init, "RBL> Host Bootload mode"); - break; + trace(dbg_init, "RBL> Host Bootload mode"); + break; #endif // HOST_BOOT_DISABLE - } + } - /* - * #todo: Host Boot - */ - aq_log_error("RBL> F/W Host Bootload not implemented"); + /* + * #todo: Host Boot + */ + aq_log_error("RBL> F/W Host Bootload not implemented"); - return (-ENOTSUP); + return (-ENOTSUP); } -int aq_fw_ops_init(struct aq_hw* hw) +int +aq_fw_ops_init(struct aq_hw* hw) { - if (hw->fw_version.raw == 0) - hw->fw_version.raw = AQ_READ_REG(hw, 0x18); - - aq_log("MAC F/W version is %d.%d.%d", - hw->fw_version.major_version, hw->fw_version.minor_version, - hw->fw_version.build_number); - - if (hw->fw_version.major_version == 1) { - trace(dbg_init, "using F/W ops v1.x"); - hw->fw_ops = &aq_fw1x_ops; - return (EOK); - } else if (hw->fw_version.major_version >= 2) { - trace(dbg_init, "using F/W ops v2.x"); - hw->fw_ops = &aq_fw2x_ops; - return (EOK); - } - - aq_log_error("aq_fw_ops_init(): invalid F/W version %#x", hw->fw_version.raw); - return (-ENOTSUP); + if (hw->fw_version.raw == 0) + hw->fw_version.raw = AQ_READ_REG(hw, 0x18); + + aq_log("MAC F/W version is %d.%d.%d", + hw->fw_version.major_version, hw->fw_version.minor_version, + hw->fw_version.build_number); + + if (hw->fw_version.major_version == 1) { + trace(dbg_init, "using F/W ops v1.x"); + hw->fw_ops = &aq_fw1x_ops; + return (EOK); + } else if (hw->fw_version.major_version >= 2) { + trace(dbg_init, "using F/W ops v2.x"); + hw->fw_ops = &aq_fw2x_ops; + return (EOK); + } + + aq_log_error("aq_fw_ops_init(): invalid F/W version %#x", + hw->fw_version.raw); + return (-ENOTSUP); } -int mac_soft_reset_(struct aq_hw* hw, aq_fw_bootloader_mode* mode /*= nullptr*/) +int +mac_soft_reset_(struct aq_hw* hw, aq_fw_bootloader_mode* mode /*= nullptr*/) { - if (hw->rbl_enabled) { - return mac_soft_reset_rbl_(hw, mode); - } else { - if (mode) - *mode = boot_mode_flb; - - return mac_soft_reset_flb_(hw); - } + if (hw->rbl_enabled) { + return mac_soft_reset_rbl_(hw, mode); + } else { + if (mode) + *mode = boot_mode_flb; + + return mac_soft_reset_flb_(hw); + } } -int mac_soft_reset_flb_(struct aq_hw* hw) +int +mac_soft_reset_flb_(struct aq_hw* hw) { - int k; - - reg_global_ctl2_set(hw, 0x40e1); - // Let Felicity hardware to complete SMBUS transaction before Global software reset. - msec_delay(50); - - /* - * If SPI burst transaction was interrupted(before running the script), global software - * reset may not clear SPI interface. Clean it up manually before global reset. - */ - reg_glb_nvr_provisioning2_set(hw, 0xa0); - reg_glb_nvr_interface1_set(hw, 0x9f); - reg_glb_nvr_interface1_set(hw, 0x809f); - msec_delay(50); - - reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); - - // Kickstart. - reg_global_ctl2_set(hw, 0x80e0); - reg_mif_power_gating_enable_control_set(hw, 0); - if (!hw->fast_start_enabled) - reg_glb_general_provisioning9_set(hw, 1); - - /* - * For the case SPI burst transaction was interrupted (by MCP reset above), - * wait until it is completed by hardware. - */ - msec_delay(50); // Sleep for 10 ms. - - /* MAC Kickstart */ - if (!hw->fast_start_enabled) { - reg_global_ctl2_set(hw, 0x180e0); - - u32 flb_status = 0; - int k; - for (k = 0; k < 1000; ++k) { - flb_status = reg_glb_daisy_chain_status1_get(hw) & 0x10; - if (flb_status != 0) - break; - msec_delay(10); // Sleep for 10 ms. - } - - if (flb_status == 0) { - trace_error(dbg_init, "FLB> MAC kickstart failed: timed out"); - return (false); - } - - trace(dbg_init, "FLB> MAC kickstart done, %d ms", k); - /* FW reset */ - reg_global_ctl2_set(hw, 0x80e0); - // Let Felicity hardware complete SMBUS transaction before Global software reset. - msec_delay(50); - } - reg_glb_cpu_sem_set(hw, 1, 0); - - // PHY Kickstart: #undone - - // Global software reset - rx_rx_reg_res_dis_set(hw, 0); - tx_tx_reg_res_dis_set(hw, 0); - mpi_tx_reg_res_dis_set(hw, 0); - reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); - - bool restart_completed = false; - for (k = 0; k < 1000; ++k) { - restart_completed = reg_glb_fw_image_id1_get(hw) != 0; - if (restart_completed) - break; - msec_delay(10); - } - - if (!restart_completed) { - trace_error(dbg_init, "FLB> Global Soft Reset failed"); - return (false); - } - - trace(dbg_init, "FLB> F/W restart: %d ms", k * 10); - return (true); + int k; + + reg_global_ctl2_set(hw, 0x40e1); + // Let Felicity hardware to complete SMBUS transaction before Global software reset. + msec_delay(50); + + /* + * If SPI burst transaction was interrupted(before running the script), global software + * reset may not clear SPI interface. Clean it up manually before global reset. + */ + reg_glb_nvr_provisioning2_set(hw, 0xa0); + reg_glb_nvr_interface1_set(hw, 0x9f); + reg_glb_nvr_interface1_set(hw, 0x809f); + msec_delay(50); + + reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); + + // Kickstart. + reg_global_ctl2_set(hw, 0x80e0); + reg_mif_power_gating_enable_control_set(hw, 0); + if (!hw->fast_start_enabled) + reg_glb_general_provisioning9_set(hw, 1); + + /* + * For the case SPI burst transaction was interrupted (by MCP reset above), + * wait until it is completed by hardware. + */ + msec_delay(50); // Sleep for 10 ms. + + /* MAC Kickstart */ + if (!hw->fast_start_enabled) { + reg_global_ctl2_set(hw, 0x180e0); + + uint32_t flb_status = 0; + int k; + for (k = 0; k < 1000; ++k) { + flb_status = reg_glb_daisy_chain_status1_get(hw) & 0x10; + if (flb_status != 0) + break; + msec_delay(10); // Sleep for 10 ms. + } + + if (flb_status == 0) { + trace_error(dbg_init, + "FLB> MAC kickstart failed: timed out"); + return (false); + } + + trace(dbg_init, "FLB> MAC kickstart done, %d ms", k); + /* FW reset */ + reg_global_ctl2_set(hw, 0x80e0); + // Let Felicity hardware complete SMBUS transaction before Global software reset. + msec_delay(50); + } + reg_glb_cpu_sem_set(hw, 1, 0); + + // PHY Kickstart: #undone + + // Global software reset + rx_rx_reg_res_dis_set(hw, 0); + tx_tx_reg_res_dis_set(hw, 0); + mpi_tx_reg_res_dis_set(hw, 0); + reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); + + bool restart_completed = false; + for (k = 0; k < 1000; ++k) { + restart_completed = reg_glb_fw_image_id1_get(hw) != 0; + if (restart_completed) + break; + msec_delay(10); + } + + if (!restart_completed) { + trace_error(dbg_init, "FLB> Global Soft Reset failed"); + return (false); + } + + trace(dbg_init, "FLB> F/W restart: %d ms", k * 10); + return (true); } -int mac_soft_reset_rbl_(struct aq_hw* hw, aq_fw_bootloader_mode* mode) +int +mac_soft_reset_rbl_(struct aq_hw* hw, aq_fw_bootloader_mode* mode) { - trace(dbg_init, "RBL> MAC reset STARTED!"); - - reg_global_ctl2_set(hw, 0x40e1); - reg_glb_cpu_sem_set(hw, 1, 0); - reg_mif_power_gating_enable_control_set(hw, 0); - - // MAC FW will reload PHY FW if 1E.1000.3 was cleaned - #undone - - reg_glb_cpu_no_reset_scratchpad_set(hw, 0xDEAD, NO_RESET_SCRATCHPAD_RBL_STATUS); - - // Global software reset - rx_rx_reg_res_dis_set(hw, 0); - tx_tx_reg_res_dis_set(hw, 0); - mpi_tx_reg_res_dis_set(hw, 0); - reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); - - reg_global_ctl2_set(hw, 0x40e0); - - // Wait for RBL to finish boot process. - u16 rbl_status = 0; - for (int k = 0; k < RBL_TIMEOUT_MS; ++k) { - rbl_status = LOWORD(reg_glb_cpu_no_reset_scratchpad_get(hw, NO_RESET_SCRATCHPAD_RBL_STATUS)); - if (rbl_status != 0 && rbl_status != 0xDEAD) - break; - - msec_delay(1); - } - - if (rbl_status == 0 || rbl_status == 0xDEAD) { - trace_error(dbg_init, "RBL> RBL restart failed: timeout"); - return (-EBUSY); - } - - if (rbl_status == RBL_STATUS_SUCCESS) { - if (mode) - *mode = boot_mode_rbl_flash; - trace(dbg_init, "RBL> reset complete! [Flash]"); - } else if (rbl_status == RBL_STATUS_HOST_BOOT) { - if (mode) - *mode = boot_mode_rbl_host_bootload; - trace(dbg_init, "RBL> reset complete! [Host Bootload]"); - } else { - trace_error(dbg_init, "unknown RBL status 0x%x", rbl_status); - return (-EBUSY); - } - - return (EOK); + trace(dbg_init, "RBL> MAC reset STARTED!"); + + reg_global_ctl2_set(hw, 0x40e1); + reg_glb_cpu_sem_set(hw, 1, 0); + reg_mif_power_gating_enable_control_set(hw, 0); + + // MAC FW will reload PHY FW if 1E.1000.3 was cleaned - #undone + + reg_glb_cpu_no_reset_scratchpad_set(hw, 0xDEAD, + NO_RESET_SCRATCHPAD_RBL_STATUS); + + // Global software reset + rx_rx_reg_res_dis_set(hw, 0); + tx_tx_reg_res_dis_set(hw, 0); + mpi_tx_reg_res_dis_set(hw, 0); + reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); + + reg_global_ctl2_set(hw, 0x40e0); + + // Wait for RBL to finish boot process. + uint16_t rbl_status = 0; + for (int k = 0; k < RBL_TIMEOUT_MS; ++k) { + rbl_status = LOWORD(reg_glb_cpu_no_reset_scratchpad_get(hw, NO_RESET_SCRATCHPAD_RBL_STATUS)); + if (rbl_status != 0 && rbl_status != 0xDEAD) + break; + + msec_delay(1); + } + + if (rbl_status == 0 || rbl_status == 0xDEAD) { + trace_error(dbg_init, "RBL> RBL restart failed: timeout"); + return (-EBUSY); + } + + if (rbl_status == RBL_STATUS_SUCCESS) { + if (mode) + *mode = boot_mode_rbl_flash; + trace(dbg_init, "RBL> reset complete! [Flash]"); + } else if (rbl_status == RBL_STATUS_HOST_BOOT) { + if (mode) + *mode = boot_mode_rbl_host_bootload; + trace(dbg_init, "RBL> reset complete! [Host Bootload]"); + } else { + trace_error(dbg_init, "unknown RBL status 0x%x", rbl_status); + return (-EBUSY); + } + + return (EOK); } -int wait_init_mac_firmware_(struct aq_hw* hw) +int +wait_init_mac_firmware_(struct aq_hw* hw) { - for (int i = 0; i < MAC_FW_START_TIMEOUT_MS; ++i) { - if ((hw->fw_version.raw = AQ_READ_REG(hw, 0x18)) != 0) - return (EOK); + for (int i = 0; i < MAC_FW_START_TIMEOUT_MS; ++i) { + if ((hw->fw_version.raw = AQ_READ_REG(hw, 0x18)) != 0) + return (EOK); - msec_delay(1); - } + msec_delay(1); + } - trace_error(dbg_init, "timeout waiting for reg 0x18. MAC f/w NOT READY"); - return (-EBUSY); + trace_error(dbg_init, + "timeout waiting for reg 0x18. MAC f/w NOT READY"); + return (-EBUSY); } diff --git a/sys/dev/aq/aq_fw.h b/sys/dev/aq/aq_fw.h index 7ffb60b29421..ea2c37b6c92c 100644 --- a/sys/dev/aq/aq_fw.h +++ b/sys/dev/aq/aq_fw.h @@ -38,35 +38,36 @@ struct aq_hw; typedef enum aq_fw_link_speed { - aq_fw_none = 0, - aq_fw_100M = (1 << 0), - aq_fw_1G = (1 << 1), - aq_fw_2G5 = (1 << 2), - aq_fw_5G = (1 << 3), - aq_fw_10G = (1 << 4), + aq_fw_none = 0, + aq_fw_100M = (1 << 0), + aq_fw_1G = (1 << 1), + aq_fw_2G5 = (1 << 2), + aq_fw_5G = (1 << 3), + aq_fw_10G = (1 << 4), } aq_fw_link_speed_t; *** 9485 LINES SKIPPED *** From nobody Mon Jan 5 17:27:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlLq26tJ3z6MnBs for ; Mon, 05 Jan 2026 17:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlLq269Dzz46D6 for ; Mon, 05 Jan 2026 17:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767634078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3VLjf9bgA7moGzsppf1tUSuuEQly7gIGWl5g9tu+foM=; b=Ac514u7Ung4uWhnFd6zyNWqGdTcWF11rk2EWujpvGdxKhpSAHznJNuELhk+jjAyoIx/cts 3NWjODo1fWP6VTBal66NvWdP0SH8cXvLlZTDteyHpFvY41q0Ye9OZIAk9wxSXmiap0ujtg l4w8cUs6DCEeegr7K5KOOi5dqYAO9JqJ8oB+iy1JnCwkhf0nImLkE6DBxe2RjREXcVwPM+ CAG1tjYi3UaelZ4rpKeN3jEm1ewy21mvbs+fu6xKgXoCIWodddwQfF/qzMsXDqDUORUwYc nb+uX0USVKpDNjgWSOELUqxXE5BstThRr4AjggTzyaXoL1bSy/RFqXgG+7Xvcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767634078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3VLjf9bgA7moGzsppf1tUSuuEQly7gIGWl5g9tu+foM=; b=RZSXkElysJ0g2GFMUYoe9o8IovzVBZ2sNizI95W/KxDQ4AzgM4rGBajxuQ55jr+jk8S3Lx Zciyii67U7Y5MTu5lTF3hj2fzVDSmD2H2FdMyRFaHDBC5XCoS+QXlgkdrDnk7fR/uTbAmg NFCzmBddWdxMrLzXr/m0PwtPcFMdWwqqW8aaVLN9l3xyqnbgbSgYYW1f/TA71vBe8JtAXk Tk3IhlzYmhj+9Gy8xrC5nb5cYbWDP0la0dkM9+ldI7KkRAVPO2OKJn0BlV6vz2d0d1E1MQ 9TXyrPGjYUalPO3SoEVJDaTfrAinwHqj5r0YS2315hJlE5azo/nWA7FYnCA4EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767634078; a=rsa-sha256; cv=none; b=i0IS9OtuALS/rBN58Ea1QDONoUzDKwqfINi9+14xABePSBbXfBioaWDf4mwVtkEPXm0wK9 wB+YJbg9gcrXxmPlvUPeEI96bmOOMzNCwRq9ClBO21aSY228YIu4kokuoZ0CTc47Bga9Gv C8Qmdff3L0MqYD2tyyGGFftmqNZuh1oFrSY8GG+IMuBzGrchyyC2vRYtuez3pj0T4eXgkC Ho3MSQTOopMWoU8ShMUg/pZTv3tgtr2BvnqeyVl60v7uqZrl2ULkR6Jiy/DS9bSwvcj9hT Lz91CUNs1riP1f4pmO6sIXmwsqZEMd66/10FBG7aK4xqmcxjR7AZNsTNLnfX3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlLq251yczVMf for ; Mon, 05 Jan 2026 17:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27547 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 17:27:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Marian Cingel From: Ed Maste Subject: git: 7359df79d3af - main - share/mk: Remove trailing '/' from debug info directories List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7359df79d3affeccf17f12f16c23ba3d4c5e0346 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 17:27:58 +0000 Message-Id: <695bf49e.27547.73c7d07f@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7359df79d3affeccf17f12f16c23ba3d4c5e0346 commit 7359df79d3affeccf17f12f16c23ba3d4c5e0346 Author: Marian Cingel AuthorDate: 2026-01-04 22:15:01 +0000 Commit: Ed Maste CommitDate: 2026-01-05 17:26:11 +0000 share/mk: Remove trailing '/' from debug info directories Signed-off-by: Marian Cingel Reviewed by: emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1947 --- share/mk/bsd.debug.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.debug.mk b/share/mk/bsd.debug.mk index 9f4dc5d90484..1c85d3f183a7 100644 --- a/share/mk/bsd.debug.mk +++ b/share/mk/bsd.debug.mk @@ -61,7 +61,7 @@ CTFFLAGS+= -g _debuginstall: .if ${MK_DEBUG_FILES} != "no" && defined(DEBUGFILE) .if defined(DEBUGMKDIR) - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR}/ + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR} .endif ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \ ${DEBUGFILE} ${DESTDIR}${DEBUGFILEDIR}/${DEBUGFILE} From nobody Mon Jan 5 17:59:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlMW022Ybz6MqQt for ; Mon, 05 Jan 2026 17:59: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlMVz6HQRz4BrN for ; Mon, 05 Jan 2026 17:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767635947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJcLvT7e7s+Emn+EAmpBlzs3Z6RB4nBb7YHXEuPRGgE=; b=KpUfw44JyCfBr+rTyeBuJkgI0dMzEfGZrgCsdTOWU2YLLR6HLSiaj9EFV2dE0cFieZqRNq jQjv9YTATT8eCbSSeIuUc2BSG3eF8mr9QGRepxwdLDRzJaX69ZoberbRhzAUM26EUKW3NG R3clXbxh1FA02556v51JqatF+tNe+MtxIAJsT27qmoWWh1rfgq3MvsfUh2dG0aXULMLAFv pnOwHocR8jWEB7q7OwNqUCzTEtH8597bhhBF8cky7uORVboAXVy0sUqmrSB0k+tas71F+1 912FcjDhz4TS8dtsOClC01N59Lk50X9i9vsN1HZXybBnEkbLtFazs5w3cKez6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767635947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJcLvT7e7s+Emn+EAmpBlzs3Z6RB4nBb7YHXEuPRGgE=; b=THBDHLJTOhonycSxmX76m7HMFXJMJVabGzgPjKG4Nr6UUAcWhRpXfSxdkOQYq/bv+gce4X 8CUv9FV0RWxVNVcORA0UikQXW0XKtX9grp7ifiaIexSNCvZ2ek3IDoEyiWxwsEqtu5qQ+n 8GJs8vyUHEWsqCSAcub3S3tPkzgvQ18fa3OUT64Q7IXobyn4X4vQ37oLLmsyW5dVBM7G7U j+cxcVN1nqTLDnjPkNpZqQxaMey/PxqM8jWyyOsjyBIG9sFniopTUfBXfCXpgq5cYHHlrz ejxa5Ie6vmgohU6PTjdZKLjwmCHecSy/zKXlvacQhhSNo7Rl4FDiL9rpxmHLuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767635947; a=rsa-sha256; cv=none; b=YSG6Nngvia2L29yVmvCdZEh+z6Y0McPChTihm3m1+SZvWtX7VK2nCP+9oPQpSz98oLkzoO bUqcKzop1Kt2k3jwXHJO3X5sD6nIAnI22IlloW0255bzYWUxpdRj7zW9nS8Ug3fAzeFjMd r244zvkbl4o2DiJpZ4fAtq5WBxZSAUswpSDssXWEX+ezmI1ZBHIGJ+UOrbYdlJMnKnm1UZ hQW9bWAIFtWXfUXr4KnZOIYVN5QKzNjt14BN6XTWPMW3vdXJapbxFIBjXnGD8GLUR0+S5C Fberq30wA2e3ZW/7MbKhgn2sTSL0/f1DTfBNlH2YbXwIjCwU0CVlBNqfQoWRbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlMVz5GLtzWH6 for ; Mon, 05 Jan 2026 17:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32a44 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 17:59:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 89c017d06870 - main - Makefile.inc1: Allow safe installkernel with pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89c017d068704c2bc3da9cb22f43da17a9ce8c24 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 17:59:07 +0000 Message-Id: <695bfbeb.32a44.fb6c48b@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=89c017d068704c2bc3da9cb22f43da17a9ce8c24 commit 89c017d068704c2bc3da9cb22f43da17a9ce8c24 Author: Lexi Winter AuthorDate: 2026-01-05 17:39:47 +0000 Commit: Lexi Winter CommitDate: 2026-01-05 17:39:47 +0000 Makefile.inc1: Allow safe installkernel with pkgbase Commit 74a6bb524e5b added a check to install{world,kernel} to avoid people accidentally running this on pkgbase systems and leaving their system broken. This had two issues: (1) The warning was not sufficiently scary, leading people to think this was safe to do as long as they set DESTDIR=/. (2) The installkernel check was too strict, and prevented installing kernels that don't conflict with packaged kernels. Fix (1) by rewording the warning to be scarier, and while here, add two new variables (ALLOW_PKGBASE_INSTALL{WORLD,KERNEL}) which could be set in /etc/make.conf for people who want to break their systems by default. Fix (2) by improving the installkernel check to see if the kernel(s) we're actually installing are packaged. This means a new kernel can be installed to /boot/kernel as long as there's no packaged kernel installed there. This check understands INSTKERNNAME, so if there is a packaged kernel in /boot/kernel, the new kernel can still be installed using INSTKERNNAME=testkernel (or whatever). MFC after: 2 weeks Reported by: christos, jhb, others Reviewed by: emaste, christos (previous version) Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D54346 --- Makefile.inc1 | 83 +++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 22 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index a6181b78125b..b8f59686784d 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1356,28 +1356,6 @@ __installcheck_DESTDIR: .PHONY .endif .endif -# -# Don't allow installworld or installkernel on a pkgbase system. This avoids -# accidentally updating a pkgbase system with install{world,kernel}, causing -# the installed system to become out of date with the package database. -# -# Skip the check if DESTDIR is defined on the assumption the user knows what -# they're doing. This means the check can be disabled for the running system -# using DESTDIR=/. -# -.if !make(distributeworld) && !defined(DESTDIR) -_installcheck_world: __installcheck_PKG -_installcheck_kernel: __installcheck_PKG -__installcheck_PKG: .PHONY -.if exists(${LOCALBASE}/sbin/pkg-static) - @if ${LOCALBASE}/sbin/pkg-static info -e ${PKG_NAME_PREFIX}-runtime; then \ - echo >&2 "ERROR: This target should not be used on a system installed from packages." ; \ - echo >&2 " To override this check, set DESTDIR=/."; \ - false; \ - fi -.endif -.endif - .if !defined(DB_FROM_SRC) # # Check for missing UIDs/GIDs. @@ -1873,6 +1851,67 @@ INSTALLEXTRAKERNELS= ${BUILDKERNELS:[2..-1]} .endif .endif +# +# Don't allow installworld or installkernel on a pkgbase system. This avoids +# accidentally updating a pkgbase system with install{world,kernel}, causing +# the installed system to become out of date with the package database. +# +# Skip the check if DESTDIR is defined on the assumption the user knows what +# they're doing. This means the check can be disabled for the running system +# using DESTDIR=/. +# +# People who want to disable this check permanently may set two variables in +# /etc/make.conf, ALLOW_PKGBASE_INSTALLKERNEL and ALLOW_PKGBASE_INSTALLWORLD, +# to disable these checks. That doesn't stop this from breaking your system, +# it just stops make from warning about it. +# +.if !make(distributeworld) && !defined(DESTDIR) + +. if !defined(ALLOW_PKGBASE_INSTALLKERNEL) && exists(${LOCALBASE}/sbin/pkg-static) +# For installkernel, we check if this specific kernel was installed by pkg. +# This means people can continue to use installkernel for non-packaged +# kernels, which is useful for development. + +_installcheck_kernel: __installcheck_kernel_pkgbase +__installcheck_kernel_pkgbase: .PHONY +. for _kernel in ${NO_INSTALLKERNEL:D:U${INSTKERNNAME}} \ + ${INSTALLEXTRAKERNELS:S/^/${INSTKERNNAME}./} + @if ${LOCALBASE}/sbin/pkg-static which /boot/${_kernel}/kernel \ + >/dev/null 2>&1; then \ + echo >&2 "ERROR: The kernel at /boot/${_kernel} was installed from packages." ; \ + echo >&2 " A packaged kernel should never be updated using installkernel;" ; \ + echo >&2 " this will cause the package database to become out of sync with" ; \ + echo >&2 " the live system state. Either uninstall the packaged kernel," ; \ + echo >&2 " or install this kernel to a different path using INSTKERNNAME." ; \ + echo >&2 "" ; \ + echo >&2 " If you understand the risks and wish to proceed anyway, you may" ; \ + echo >&2 " set ALLOW_PKGBASE_INSTALLKERNEL=yes to override this safety check." ; \ + echo >&2 " After doing so, you should not use the pkg(8) utility until you" ; \ + echo >&2 " have resolved the inconsistency between the installed system and" ; \ + echo >&2 " the package database." ; \ + false; \ + fi +. endfor +. endif # !defined(ALLOW_PKGBASE_INSTALLKERNEL) && exists(pkg-static) + +. if !defined(ALLOW_PKGBASE_INSTALLWORLD) && exists(${LOCALBASE}/sbin/pkg-static) +_installcheck_world: __installcheck_world_pkgbase +__installcheck_world_pkgbase: .PHONY + @if ${LOCALBASE}/sbin/pkg-static info -e ${PKG_NAME_PREFIX}-runtime; then \ + echo >&2 "ERROR: This target should never be used on a system installed from packages;" ; \ + echo >&2 " doing so will cause the package database to become out of sync with" ; \ + echo >&2 " the live system state." ; \ + echo >&2 "" ; \ + echo >&2 " If you understand the risks and wish to proceed anyway, you may" ; \ + echo >&2 " set ALLOW_PKGBASE_INSTALLWORLD=yes to override this safety check." ; \ + echo >&2 " After doing so, you should not use the pkg(8) utility until you" ; \ + echo >&2 " have resolved the inconsistency between the installed system and" ; \ + echo >&2 " the package database." ; \ + false; \ + fi +. endif # !defined(ALLOW_PKGBASE_INSTALLWORLD) && exists(pkg-static) +.endif # !make(distributeworld) && !defined(DESTDIR) + # # installkernel, etc. # From nobody Mon Jan 5 18:03:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlMby0mwjz6Mqpt for ; Mon, 05 Jan 2026 18:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlMby03t0z4D4q for ; Mon, 05 Jan 2026 18:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767636206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uAnydi28zerURpej4haMrXCyOP2KT4FNcRwrZf4d+o4=; b=bnuv6NFrA7z3XmsXejJwH2Kn04p+hdInNubo66hhjD3TAKelSqt6NykptrhuQZGKgF+MSM /Ac368icPor979QmDD7z+9vXn0pxB6IjMDWv8iGddvdQGplskxtDRn9qVpyq/5g0ZBcGaW 0eJbXg3veXO4evxZknkjaxBzP6aD1CbgIJHkP5WKjNqn0vN3JwVfW8pJNpMn/fHtyhnhht tjomF80tXlTQRKbH2WjPl2PkMvHZ7PiiggQocZJ6Q/0aMJNw8bkZQH4qzqwCH5HkLUbPH8 HM/ek+GG56IaqU0PIP5oKay/AqqEQnXAoyzxis8W6Iu5GCU/G9XUOvvngCe6EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767636206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uAnydi28zerURpej4haMrXCyOP2KT4FNcRwrZf4d+o4=; b=j5EZP/l1P0Xwsm2iG997rr+/L2TyWPobSu/eZVhj99BoCh08MFwRSEU1w/x7d4OBVyS5Ps 8VoXZVHhfRJRNVtjioDquUZG+oP770VOzNAwveMTZHLNb6eMi0+axTdioWWINlagUsLLEF MJ+JSSp/hravCuS6K9LiyVMv1AHIeYvYUcHIh+AS1xPrK2LF+mcb1F3vwTcqkqjn6h4Wjp iyryadZfxLdZiL1ydgddhf0X8rSmQTEgkfoLOXU86JbaSB1j3ifoVttPupPnKLTc1bJQ+T R9UzucdeYqhggRuNXuXJ85sVFIMyYkYqQ9VUiTKnVCuBR2db5rftTwHWLOjP2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767636206; a=rsa-sha256; cv=none; b=GhNEmBdVaRQmUpn7dOmhzyTW2ez4ox/9TnIDX9GyZfQM5ELiCphI7/2ISa/K6gqrwBcdmo Y5ZNcQ1x4O/fESmnFv2GutkzO0BreSgCl9+auOYgZF/YCkPDIBZEferyGrxH1sKHLFUeNG oiAH96Ewbu15dXrEK5ei+sv7xY6vg0m/MWOtPavncc1PJTOJwHxLrK3saFa85wuDTE6bS4 O1wJD6JwK5Q5o3BJk0pPFQesl55e8hzZZb6/+U6hm6ELAyxVLXnVF9gzNxC6lIuF2EfxdL 5g+2hMHAPqW3vwrtWSsMIoBaSnqUgSbuUWaEkaGcoj8ASj4IM8S1y95hBOmh0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlMbx6b7dzXMJ for ; Mon, 05 Jan 2026 18:03:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3372d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 18:03:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e4e30d5a8136 - main - ipfw: remove extraneous argument from ipfw_add_protected_rule() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4e30d5a81367b96dc8255252b527d6a65bb43b3 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 18:03:25 +0000 Message-Id: <695bfced.3372d.5531791d@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e4e30d5a81367b96dc8255252b527d6a65bb43b3 commit e4e30d5a81367b96dc8255252b527d6a65bb43b3 Author: Gleb Smirnoff AuthorDate: 2026-01-05 18:03:10 +0000 Commit: Gleb Smirnoff CommitDate: 2026-01-05 18:03:10 +0000 ipfw: remove extraneous argument from ipfw_add_protected_rule() This function is always called with unlocked IPFW_UH_LOCK. --- sys/netpfil/ipfw/ip_fw2.c | 2 +- sys/netpfil/ipfw/ip_fw_dynamic.c | 2 +- sys/netpfil/ipfw/ip_fw_private.h | 3 +-- sys/netpfil/ipfw/ip_fw_sockopt.c | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index c27b6bc274fb..4e13e6e55f1d 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -3692,7 +3692,7 @@ vnet_ipfw_init(const void *unused) rule->cmd[0].len = 1; rule->cmd[0].opcode = default_to_accept ? O_ACCEPT : O_DENY; chain->default_rule = rule; - ipfw_add_protected_rule(chain, rule, 0); + ipfw_add_protected_rule(chain, rule); ipfw_eaction_init(chain, first); ipfw_init_skipto_cache(chain); diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c index cfb686594c7c..34e4e638e65a 100644 --- a/sys/netpfil/ipfw/ip_fw_dynamic.c +++ b/sys/netpfil/ipfw/ip_fw_dynamic.c @@ -3175,7 +3175,7 @@ dyn_add_protected_rule(struct ip_fw_chain *chain) cmd->opcode = O_COUNT; rule->act_ofs = cmd - rule->cmd; rule->cmd_len = rule->act_ofs + 1; - ipfw_add_protected_rule(chain, rule, 0); + ipfw_add_protected_rule(chain, rule); } void diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h index c60b7aa47e94..32ae54581833 100644 --- a/sys/netpfil/ipfw/ip_fw_private.h +++ b/sys/netpfil/ipfw/ip_fw_private.h @@ -646,8 +646,7 @@ void ipfw_destroy_skipto_cache(struct ip_fw_chain *chain); void ipfw_enable_skipto_cache(struct ip_fw_chain *chain); int ipfw_find_rule(struct ip_fw_chain *chain, uint32_t key, uint32_t id); int ipfw_ctl3(struct sockopt *sopt); -int ipfw_add_protected_rule(struct ip_fw_chain *chain, struct ip_fw *rule, - int locked); +int ipfw_add_protected_rule(struct ip_fw_chain *chain, struct ip_fw *rule); void ipfw_reap_add(struct ip_fw_chain *chain, struct ip_fw **head, struct ip_fw *rule); void ipfw_reap_rules(struct ip_fw *head); diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c index a91fb2e84da9..2126c3e1c8a6 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -568,12 +568,11 @@ ipfw_commit_rules(struct ip_fw_chain *chain, struct rule_check_info *rci, } int -ipfw_add_protected_rule(struct ip_fw_chain *chain, struct ip_fw *rule, - int locked) +ipfw_add_protected_rule(struct ip_fw_chain *chain, struct ip_fw *rule) { struct ip_fw **map; - map = get_map(chain, 1, locked); + map = get_map(chain, 1, 0); if (map == NULL) return (ENOMEM); if (chain->n_rules > 0) From nobody Mon Jan 5 18:03:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlMbz3LfHz6Mqgy for ; Mon, 05 Jan 2026 18:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlMbz0knTz4CWH for ; Mon, 05 Jan 2026 18:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767636207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ZeyfOUgXKIqUie39+/V5TfSfhROHPncb0EBEFFagB4=; b=e90CPAbEjWYUSBd3+UUfbLrLd63AZnh62Ac4/8PbWOSVXZfOceKM/6zRZ8o/Wlr3mYvYmn 1czmIVBaWnTMBZxuEzdrXV4cSlOBn0p4BrmxC/gG8tMh9xLvYnOzO1KeRceXiZ+qMi2mX8 lrUKkz60rtct2uvQg/YBz1uS7qsglc/P6Gnrx0WOuZwH8Uc0lKFI9SMeYyB1NYYYWsCs1d 6HXV/h9Uxi4XcGaGLyTgTS+6nF+k6nW+LrY/NhD/FwfDlNeu4IY1cugWgnr2v6Rb/yWiWj nwESmuNOCph3fyHSDA4PdQPPIilidURCgdnxjfRO6+2WLfmqWU8RWJr+RGqeDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767636207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ZeyfOUgXKIqUie39+/V5TfSfhROHPncb0EBEFFagB4=; b=fUcIDcclF5puZRYJ9E4kNv0sqRN8kIs7E3HW4jdT63RJap3X8/6AMRnBKjs92EN2Y1Dc0U gKdggAzybMs8ihlGRONZsT0ieteIdqPj2BD6ibB45qyi+MamSfq2lb/n8sXl+ZA2KZp3K7 T90zXkY7f4IJ7qlMFEQNDpSi3AI7BdTLrMgS2VODKMXHB++3/GdEeqS+GqfPpYAOvbW/sN KR7T7vTXb1JI68A4ork1YX5ZhYPNgDL2AwuHwISyyBncuVI3kn6HTOnA99mauBCA2eABNi J9AgZQlUe21CzRugF6WCHqB4HhbODux7xkE4jowGLhUT+lfvxsmgVBBX/102vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767636207; a=rsa-sha256; cv=none; b=xTXlhR3reB7pat6v97ne6xj1DDvICl/LFwB/nggVOlVcCVRxaKuKGFBy5x3npYCF7SeaCB l4M5/ZCNzd5tb52shHCTqHylR4U6hxSs9sODTE9CTNKS/WahTs1WEtCyHm43i/N8hH52Z+ gSoD8I44Lq+9UqhFpNn34W8jFfKpxjlUtRD64ArK4M/wyZy4CTkPkRxQg1hf2F6N7UQTi+ PTe/bHeHEQkXr9h150CUHm4hpubKwrLNcrWNdqe/2JYY2bERSWHXsVe9R+lDFEfZ1rlsZZ Il1i5vdlBj+iZzFOwYcsWtIabYZWQIFtLJy38GJklg2QHDg2luFAF2FpiXdhZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlMbz0HlHzXMK for ; Mon, 05 Jan 2026 18:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33cb9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 18:03:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: bc9c45df1c29 - main - ipfw: use sparse initializer for dynamic opcodes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc9c45df1c29370e7bffd813987c08b2f6444b5d Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 18:03:27 +0000 Message-Id: <695bfcef.33cb9.7de98036@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=bc9c45df1c29370e7bffd813987c08b2f6444b5d commit bc9c45df1c29370e7bffd813987c08b2f6444b5d Author: Gleb Smirnoff AuthorDate: 2026-01-05 18:03:10 +0000 Commit: Gleb Smirnoff CommitDate: 2026-01-05 18:03:10 +0000 ipfw: use sparse initializer for dynamic opcodes No functional change. --- sys/netpfil/ipfw/ip_fw_dynamic.c | 48 ++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c index 34e4e638e65a..d454024ac5cb 100644 --- a/sys/netpfil/ipfw/ip_fw_dynamic.c +++ b/sys/netpfil/ipfw/ip_fw_dynamic.c @@ -734,28 +734,44 @@ dyn_destroy(struct ip_fw_chain *ch, struct named_object *no) static struct opcode_obj_rewrite dyn_opcodes[] = { { - O_KEEP_STATE, IPFW_TLV_STATE_NAME, - dyn_classify, dyn_update, - dyn_findbyname, dyn_findbykidx, - dyn_create, dyn_destroy + .opcode = O_KEEP_STATE, + .etlv = IPFW_TLV_STATE_NAME, + .classifier = dyn_classify, + .update = dyn_update, + .find_byname = dyn_findbyname, + .find_bykidx = dyn_findbykidx, + .create_object = dyn_create, + .destroy_object = dyn_destroy, }, { - O_CHECK_STATE, IPFW_TLV_STATE_NAME, - dyn_classify, dyn_update, - dyn_findbyname, dyn_findbykidx, - dyn_create, dyn_destroy + .opcode = O_CHECK_STATE, + .etlv = IPFW_TLV_STATE_NAME, + .classifier = dyn_classify, + .update = dyn_update, + .find_byname = dyn_findbyname, + .find_bykidx = dyn_findbykidx, + .create_object = dyn_create, + .destroy_object = dyn_destroy, }, { - O_PROBE_STATE, IPFW_TLV_STATE_NAME, - dyn_classify, dyn_update, - dyn_findbyname, dyn_findbykidx, - dyn_create, dyn_destroy + .opcode = O_PROBE_STATE, + .etlv = IPFW_TLV_STATE_NAME, + .classifier = dyn_classify, + .update = dyn_update, + .find_byname = dyn_findbyname, + .find_bykidx = dyn_findbykidx, + .create_object = dyn_create, + .destroy_object = dyn_destroy, }, { - O_LIMIT, IPFW_TLV_STATE_NAME, - dyn_classify, dyn_update, - dyn_findbyname, dyn_findbykidx, - dyn_create, dyn_destroy + .opcode = O_LIMIT, + .etlv = IPFW_TLV_STATE_NAME, + .classifier = dyn_classify, + .update = dyn_update, + .find_byname = dyn_findbyname, + .find_bykidx = dyn_findbykidx, + .create_object = dyn_create, + .destroy_object = dyn_destroy, }, }; From nobody Mon Jan 5 18:03:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlMc04glzz6MqN0 for ; Mon, 05 Jan 2026 18:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlMc01NHRz4Cjt for ; Mon, 05 Jan 2026 18:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767636208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OttD/BG2x7j0yLxRefBzAy0uJ/2imHTFAnwyfDQRc8U=; b=bZx7160Btk6f0TUaIuT73zRt3XNj/hYtGrM08No88+4Dgy7JBbsTJcGdV5iuBCSbF9/ZPd He3mn3KfSkr+jq78UXQVIAN2HoLDc1g4hztnJ1e4NXC0sH0CaoR1LuomATlVUw1ug9mAR8 wkdAaisU3+9YZ0uj37Nwxezhjprt7XPTgPgBnH25I7Jvhg5PgsLwntN+foxTYZGlPS423x dLw2lI4uWIkHmC5QhOxRvtvxEiBgyhd+PCig+Nh6ylo+yQnsjZngquGRCQH/KStsP5np2r txhiP7nPSYgYJZv0wgfRrl61rfpfCMqqX36TXd/isnmM7biYVvJmbDQBF8R8aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767636208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OttD/BG2x7j0yLxRefBzAy0uJ/2imHTFAnwyfDQRc8U=; b=SnjfJ2EpvRDeaGA7dgIs0mrT99e0dhXKWtyRXFVp+Jfw/hUc708hRlCdd5sJG0d2sy1ANo Y0s+vYYwbvZZAJw/dfwZXJBIXSBDb3g9Kum1CYLJfCgFTMRfxtnI7RlRpyhdGw089Qvbfh C1VWpm14blnl0aA6UPqBiirKsczf3KpnxLIHQ4aWeylKKLRZaN4VYnvOBxnRzRxjBgBaCD z9lBV8aZcdRIVmAvX+b6mhgwblpIxMNiOxX0kt38dXs4prTUsVjO/vhAVhJM4QLPtAt3y3 dZz0Fvn6lM5CtIL0AdvZ3eETwhig2KL+oyGPYf8vM1hRY0xWUtW4rwlhKaC/0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767636208; a=rsa-sha256; cv=none; b=WwUZf5or2wWZ9Q4aIfXFYUpEj6vWXU7gpcVvs0E2oNGYLqoM7ki5+cs4ryBjtsL/ttZYug AAwnBVHl+H2Zr6f/NovEp9v6Fk7jUSiXwdWcSlN2Dt8X95XOKSkfpDxrnQy4+pSWeZTrW0 5Oe/tEMafAlOrDVp1s/spMhVknh4v6mLv3EB9rorFumqnbrvbmOt2uIcq5BKKZwOqVZ+VP iab1hHlhhsBGmUSbHKBGgURp/3Red0J5J/akDjO1Wkx5qLph+G5fMVsI0Hm80D3m2H0Zeb 4hMGaPW4hxL4PHWcyoWaW/K55kOuZSdCfIWlWcsj2xaRqaW2uu1blY1AyrmeKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlMc00nSQzWql for ; Mon, 05 Jan 2026 18:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35230 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 18:03:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 161db3a910a4 - main - ipfw: make create_objects_compat() static List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 161db3a910a41dfae0eea93f49b08eb7e6253617 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 18:03:28 +0000 Message-Id: <695bfcf0.35230.55b23d2b@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=161db3a910a41dfae0eea93f49b08eb7e6253617 commit 161db3a910a41dfae0eea93f49b08eb7e6253617 Author: Gleb Smirnoff AuthorDate: 2026-01-05 18:03:10 +0000 Commit: Gleb Smirnoff CommitDate: 2026-01-05 18:03:10 +0000 ipfw: make create_objects_compat() static No functional change. --- sys/netpfil/ipfw/ip_fw_private.h | 2 -- sys/netpfil/ipfw/ip_fw_sockopt.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h index 32ae54581833..582bdf8b1c2c 100644 --- a/sys/netpfil/ipfw/ip_fw_private.h +++ b/sys/netpfil/ipfw/ip_fw_private.h @@ -740,8 +740,6 @@ void ipfw_destroy_obj_rewriter(void); void ipfw_add_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count); int ipfw_del_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count); -int create_objects_compat(struct ip_fw_chain *ch, ipfw_insn *cmd, - struct obj_idx *oib, struct obj_idx *pidx, struct tid_info *ti); void update_opcode_kidx(ipfw_insn *cmd, uint32_t idx); int classify_opcode_kidx(ipfw_insn *cmd, uint32_t *puidx); void ipfw_init_srv(struct ip_fw_chain *ch); diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c index 2126c3e1c8a6..4e87865e966e 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -2035,7 +2035,7 @@ ipfw_check_object_name_generic(const char *name) * * Return 0 on success. */ -int +static int create_objects_compat(struct ip_fw_chain *ch, ipfw_insn *cmd, struct obj_idx *oib, struct obj_idx *pidx, struct tid_info *ti) { From nobody Mon Jan 5 18:26:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlN6Z1KK7z6Ms1G for ; Mon, 05 Jan 2026 18:26: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlN6Y5PXBz4HSw for ; Mon, 05 Jan 2026 18:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767637589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzO3jWoAA562iHSfMMZr4FHyc3zieBg+4ClFbfdAiJU=; b=jIZnDIOSxYbOSeurkhBL0ye4aWmjSF1RhjDgJ0I30nnwtcnEVUNWQG6mbPK2WBkQgnlWnn o7qOOfRhL0pWuFTQns0saj42cMGqgapqQBPDCKyarOF/k2bGqwLiWHa9xRnB2ZMx4yaHR9 ZbsXZvYbleOBs3XG5D9recNTD5zNkKZCYYMIOUcWFOHcmM+JRyRUGu+6TZp281+K3+M1OY iO4HQ6sTc4Nv2kETdNSXw9VuvnDGScwdZ/BcoWGfy1ra41ZSfDYURKkpz/gukGXJLCSjhk nCZIgmaU3NN1eJ9vg7h4YZKKr+0WT1DtNPQkYo35gI3bDVpUFEMV9RzRbgunXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767637589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzO3jWoAA562iHSfMMZr4FHyc3zieBg+4ClFbfdAiJU=; b=C2Ukx/CwdQxzAh7X1h2mqE+isRyYtGktJBF+/23mjBdfiR8H2lE+fta9F6l1x9ufGVSBXk CNMogs1heDhdQNDqAo/NJUp2rxirAWKN9PgqWVBo3Xug7AyAz4iHWPgXWix7U0+l73/JUv CVVjc8+hzIajLZam5v8WcdnRSsS8LoxDRfjjcGB4YdFQbozRiuBcR4mlQLQRkhymAkX8s3 Pr4yQIHOBZ2tqiYCtAX4doM37o7HbdTM9mmTHTGzAEUhPFVdrelIDZXddhBOyI/m+bN147 q9NI3PNJM9qwWKyHmf7oVpPVpMJwZ6mp2txcC/HZZKxAgNUDaP9AGesn+U3sDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767637589; a=rsa-sha256; cv=none; b=wXxITYnF921H0CB7IjfEJYO+ZHHzDG1M8GuW2mlv9Wx+CxDncfjBDJSYXfXS0NU1Sfn5zE fv/0hEx+z3VrHWaaGSp6OwZjBZCY6evygNibNZP0FYuHxQ7ALcKvy6LjFttx5frzXG3xfQ /zdaKhKoV8i1c2cLxpHAyY8X/w46QU5DkE7nw6onNLOGgTE0EoilbPrVRyjTqinzwCv6Ua UvheyZq/wBnJ3wn/aCmIlDPWBT2+JkQiSLZekQRM3Mo2XSp8tqWHTJPG8Bm6TMivA+2YtH 4NaoCYYJv1zItJsYLPsq04Rbzd6u4h7OD9jBpuSXwYtXN5AcV2PluBerves6/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlN6Y4FFgzY4p for ; Mon, 05 Jan 2026 18:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36582 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 18:26:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Mark Johnston Subject: git: 1ecac45cfc5f - main - asmc: add per-fan manual mode control via sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ecac45cfc5f0886907c34ec0da2c1b32618665d Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 18:26:29 +0000 Message-Id: <695c0255.36582.2683e43a@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1ecac45cfc5f0886907c34ec0da2c1b32618665d commit 1ecac45cfc5f0886907c34ec0da2c1b32618665d Author: Abdelkader Boudih AuthorDate: 2026-01-05 18:03:23 +0000 Commit: Mark Johnston CommitDate: 2026-01-05 18:25:47 +0000 asmc: add per-fan manual mode control via sysctl Add per-fan manual mode control via dev.asmc.0.fan.N.manual sysctl. Apple SMCs support manual fan control via the FS! SMC key, a 16-bit bitmask where each bit controls one fan (0=auto, 1=manual). This change adds a new sysctl per fan: dev.asmc.0.fan.N.manual (0=auto, 1=manual) When set to manual mode (1), the fan runs at the speed set via dev.asmc.0.fan.N.targetspeed instead of automatic thermal control. When set to auto mode (0), the SMC controls fan speed automatically. The FS! key was already defined in asmcvar.h but not accessible. This exposes it for debugging, testing, and advanced fan control. Implementation uses read-modify-write to allow independent control of each fan without affecting others. Reviewed by: adrian, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54437 --- sys/dev/asmc/asmc.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index bdb8ca7831c4..0572c8e663a7 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -97,6 +97,7 @@ static int asmc_mb_sysctl_fansafespeed(SYSCTL_HANDLER_ARGS); static int asmc_mb_sysctl_fanminspeed(SYSCTL_HANDLER_ARGS); static int asmc_mb_sysctl_fanmaxspeed(SYSCTL_HANDLER_ARGS); static int asmc_mb_sysctl_fantargetspeed(SYSCTL_HANDLER_ARGS); +static int asmc_mb_sysctl_fanmanual(SYSCTL_HANDLER_ARGS); static int asmc_temp_sysctl(SYSCTL_HANDLER_ARGS); static int asmc_mb_sysctl_sms_x(SYSCTL_HANDLER_ARGS); static int asmc_mb_sysctl_sms_y(SYSCTL_HANDLER_ARGS); @@ -656,6 +657,13 @@ asmc_attach(device_t dev) CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, dev, j, model->smc_fan_targetspeed, "I", "Fan target speed in RPM"); + + SYSCTL_ADD_PROC(sysctlctx, + SYSCTL_CHILDREN(sc->sc_fan_tree[i]), + OID_AUTO, "manual", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + dev, j, asmc_mb_sysctl_fanmanual, "I", + "Fan manual mode (0=auto, 1=manual)"); } /* @@ -1347,6 +1355,53 @@ asmc_mb_sysctl_fantargetspeed(SYSCTL_HANDLER_ARGS) return (error); } +static int +asmc_mb_sysctl_fanmanual(SYSCTL_HANDLER_ARGS) +{ + device_t dev = (device_t) arg1; + int fan = arg2; + int error; + int32_t v; + uint8_t buf[2]; + uint16_t val; + + /* Read current FS! bitmask (asmc_key_read locks internally) */ + error = asmc_key_read(dev, ASMC_KEY_FANMANUAL, buf, sizeof(buf)); + if (error != 0) + return (error); + + /* Extract manual bit for this fan (big-endian) */ + val = (buf[0] << 8) | buf[1]; + v = (val >> fan) & 0x01; + + /* Let sysctl handle the value */ + error = sysctl_handle_int(oidp, &v, 0, req); + + if (error == 0 && req->newptr != NULL) { + /* Validate input (0 = auto, 1 = manual) */ + if (v != 0 && v != 1) + return (EINVAL); + /* Read-modify-write of FS! bitmask */ + error = asmc_key_read(dev, ASMC_KEY_FANMANUAL, buf, sizeof(buf)); + if (error == 0) { + val = (buf[0] << 8) | buf[1]; + + /* Modify single bit */ + if (v) + val |= (1 << fan); /* Set to manual */ + else + val &= ~(1 << fan); /* Set to auto */ + + /* Write back */ + buf[0] = val >> 8; + buf[1] = val & 0xff; + error = asmc_key_write(dev, ASMC_KEY_FANMANUAL, buf, sizeof(buf)); + } + } + + return (error); +} + /* * Temperature functions. */ From nobody Mon Jan 5 19:11:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlP660qbWz6Mvj3 for ; Mon, 05 Jan 2026 19:11: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlP6600zmz4LZD for ; Mon, 05 Jan 2026 19:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767640270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nm5Hvs0RW9s5vOF2h2uSDKTOG+q/+38mWrQ/LKojlSI=; b=DtbbIP3WOF6hmkT7MbwBY7TkN1pORXjfVnQwNPTLw+41S/HxDK03BtptW/t37PwMUD50+9 8KOHAibQfUZeFYF5UIDZVAlQ2gK/nDIdzZw7ncIhBbSIVlwLk0IwoeeJjPOZxY2VX+x+Fe huV15o1acbCOZ7KPK2QH/+/31E4SAdZ3FBsx+1bOc5KByCAwACIn8uD0Omi4G+VxyolX3O vjolEh2NW0rQXPBJ1XYlRxXDLXEOZ6FGCCPIFG+23RtGLq5kDfCW0P5xNGDkf5dcW5jM3Y M/xixR2areuPtaOUO6FmQN3lnUK605qRQF6m7NVWUrNaDiLBQkFaxo3AtdT5nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767640270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nm5Hvs0RW9s5vOF2h2uSDKTOG+q/+38mWrQ/LKojlSI=; b=TV6wxD5NrkVpcHT9dQhmM/aQjXp2KfaKi7PaKKIWxS2iNvWa1i5x7ierQ8RDuJSkzecmBI ZQHWdyU5BqOR+ml04luogTWVlEjcGh1YPtdJKzgcUF0wbTsEy7cfdfNiy/FPhMFvfZLPn/ M39w7Ci1GmN2gyGbfTx1vah9iij9id9htWzbqQer+WuSZb89qwQkRt+xgTVeMpapfA0/aB 2N/2zFG9aOT//f3TLREaTUsan7sWf1pLhfbd2VJzwlQvHBXAmxLZT5qm1uAwQhXctObnNh qUhKhm5wuM50AqddWzI7uEGz9bm8izADf4whyvYbxzh6KbZuJ+cDInb0C17vsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767640270; a=rsa-sha256; cv=none; b=J/Jlb5Vgd8JQ62u5IRqseBgA84u6VI+74zwp/UehL9qjHa9sj/yDG6f7v936YrbHke0EKH d3TaKm+zCblY8O0mBqmhxC9AyigPtvRgYyjeBNbJqMc5XG+bCmbhiFaFSBkr2B4S4chFny /rxanVMSj6mxe2HcugRMHvnse+nILI2E/pK8Eo1OYF1HNQc7dfObCqDK4VUYLDTfqb8uG9 ABBFMdKZ9HxtolAfda/HcgZIjgc8TNf860QtDU2GPFa+ajVgt9mmGXGBO1eiGlnRr0SfiQ lMOt2NnEHhoQeVFh8TwRTE+Bjg+n4BtRH0lxNnPWEM7CJUQWkTO6OLkU8y4jZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlP656gjSzYjp for ; Mon, 05 Jan 2026 19:11:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 394d8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 19:11:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: ac1cd655f647 - main - ixl: verify flowid is valid before setting rsstype & flowid List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac1cd655f647cfd8e8d8c08da00f41abfce212a1 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 19:11:09 +0000 Message-Id: <695c0ccd.394d8.1c17f2db@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=ac1cd655f647cfd8e8d8c08da00f41abfce212a1 commit ac1cd655f647cfd8e8d8c08da00f41abfce212a1 Author: Andrew Gallatin AuthorDate: 2026-01-05 17:02:23 +0000 Commit: Andrew Gallatin CommitDate: 2026-01-05 19:10:17 +0000 ixl: verify flowid is valid before setting rsstype & flowid According to section 8.3.2.2.1 of the XL710 datasheet, FLTSTAT indicates if RSS hashing was used (or flow director or nothing) to arrive at the flowid it is reporting. We need to check this before reporting the flowid and setting the rss type. Not checking this allows invalid flowids (0s) to be reported for some TCP traffic (it seems to mostly impact incoming connections). This leads to the inp flowid being 0, and egress traffic being unbalanced (going to tx queue 0, and NIC 0 of an lacp bundle). Differential Revision: https://reviews.freebsd.org/D54442 Reviewed by: adrian, kbowling Sponsored by: Netflix MFC after: 2 weeks --- sys/dev/ixl/ixl_txrx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c index f971a3073265..04b8279bdc59 100644 --- a/sys/dev/ixl/ixl_txrx.c +++ b/sys/dev/ixl/ixl_txrx.c @@ -661,7 +661,7 @@ ixl_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) struct ixl_rx_queue *que = &vsi->rx_queues[ri->iri_qsidx]; struct rx_ring *rxr = &que->rxr; union i40e_rx_desc *cur; - u32 status, error; + u32 status, error, fltstat; u16 plen; u64 qword; u8 ptype; @@ -717,8 +717,12 @@ ixl_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) if ((scctx->isc_capenable & IFCAP_RXCSUM) != 0) rxr->csum_errs += ixl_rx_checksum(ri, status, error, ptype); - ri->iri_flowid = le32toh(cur->wb.qword0.hi_dword.rss); - ri->iri_rsstype = ixl_ptype_to_hash(ptype); + fltstat = (status >> I40E_RX_DESC_STATUS_FLTSTAT_SHIFT); + if ((fltstat & I40E_RX_DESC_FLTSTAT_RSS_HASH) == + I40E_RX_DESC_FLTSTAT_RSS_HASH) { + ri->iri_flowid = le32toh(cur->wb.qword0.hi_dword.rss); + ri->iri_rsstype = ixl_ptype_to_hash(ptype); + } if (status & (1 << I40E_RX_DESC_STATUS_L2TAG1P_SHIFT)) { ri->iri_vtag = le16toh(cur->wb.qword0.lo_dword.l2tag1); ri->iri_flags |= M_VLANTAG; From nobody Mon Jan 5 20:09:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPH521Lz6N079 for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPH25DRz3QnL for ; Mon, 05 Jan 2026 20:09:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jqyk7sLopEVMVCBSVpvxIKsit2ak0+yX6FOiBeRv8qs=; b=PjBgurMBkdTjBuEozd27aO2BG+3NiBwEoSCf0N+l++VpNOgfAdOhCsNMZuouxJMmrmDF07 k6Tu8mZik/qC6E4pONABn6MOyokDjQYZCBgkejl6yy4Lh8Lkg4O57udOvB4e68yIVxUFpP W1egV9vAEKK/x3rlOlOtfw1uXY7vbJkq67lgMx1l4ZkLU5aWPtIwnEtx2ZO9CNJIrw5Nz0 okB8ZtskqCZ3YK2Z2+t32aR0BLjARXT7NrOhlHVT1VBiTVKbNUn/9uNyed11Iqd3WUOO9D AqWaJUFQnVe2IzCCh9IkKBj+K9COSdtrj4h1t18T+fKQHDnOkPx7yG3NWnYATg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jqyk7sLopEVMVCBSVpvxIKsit2ak0+yX6FOiBeRv8qs=; b=wSpyn9gudcnBNvU1lfakYfrORJr8M67Z1hDeUX8iiKBq4VgNsGyeyzqcLaQad6x7xGx2du 4mevXDRmzAsK2ZCeMyR2c5uEic462oqHszThBSxSQ25ikEM1Rgp5z+qQuzgrVDKDQE+q3f xhwut/FhZO8pq45rnCs3dzYhAtkZNN2aGly0L4MUjrp97Xpx9H6eC4gKDHtSTuogbQvob/ uPW2ZB9sKHJvNNDbcxnxfKG3QZ0v2D0e3NsP4DE9HII8XnCS4HWMVwtXx3rnPlp2nZyNum wMVeOaQ7C0kxhv1KZ4351rns0tdHQNpKS8Gjuq4zE84AqesJ9jW9Mcpf4Ikzrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643763; a=rsa-sha256; cv=none; b=UP2bpkiLp3Z/x6SJiJyRYSP5YppqDtYbcT+42e0u1m0y155aNunbXi22tURCeEd+uI6ffp OKC+T/bCBi9TFLqMvelFGiMIHX3+O3gbSmA0qo/gxuM7NmqkzOiLENb6PztHdVbWVvW3Xk /Nok840w32tmL0+qC7FbrC5wNVFtnLDrNs0DqPQuFxZ+Idka1Z/ok6GDa70CqLaVVEVLeK ED/93mFtFWh6H7rVGZNQlXV9dmgKoLLwZFcohqJPz4vUvFFFZX8kGd1f1/Fg++4NDbhYcI qHwXSpNXd+K4Z1pYlVvunC5HzqhDXJ+VGKRanaYYFQv96C7yar3PooHIVQ4MhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPH13WDzbc8 for ; Mon, 05 Jan 2026 20:09:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8c81 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: ace666bd21a2 - main - linuxkpi: Define `PCI_POSSIBLE_ERROR()` macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ace666bd21a204c62807f2c899402a7dc9ab161a Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:23 +0000 Message-Id: <695c1a73.8c81.4f69096c@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=ace666bd21a204c62807f2c899402a7dc9ab161a commit ace666bd21a204c62807f2c899402a7dc9ab161a Author: Jean-Sébastien Pédron AuthorDate: 2025-08-09 16:14:05 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:44 +0000 linuxkpi: Define `PCI_POSSIBLE_ERROR()` macro It comes with `PCI_ERROR_RESPONSE` and `PCI_SET_ERROR_RESPONSE()` but we don't use them so far. Therefore `PCI_POSSIBLE_ERROR()` will always reture false. As written in the comment, this macro is a bit weird given the Linux `pci_read_*() functions can return an error code separately from the read value. The `PCI_POSSIBLE_ERROR()` macro started to be used by the amdgpu DRM driver in Linux 6.10. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54487 --- sys/compat/linuxkpi/common/include/linux/pci.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 06336bf963d6..8fe09554aed2 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -253,6 +253,20 @@ extern const char *pci_power_names[6]; #define PCI_IRQ_LEGACY PCI_IRQ_INTX #endif +/* + * Linux PCI code uses `PCI_SET_ERROR_RESPONSE()` to indicate to the caller of + * a `pci_read_*()` function that the read failed. An example of failure is + * whether the device was disconnected. It is a bit weird because Linux + * `pci_read_*()` can return an error value, as the read value is stored in a + * integer passed by pointer. + * + * We don't set PCI_ERROR_RESPONSE anywhere as of this commit, but the DRM + * drivers started to use `PCI_POSSIBLE_ERROR()`. + */ +#define PCI_ERROR_RESPONSE (~0ULL) +#define PCI_SET_ERROR_RESPONSE(val) (*(val) = ((typeof(*(val))) PCI_ERROR_RESPONSE)) +#define PCI_POSSIBLE_ERROR(val) ((val) == ((typeof(val)) PCI_ERROR_RESPONSE)) + struct pci_dev; struct pci_driver { From nobody Mon Jan 5 20:09:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPJ4Kbtz6Myy0 for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPJ2Y13z3Qyn for ; Mon, 05 Jan 2026 20:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bRBsgOwuJFc+lfgEyx+v2JTd253MMIXo6x8lj4iwsZM=; b=poZWS1iNFmhXaymj9PE6chGRv1wS1YHJ1VpwtsjAJvL9V1GJiRivBZjYfQ4VVIGUKC0cGk UIlnMv3d6+ar78iBdynIzIIlw2d+8c2qdEW8AB1FSdNu+JW0V5LIEc2AY+NR4xi6O2Cc7W PoLPJxoKQmCKQTJqsNQoxJ5KEHXXuQHYtMKMcIxr4siAio9CMiRQOdnMCRsST1Dg05S5PW Ww0swyy3mceizh7uD3Ke0L/8/9FO2Fdoh6a0FGg+feY//ysEKfQK9QmA8lNhmHBB2uMnx4 S56zdXMpWKJiEZFXV4+wFTO3+GctYtYtXB1uxaMYNukibrknGqaRkuv9R9ss+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bRBsgOwuJFc+lfgEyx+v2JTd253MMIXo6x8lj4iwsZM=; b=JQrinSXx1rHAHLaBgLLxxkXNTBYgo6EG4pH20J6zL3D1SVsB4gdiabXwkU1838WY9N5uWG aHD2rj2oB79DKm5T/FRTXDE6HEKxDQtLXjhzfUit3WdRKqCbHl2MC2uWT6d83WgwHMLS46 1dEZlJkG2mUZW40GslsG6MIBMr0XiI6JmuVFWKbsX2SMOwXp6JnMMTJKcgWUd64gVNcmMG js/auRF6tKdnTjE5GDVON2N6Z21kdb2tF6V0TwETxtKhIwIvvPMON4Fv7dGtBchwHMSva1 JwTjVfpewpRp9voKBPZWp6OGc6js8rfuMWHYWZlUT6PTaSBBVL5wU1Jx0pmhjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643764; a=rsa-sha256; cv=none; b=slO1slC7fw03h6MP12a+I1J7NUmP11OQxidqL3RzqedZv/l9PJceC4XvB7mVDI3Mk17LDm JKxIXV5609+MtAm1B5cTcPpUNwvZbiWfXCH54chB9JVtfuZJLro3ehP+NMp57DsNlP2AOm ZkmCwweXc05O9rDu3TzyzlinfiqiQ+Wxdeiiv+J1B7nSoNXBfANoi+O5ahaFKNDxA0psbr cszpw9AEnwUVe5oztA5awvyALv7z8gwp0YttTU3ZPsV+GJKKlpagaq9GvAECrnN0+EErXS TgPN9JGIz32Nf4+4L+2n1NiePGfuANUpqzaECQfGJdxHoscK+cr48qmxxSBxfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPJ1tYtzbSf for ; Mon, 05 Jan 2026 20:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8d03 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 65d7e9033439 - main - linuxkpi: Add a dummy List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65d7e9033439581af5bc1668827850663f84a5a5 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:24 +0000 Message-Id: <695c1a74.8d03.73d81a3b@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=65d7e9033439581af5bc1668827850663f84a5a5 commit 65d7e9033439581af5bc1668827850663f84a5a5 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 21:58:44 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:48 +0000 linuxkpi: Add a dummy The DRM generic code started to include it in Linux 6.10 but doesn't seem to use anything inside. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54490 --- sys/compat/linuxkpi/dummy/include/linux/kdebug.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/kdebug.h b/sys/compat/linuxkpi/dummy/include/linux/kdebug.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Mon Jan 5 20:09:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPK5VMJz6N04f for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPK308Yz3QlB for ; Mon, 05 Jan 2026 20:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+kDjQTWmNU3sBbBHHFZv/EHLD46/hjDmSqe9nqZWeY=; b=E4l+tm8aLu8ms/qYtIbDr15eHdgs1q8OetjCse5xDgMwLmSL7jXO7Wnf5HSBvh1aWX1JX4 HUxQUdCK2cndw1u9lYGSh+m1ZWuuLXGWWqn0d7sG//VPAk6a41zJDBm6YVW5Mnoc+pk2jP TnuCE+qhI87koqcY/sbP6aTwVfWn+rbqDaG1QzXm5RB5SnTZWJElDfHZ4CgGbOxNYH84K2 QqhsQ3/XVnd4LnW/Mw1CJBkBDwIJJIDkvsnThMoh6ApExzWiUt3BHn81pnElYNnCaL6ioD TIuC1ze05mCmNyLJjT6cXqKRFt6Yp26Hp1MRqHGZLTatJNJHy7Y9iBHRpgeNMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+kDjQTWmNU3sBbBHHFZv/EHLD46/hjDmSqe9nqZWeY=; b=qj3Fov45Nik0KRq00Tfr5sM/l+jV4smMfln+BPV/PBqTcCCCEbUW27MFGsSF4WGfZLhVtB LSaytsimHVzGhS+wBtMnJZoyGk37xVdcVw65RdY6F64delG8Gm1aQ/YWvjkguEMKzAOlt8 PS7f/8c4MnaGZi3ULMFbXHS7+PASdWPPu7hr2Q3S5uW2lxB9YyNhOyOkyhyYVfmb7e64w4 +QfcHJr0EfSE9WbB6qjyY1QzF4joebJA4Pbn0PzmUG0f5WLA8eOq96bXDVZhbrxAy/9kOl vESscj0j4aMXYy+w9XwHr2r8o2Y0HMba6BNQ/Mi5fgOW9fBbcR9OmVvLLD9QJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643765; a=rsa-sha256; cv=none; b=JSjFmM8iAJSOVLOyFLwmV1BmMDC8Ji/5rgkz/Ixpl1dfKmB+sXZz2fUkCPTEUIo0qFsTC5 ITzmW5khgBLxpVA6SQu5xMrtAGnI6HcMJebtyscM9TGQPBT6ow7NBiUMbCSHJ/8YbaE4cn F5geajrSn5Pve7/EtUPuazSfMx8YtFWAUIg6oqRvPQLj/Tb7JSOSFgmjF7yNsJpZG7JusJ k4bhSnVLtBu57mKrZLvlHHSzkKMfENZQvrmd0PW20sfGzQuuOjEwoC5kvWgQ795Ouv8eRe wYgXfDlCcP+WAM1Y5IO3+oRmga3+X1NIHdVoiRkNXimxImGYgnRG4nbyLPCI/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPK2YKpzbjF for ; Mon, 05 Jan 2026 20:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ff25 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 33fa585a0e90 - main - linuxkpi: Split List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33fa585a0e9032b31c563c8aae001c0c2a4866d4 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:25 +0000 Message-Id: <695c1a75.3ff25.63824e3f@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=33fa585a0e9032b31c563c8aae001c0c2a4866d4 commit 33fa585a0e9032b31c563c8aae001c0c2a4866d4 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-17 11:10:43 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:48 +0000 linuxkpi: Split On Linux, they split the content into three headers: 1. 2. 3. The first includes the second, which includes the third. is also included on the compiler command line by default! I added that to the compilation flags of the DRM drivers. This allowed me to drop at least one: #ifdef __FreeBSD #include #endif Note that our copy of contains definitions which are not defined by Linux' . I left them alone. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54495 --- .../linuxkpi/common/include/linux/compiler.h | 48 +-------------------- .../common/include/linux/compiler_attributes.h | 49 ++++++++++++++++++++++ .../linuxkpi/common/include/linux/compiler_types.h | 45 ++++++++++++++++++++ 3 files changed, 96 insertions(+), 46 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 4146c829b936..90d907dd4d45 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -33,48 +33,18 @@ #include #include -#define __user -#define __kernel -#define __safe -#define __force -#define __nocast -#define __iomem -#define __chk_user_ptr(x) ((void)0) -#define __chk_io_ptr(x) ((void)0) -#define __builtin_warning(x, y...) (1) -#define __acquires(x) -#define __releases(x) -#define __acquire(x) do { } while (0) -#define __release(x) do { } while (0) -#define __cond_lock(x,c) (c) +#include + #define __bitwise #define __devinitdata -#ifndef __deprecated -#define __deprecated -#endif #define __init #define __initconst #define __devinit #define __devexit #define __exit -#define __rcu -#define __percpu -#define __weak __weak_symbol -#define __malloc -#define __attribute_const__ __attribute__((__const__)) -#undef __always_inline -#define __always_inline inline -#define noinline __noinline -#define noinline_for_stack __noinline #define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) #define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE) -#define fallthrough /* FALLTHROUGH */ do { } while(0) -#if __has_attribute(__nonstring__) -#define __nonstring __attribute__((__nonstring__)) -#else -#define __nonstring -#endif #if __has_attribute(__counted_by__) #define __counted_by(_x) __attribute__((__counted_by__(_x))) #else @@ -93,24 +63,12 @@ #define typeof(x) __typeof(x) #define uninitialized_var(x) x = x -#define __maybe_unused __unused -#define __always_unused __unused -#define __must_check __result_use_check - -#define __printf(a,b) __printflike(a,b) - -#define __diag_push() -#define __diag_pop() -#define __diag_ignore_all(...) #define barrier() __asm__ __volatile__("": : :"memory") #define lower_32_bits(n) ((u32)(n)) #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) -#define ___PASTE(a,b) a##b -#define __PASTE(a,b) ___PASTE(a,b) - #define WRITE_ONCE(x,v) do { \ barrier(); \ (*(volatile __typeof(x) *)(uintptr_t)&(x)) = (v); \ @@ -129,8 +87,6 @@ #define lockless_dereference(p) READ_ONCE(p) #define _AT(T,X) ((T)(X)) - -#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) #define __must_be_array(a) __same_type(a, &(a)[0]) #define sizeof_field(_s, _m) sizeof(((_s *)0)->_m) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h new file mode 100644 index 000000000000..42908bb6c2b5 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h @@ -0,0 +1,49 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * All rights reserved. + */ + +#ifndef _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ +#define _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ + +#include + +#define __attribute_const__ __attribute__((__const__)) + +#ifndef __deprecated +#define __deprecated +#endif + +#define fallthrough /* FALLTHROUGH */ do { } while(0) + +#undef __always_inline +#define __always_inline inline + +#define __printf(a,b) __printflike(a,b) + +#define __malloc + +#define noinline __noinline + +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif + +#define noinline_for_stack __noinline + +#define __maybe_unused __unused +#define __always_unused __unused + +#define __must_check __result_use_check + +#define __weak __weak_symbol + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_types.h b/sys/compat/linuxkpi/common/include/linux/compiler_types.h new file mode 100644 index 000000000000..7151c03de690 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/compiler_types.h @@ -0,0 +1,45 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * All rights reserved. + */ + +#ifndef _LINUXKPI_LINUX_COMPILER_TYPES_H_ +#define _LINUXKPI_LINUX_COMPILER_TYPES_H_ + +#include + +#include + +#define __kernel +#define __user +#define __iomem +#define __percpu +#define __rcu +#define __chk_user_ptr(x) ((void)0) +#define __chk_io_ptr(x) ((void)0) +#define __acquires(x) +#define __releases(x) +#define __acquire(x) do { } while (0) +#define __release(x) do { } while (0) +#define __cond_lock(x,c) (c) +#define __force +#define __nocast +#define __safe +#define __builtin_warning(x, y...) (1) + +#define ___PASTE(a,b) a##b +#define __PASTE(a,b) ___PASTE(a,b) + +#define __diag_push() +#define __diag_pop() +#define __diag_ignore_all(...) + +#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) + +#endif From nobody Mon Jan 5 20:09:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPM1DlNz6N07K for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPL4dPBz3R29 for ; Mon, 05 Jan 2026 20:09:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pl8ull0LZLPOzKddMSes8185iAF0EvFx/W3aOm1hrhM=; b=KqjJtjntlnczyikfdGxK5i9zCf1dNxWUIvzpK898QnufiS2pwarbLGXimCwBWtHjrVNpHQ EVXZEV77WiRt4tU3ctZKOROtpJ8vigANEWYq6H7eoXQrH7KLtiKc71fjxfoajbwCK8IpfE pzv1ij4defuR0nWm10WenQTXy8Y1PtZBIR+YrqGgoIdSY/J6NGxyRwntsGMQ0YpgsRrsFI HUpkjocTW/XoyeSEMCZbfqOx4/YRGDzXtgMoRPXoaYklmxNqHFkri0WnGid+DMu1/Qjr6g xfg3PMSHeHfeOUGwAu/Ip9Qq5CXaS2BbNmFIVzuzbK7KXUUS2lzRvNMLWBm3Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pl8ull0LZLPOzKddMSes8185iAF0EvFx/W3aOm1hrhM=; b=D6rHlLvu10w2VAxv55rv8XU/dN5fateztTRZtlMjq+fOn4Y5vnHXW9sL1n1+nocLiXT1B1 L2IfGWQvcxIBRuPk3wmbYzXVrzpPz99On1qYdgDGk39wdEozJkYgfkMGWvQyTwwB78jpPx tiB5u3Yn+NqukHqThgOeAZ5CA+2zMA5SfskHIfD5TcmO/xFo4SicisfUXcVkVz5r8mBtnx KkCv66LJ4N1b7Rv8Fpak8V3gm5xtRBcsSVZrSjq1c2NXcP7LE7IMUVs1zHL3lm3cYYq3Qu 4GDg62msr6B54vi/l0KaWOCre74BV2DHcU2EqW1bInOkVzcAD/AvpNmxIZx//Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643766; a=rsa-sha256; cv=none; b=YUIuQ0N+5SJ2f0kBViYurD9Vnmu6ThAp4dt5Z13QmoODBVGi3cquzUnyRlnAcmUVnAYiA7 IRom6StAaF8SLng8H8FFLMkhybr0K80sWvkgxZOhoPqQ6OxUHSyUt29kjujnQTgxnAQe4U 9kaXXqhz8t3rArAcCtCaQJ4AOCTLA6s5zfS3RIgaS75PRAVF96CgIRdg5KhsOJn/iQVoId kAc389YSGK7Evidtn8MPFiHCqcqiqOZduhiXDE8SDOcYlBEKBnQT1w34YD54Z7LNBsu6NP 5+aIlrVu14Me1ibI/PZa9GXl/VqiD3cAw50o15L+UlMmMl5ML9QJs0tx8dW3lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPL38gQzbSh for ; Mon, 05 Jan 2026 20:09:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 830d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: b5f7a0b0fd89 - main - linuxkpi: Replicate Linux #includes between headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5f7a0b0fd8953c00b154d96b79ba0208c2e1aca Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:26 +0000 Message-Id: <695c1a76.830d.2a25df04@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=b5f7a0b0fd8953c00b154d96b79ba0208c2e1aca commit b5f7a0b0fd8953c00b154d96b79ba0208c2e1aca Author: Jean-Sébastien Pédron AuthorDate: 2025-08-17 11:17:49 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:49 +0000 linuxkpi: Replicate Linux #includes between headers The DRM drivers (and probably other parts of the Linux kernel) had a significant cleanup w.r.t. which source file includes what in Linux 6.10. Nonetheless, the DRM drivers still depend on implicit namespace pollution because some source files do not include all the headers they should. This cleanup broke the build with FreeBSD because we do not replicate the same `#include` directives everywhere. This commit adds the same `#include` directives in several headers in order to get the same namespace pollution. This fixes the build of the DRM drivers from Linux 6.10. An example is `drm_dp_tunnel.c` which needed `str_yes_no()` defined by (technically in Linux). It gets it through: -> -> -> -> -> -> -> Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54496 --- sys/compat/linuxkpi/common/include/linux/cgroup.h | 9 +++++ sys/compat/linuxkpi/common/include/linux/file.h | 5 +++ sys/compat/linuxkpi/common/include/linux/i2c.h | 7 ++++ .../linuxkpi/common/include/linux/memcontrol.h | 43 ++++++++++++++++++++++ .../linuxkpi/common/include/linux/notifier.h | 5 +++ .../common/include/linux/regulator/consumer.h | 17 +++++++++ sys/compat/linuxkpi/common/include/linux/suspend.h | 6 +++ sys/compat/linuxkpi/common/include/linux/swap.h | 7 ++++ 8 files changed, 99 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cgroup.h b/sys/compat/linuxkpi/common/include/linux/cgroup.h index a9dd22fd0f4c..c75404fd6cf3 100644 --- a/sys/compat/linuxkpi/common/include/linux/cgroup.h +++ b/sys/compat/linuxkpi/common/include/linux/cgroup.h @@ -29,6 +29,15 @@ #ifndef _LINUXKPI_LINUX_CGROUP_H_ #define _LINUXKPI_LINUX_CGROUP_H_ +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #endif /* _LINUXKPI_LINUX_CGROUP_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/file.h b/sys/compat/linuxkpi/common/include/linux/file.h index f6e988c2d88e..be12d5f1bccf 100644 --- a/sys/compat/linuxkpi/common/include/linux/file.h +++ b/sys/compat/linuxkpi/common/include/linux/file.h @@ -39,6 +39,11 @@ #include #include +#include +#include +#include +#include + struct linux_file; #undef file diff --git a/sys/compat/linuxkpi/common/include/linux/i2c.h b/sys/compat/linuxkpi/common/include/linux/i2c.h index f24d282586f6..a6a4ee85d584 100644 --- a/sys/compat/linuxkpi/common/include/linux/i2c.h +++ b/sys/compat/linuxkpi/common/include/linux/i2c.h @@ -31,7 +31,14 @@ #include #include +#include +#include #include +#include +#include +#include +#include +#include #define I2C_MAX_ADAPTER_NAME_LENGTH 32 diff --git a/sys/compat/linuxkpi/common/include/linux/memcontrol.h b/sys/compat/linuxkpi/common/include/linux/memcontrol.h new file mode 100644 index 000000000000..57fadf9af60f --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/memcontrol.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2025 The FreeBSD Foundation + * Copyright (c) 2025 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#ifndef _LINUXKPI_LINUX_MEMCONTROL_H_ +#define _LINUXKPI_LINUX_MEMCONTROL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* defined(_LINUXKPI_LINUX_MEMCONTROL_H_) */ diff --git a/sys/compat/linuxkpi/common/include/linux/notifier.h b/sys/compat/linuxkpi/common/include/linux/notifier.h index 9302a1ce4606..4fe43255c648 100644 --- a/sys/compat/linuxkpi/common/include/linux/notifier.h +++ b/sys/compat/linuxkpi/common/include/linux/notifier.h @@ -32,6 +32,11 @@ #include #include +#include +#include +#include +#include + #define NOTIFY_DONE 0 #define NOTIFY_OK 0x0001 #define NOTIFY_STOP_MASK 0x8000 diff --git a/sys/compat/linuxkpi/common/include/linux/regulator/consumer.h b/sys/compat/linuxkpi/common/include/linux/regulator/consumer.h new file mode 100644 index 000000000000..d6c23575bc83 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/regulator/consumer.h @@ -0,0 +1,17 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_REGULATOR_CONSUMER_H_ +#define _LINUXKPI_LINUX_REGULATOR_CONSUMER_H_ + +#include +#include + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/suspend.h b/sys/compat/linuxkpi/common/include/linux/suspend.h index dacecbebdc08..3d5d5d594127 100644 --- a/sys/compat/linuxkpi/common/include/linux/suspend.h +++ b/sys/compat/linuxkpi/common/include/linux/suspend.h @@ -3,6 +3,12 @@ #ifndef _LINUXKPI_LINUX_SUSPEND_H_ #define _LINUXKPI_LINUX_SUSPEND_H_ +#include +#include +#include +#include +#include + typedef int suspend_state_t; extern suspend_state_t pm_suspend_target_state; diff --git a/sys/compat/linuxkpi/common/include/linux/swap.h b/sys/compat/linuxkpi/common/include/linux/swap.h index 5828db7ae392..9c1db9677f9e 100644 --- a/sys/compat/linuxkpi/common/include/linux/swap.h +++ b/sys/compat/linuxkpi/common/include/linux/swap.h @@ -37,7 +37,14 @@ #include #include +#include +#include +#include +#include +#include +#include #include +#include #include static inline long From nobody Mon Jan 5 20:09:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPN0hBBz6N00R for ; Mon, 05 Jan 2026 20: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPM4nRVz3Qtt for ; Mon, 05 Jan 2026 20:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CNPDp/GVKD/XgoJW2FE3Oxfxmi8/gGyEgPOntN6u00s=; b=MYwDw8dSSdWaAEMKUARAFeMBmxXFrY/Tjead4MLFX41z461QfU5eXdcbvdEgCOoMuJmk6Z oibfV3Itzg8+4jviPrAog4WtYEtcf1IYw9aBBsVNfYCJlH7If04RMDF3cUoNe7zXOFq/JK sWXBXS7pLdcsMsDcXXDHVW9Y8bohq1/v9kGUJI7gmhL4QCe0Sx/7cd68hJPJi5dMDtvaKc ceNBjJ8DBJ9Q3TdyCOu1BB/ehT4G35ypBl3NmaVJSljuPvx9rjwFRokB3NTQo3lKd8xPgr I6ytYdNmAsK0anmjRghGcUJ97MY81AExN8VnQWETBEssNII/OrVmfTcL+zn8Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CNPDp/GVKD/XgoJW2FE3Oxfxmi8/gGyEgPOntN6u00s=; b=Rg7/8PxENU2MZ+DWhNSTwpKENgg38jg8cQuNJVoyNU3U1vn4vJZpspKTDYISINnMPgd93r Nr5odOZDuM/AlKGwjulf1/evTziSjqAToJSXt1VqK8V1CLzOD/LlgvAM46oSzp/HuBt5sB kkP5VUX5Yw9TfWDfX6DNTsULMQDkN2FPpY0DHRaE06FQ49NsfTSyc4Se5Hdo8O0o1FCBdG 4NqlW+IGIgnANyKttR2zBpinikmbPGb0bn6w1xiF8pMr9gX82lB6axZStgVdazI5zRHymG /De4NzTHItlVRu7byLJq6T8xMXJ+8Jaa+Qyeu6qzwFwBRHvGKgCRnfxp+VbDHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643767; a=rsa-sha256; cv=none; b=W1QF14Q6FgUr6ca5YuzGrZKJR7yyqIgW7gQJVY+dSLqugg/d0ntv3r13H4XNHo9trXCnNG Sm1CJeg2X6K1RZGdAL1vItT8VixoM5klHehPBpeyMlJQh/wnYhuptLyknXqHrX/BhzsJjQ vJLFB2ouhYkFaIjIlv36xb+z015XVv9ip39nrxMs4VeYMG3R1hrwhPqL+1Fz0dVVbXzv+8 8ADPlvXdnklmqn2m8wf7aj4j6FUBzFicyGOHJY4LxjEnx2OE99IOez1QFw740xdO0iybbv go5e8q8yf6+8v7zsARTNlNopm+YJ5FmQcyfKXiHaRQEnfTKvIqF5CG0BjT0/Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPM43LvzbSj for ; Mon, 05 Jan 2026 20:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 800f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 55bd09ae0fc4 - main - linuxkpi: Add support for statically-allocated kfifo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55bd09ae0fc437c9eb135952ac278540b7388add Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:27 +0000 Message-Id: <695c1a77.800f.5db6f26e@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=55bd09ae0fc437c9eb135952ac278540b7388add commit 55bd09ae0fc437c9eb135952ac278540b7388add Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 08:37:27 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:49 +0000 linuxkpi: Add support for statically-allocated kfifo The main difference with the dynamically allocated version is that the structure is initialized with `DECLARE_KFIFO()` which takes the number of items as an additional argument compared to `DECLARE_KFIFO_PTR()`. The declared structure is then initialized with `INIT_KFIFO()` which sets all fields to 0, except `total` which is computed from the size of the array passed to `DECLARE_KFIFO()`. The amdgpu DRM driver started to used this in Linux 6.10. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54497 --- sys/compat/linuxkpi/common/include/linux/kfifo.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kfifo.h b/sys/compat/linuxkpi/common/include/linux/kfifo.h index d2f570781661..fbe16e22683e 100644 --- a/sys/compat/linuxkpi/common/include/linux/kfifo.h +++ b/sys/compat/linuxkpi/common/include/linux/kfifo.h @@ -33,8 +33,26 @@ #include #include -#define INIT_KFIFO(x) 0 -#define DECLARE_KFIFO(x, y, z) +/* + * INIT_KFIFO() is used to initialize the structure declared with + * DECLARE_KFIFO(). It doesn't work with DECLARE_KFIFO_PTR(). + */ +#define INIT_KFIFO(_kf) \ + ({ \ + (_kf).total = nitems((_kf).head); \ + (_kf).count = 0; \ + (_kf).first = 0; \ + (_kf).last = 0; \ + }) + +#define DECLARE_KFIFO(_name, _type, _size) \ + struct kfifo_ ## _name { \ + size_t total; \ + size_t count; \ + size_t first; \ + size_t last; \ + _type head[_size]; \ + } _name #define DECLARE_KFIFO_PTR(_name, _type) \ struct kfifo_ ## _name { \ From nobody Mon Jan 5 20:09:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPP1lBwz6N04s for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPN5T1Yz3R0W for ; Mon, 05 Jan 2026 20:09:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6pDfeLTt0ZroTj7BEy/m5uUfkKHYjkyfbyvJXHwKgMU=; b=yNnoTYvt9hk3gLdFUratPaHlXtOHl/chOLu1bw6q96q6tdi1w0YD816PTDlCG9/CBTd/GG BVanTjX+3Xjvb6WgXqjOo9SOQG6R5SePWSaFIS2pPtXJlnvnxxGYp5CLCTq6KbecZZtiEF tSGm7BAyJr1dj1b2tMd4lxPSjS1kkNM9fNNyhoVBDNea3dJpJgKbCmiW4NO/XXyncH1kRX Wxf5GEmmwsyyE4Rw+8d8hWUFjGGs1k+WNinxFD+F5xiLTg7hCtEX2rkhsqIix53EKUxQTN v0dcC1uxhZDWHamQLzICdh7/SEHxC0adSsGLW1ePGB2QzJ7RDkFhDYcv1VlClw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6pDfeLTt0ZroTj7BEy/m5uUfkKHYjkyfbyvJXHwKgMU=; b=Jm6j3DQ+HIE0v7T/3TtbNgply18ZKpS56Vlukmi871C0Fier/bPD1XHkIIEI1x16yEIzwn XTm7rJSkq50SzKYufyvZdT8da8OTqQtUKG5zzVL9I0dHqC30IaXh3pbDCJ+cOGWiVwbLLU K39SJZneVhx40VmS8cbzcex9MFNQHfQHThgNaCyLhgB8H6Z+jB/z7K8hsBlxrbqrvev1+3 D8+eqAxQ/VrbYFYXh7JdwOlIWBzEKFbX7XsreN63Ic02hf9GsCY+fpkKAaD3e6S6BXpefq Jszrhk/0adjGr6nibeI0X/n/sjRYeHIcTNqDSf3xHOY5V1EMtG33jM7+7kt6Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643768; a=rsa-sha256; cv=none; b=yTbp0vmIzi0a0xQ++O7q1fqSXOVTOyA9xuqK/BVMi4Xmm5xQELVRqsZOESmb1xSCDUBQsF lPHhbymKj6klLrL/48TPFw4T/ofEO6oR2ySs/z9KVN/AYvkCfHw0I7fWWlqcsCpxtbT2Bp VaK1rkBijBa9KHobM5ykykGkzOWiciXhJvSwoxUWxOTDqPsjNyMdUbVkb6IL49mq+ioCNJ Nk2UpJ9HkB4KhtJmeT2a48s7ESiqf6qt35VkSVDRx+Ka//rB+l+eDoHWMkLke2azaU0gQK 29km8QEAMEGbzokDQpnFuToRg1OSUoZXBRr7+6tM1U4fQ65aZf0eUxvfRD6amg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPN4wRxzbjH for ; Mon, 05 Jan 2026 20:09:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fdb1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 242beec703f7 - main - linuxkpi: Add a dummy List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 242beec703f771312fac3be1b4ce3092bbc93e25 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:28 +0000 Message-Id: <695c1a78.3fdb1.89afca3@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=242beec703f771312fac3be1b4ce3092bbc93e25 commit 242beec703f771312fac3be1b4ce3092bbc93e25 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 23:22:05 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:49 +0000 linuxkpi: Add a dummy The amdgpu DRM driver started to include in from Linux 6.10, but either it does not use any of it, or linuxkpi provides the necessary API from another header. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54498 --- sys/compat/linuxkpi/dummy/include/linux/fpu.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/fpu.h b/sys/compat/linuxkpi/dummy/include/linux/fpu.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Mon Jan 5 20:09:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPR2ZsRz6N0D5 for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPR0LYvz3QxS for ; Mon, 05 Jan 2026 20:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0vH5CVOtq0C8LpH0nK1EWSq8FzkbXtRFU3Hq/tZznk=; b=acq1McJSxy0ApTiT1E4fW+6/PG2JlwmfgjVF2BLmAY6V2LLEXIN5wtNxo4bUPr//7Ie0b3 F0gKOAhBtzbE/X6LnafRRiYwS5pXLk2Ys3eSAfqAOrtlhL4MfmDgzpc07V6HKb0BZiLJUE bWZZtnR6s3sXob+T20RWaQbWExEsQswJR7T76hnylA1wEZ0a1ECFRCgO/nuZ1lWA91nF5F dlfJ3YTuudMLT5pV20l2ny0CyVkUuExvNv1em/zRK7plmjEoOm0aGc+ZGJwok9Yb3xY6OX r5iAo9nTx3xqzVCeFy4qp41NRtUnov4zF1RXy5c7/aIwv4QGbPD+M71dbNuxdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0vH5CVOtq0C8LpH0nK1EWSq8FzkbXtRFU3Hq/tZznk=; b=J+JghK9Q394PwGav0Q8QLnd/76TF0PQVTcBe/1NxBhcpsZGv4lQng7TFMrZKZZXC71XbOc +dvjh3sNgnYh3hNue1M/D9slul/VDj/nuB1FCues+n8BzyqunGptPUABc0ipsel0Hu748J t9yxWspQd62sDCVZZ6u4jrt/GmFh4B2vcVfUV/3azqMsZlVtBbb+0B5sr19Xdf1Lidtj8E t/+QL88Sl0kDHho3G7dTt5mg2hVL2dKTnUa1hI1vrKm9Y8PC0BexZeJfCZSGQjo01DLwIg fJBwecvwzSPVjOjjZk11wpwJmaqdty42Ex82Ct5Sd4paoy79Wyo9ZT1Jz1hZdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643771; a=rsa-sha256; cv=none; b=h5lwsoGc3rULtdlIpJ3XZL12WS9zpTILe9eHLlImlkYiNMEC+nuOsafPmzL0yjK0MPkegV loaK9W0pmmHm9sIbDbKzDZHYaiV09OnxBYLD1dYMtVqG0TiWz7/GsNr+Y/SP44uuBkkw5a bUTkB23tF04JAPyrWe8l7PlPjCNSEqyuJhXgBFnXLBEZyy7XcvlkNTJj+5IKVjUwA4tc7b CwQtQcgFUA6BzaxG39Txj505wNjYavccl3+r5Ho6OdlfI6QbqsIbJ5mF0FHAh4M6XntGNN FCJiswW5kuvE1PTEmrNx2XV60EU7w54vnpqbYKi6b5BStD3UcZnxoRCn5XfiQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPQ6gCGzbfr for ; Mon, 05 Jan 2026 20:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eff6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 15f29e1e1978 - main - linuxkpi: Add get_unaligned_le64() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15f29e1e1978bbc4ed24975ad3666596281076fc Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:30 +0000 Message-Id: <695c1a7a.3eff6.4e90c17c@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=15f29e1e1978bbc4ed24975ad3666596281076fc commit 15f29e1e1978bbc4ed24975ad3666596281076fc Author: Jean-Sébastien Pédron AuthorDate: 2025-09-15 21:40:31 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:50 +0000 linuxkpi: Add get_unaligned_le64() This function was the only one missing in the `get_unaligned_*()` family. This is going to be used by the imported `linux_siphash.c` in a future commit, which itself is used by DRM drivers starting from Linux 6.10. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54500 --- sys/compat/linuxkpi/common/include/asm/unaligned.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/unaligned.h b/sys/compat/linuxkpi/common/include/asm/unaligned.h index e45846a3b543..6778e9fcede1 100644 --- a/sys/compat/linuxkpi/common/include/asm/unaligned.h +++ b/sys/compat/linuxkpi/common/include/asm/unaligned.h @@ -48,6 +48,13 @@ get_unaligned_le32(const void *p) return (le32_to_cpup((const __le32 *)p)); } +static __inline uint64_t +get_unaligned_le64(const void *p) +{ + + return (le64_to_cpup((const __le64 *)p)); +} + static __inline void put_unaligned_le16(__le16 v, void *p) { From nobody Mon Jan 5 20:09:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPQ29j1z6N00V for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPP69f1z3R2b for ; Mon, 05 Jan 2026 20:09:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0/BfgTxhYydJDZp2PPFa7bTdLqo3sW7vnuZtWMJHkbo=; b=KNJX35MT4sKnx7YFR8q8G9hfoEZmXDINupfVLBDLN45H556I7Oo7JpFSqMQ/vtLhMlahhc 8biWuezuBmejCGeZMT85htQ33L0BMQENckZhlffeIANVtpWtZY45wcBDvqhS6Ag2aQBN/f lQBSDgtQ5qTJ+G3+/1GQdH8CZqdyJ9n2GqyCScFMDx94py+A3VSHk8nz41dpNBq1FmX+G+ aofA1Yu3Cp39taPtijo+1ySApbhSEUsquTQ5YQOvBJRStgiaMURPNxwjET5MF9gk4e8gv5 daJ8sG52ulvPWhai2/ACbyxtK1cmdCkUnZhRjPtMCIBFIv0t4Bfs0+FPzHyzxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0/BfgTxhYydJDZp2PPFa7bTdLqo3sW7vnuZtWMJHkbo=; b=vIVvIaWcto2fStI6xUQjGGDbLko7kVy9NoyQXxe93+4swZMexF8SdLG+NJb2LULl9/zWAC yF9lLtJb6Q7R3sUQwhFfCfoA9ewcY1T6xo8flcXpF/a3I5+ZROxeJ+RbJ7dV9IwGZSSzb0 9s21SQo8fUKlzeiqmaPGRO9+se0d/uL/8dXkAcyMQ3DMjKmPNIoknWFXxIXeXeFTFqzAY5 kbQmgng4S+zN/ckENbHhECXSI3/czvQ52RaHRyTWi737oXQj+tzqDpYJ3e7HmhX4TPtYBX UsCdxTdvepU8Zm8fp5YVhz8hXqIoEO+RNFhu/XnwYPpic0kMGk/YnsRgGXm0yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643769; a=rsa-sha256; cv=none; b=J/h1J8/FKuV51sawFH//VSZHa08/bl7TQHvvac42O6w97PVAZb1O9e1Uc8ktag3RSA0eOy AmRd2rFUFvCGdo6CMiTUwNaoNEsFqMVHUSqrICpI+VUYL3GaZ1bvvHZ/vhC4OvivmyUEMq 4SoxqXg49xrp+UhETpdxwI7sFQybbGDo1hKcrU6iNHQQvLrsx7QZuvpGkuuCSmTuJ7ZqTK +XzubUGAgeDRvPVWUXLxX/OwwYHnaJ3S+smoqnznUMaIIGy4Je7kJtXHXUjwnarPHglIEi q/IxZOLF1YmBRurQgPgXgx2T3qbW0zSoQgmpcTm/WFHszv5oNPR3a7X4oH9rRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPP5mwnzbjJ for ; Mon, 05 Jan 2026 20:09:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8598 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: a9462e32fa75 - main - linuxkpi: Add `rol64()` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9462e32fa75a9a1e3f49964bc42b5303e0dd092 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:29 +0000 Message-Id: <695c1a79.8598.20d4de8d@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=a9462e32fa75a9a1e3f49964bc42b5303e0dd092 commit a9462e32fa75a9a1e3f49964bc42b5303e0dd092 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 23:22:22 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:49 +0000 linuxkpi: Add `rol64()` This is used by added in a separate future commit. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54499 --- sys/compat/linuxkpi/common/include/linux/bitops.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 8fac80820f30..969b5e8245e7 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -437,4 +437,10 @@ sign_extend32(uint32_t value, int index) return ((int32_t)(value << shift) >> shift); } +static inline uint64_t +rol64(uint64_t word, unsigned int shift) +{ + return ((word << (shift & 63)) | (word >> ((-shift) & 63))); +} + #endif /* _LINUXKPI_LINUX_BITOPS_H_ */ From nobody Mon Jan 5 20:09:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPS4gXRz6N0D9 for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPS117Cz3QpM for ; Mon, 05 Jan 2026 20:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yNA5OUXCEmDl5MnmKpY2dF9C2Smi14geFz0+gBZo1ao=; b=YUVjqk8dDWqJ7sgEebu/c0jv4L64/QNiTop2xW+4VXfAo8mJusl050qfmbNJOqvcGTzAfE 5y51Lnp7OYEdvhUScMBox/QNOHaVGO6L0/BOwaX4yikEq/2iJ7Nx+bOYYHEaBsTKxLUq70 57J9A+Zu5ho6oMB4IdlLQmTv3kGOdeYxdG8vh6zDGrMJuPCUSACtl9DO7VTZMHqmdCUBQ2 g/puUyfWxg4Lv2nUls3anINoFtwZJBWc6+Gb17yNU2wC3MA0cExLp0Ud05goisxvW/Tr5V IhAtcDh9HY2B74SkCOO+OQbIsK1jXZhgi4dDhgtdnkapyny/KT6kGUM6DZLd3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yNA5OUXCEmDl5MnmKpY2dF9C2Smi14geFz0+gBZo1ao=; b=eAti0zFvshzVonnVAmWsCzc3Jwh3TF/JuPV6Ozg8j0q3s+qouoaOO0o1kByTRWD1oGuRfS KjqKbV4endsszGfuF6SpJ2sw6jJ4tPA6QGHfY1ekk1n0S0G/AmiANiuOBU5mKis6rqV6k/ 4lHI5ymxtUCHO1lqGnVM+XopA/AlPv5oSo0F8tfdO1XvTR7O78mlTxYpxSqcHLPLOriVSE ynkVSiL+qV2DzFPiT7A7mZRxZLSvUS6NIMxJo47PD1gyvdb3TD8R+pYDpnO9BLBea+rYdo oafRlP85SVsB2WZr1JyeHV2460fJhoWKvOByZxmFUNLfaxjcZZzOR04tGDCn4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643772; a=rsa-sha256; cv=none; b=F24YYtpCCjkQB0ylso0i4naICCp3gxMeDaiEUJUEm5WZxcqmwyIxza9fUucXxTZgEazX9O Uy0KdQVPojrWxz/Rh4HRkZsGQ1Y/Cwk2uhV3PhZqEZwICr53AtigO3VyZKzLUJRn53rdpZ UBljVSzTeu4KgVuLNlYbCrL2XscM3drn5hX6qL7a0Z0XX2P5coqvy2CIM2B/pW3mWGoka3 7EzozvX9zCyaHfHLlm8eC7oHFrvyYpGT2sT+I0k9ZP7QyqxhL+6g6c96ZOCdcGltwfHJuw gs6cMoETnOW88RCiSO52+4IxuRhMJbGlhQMco/hrLx/H7wtA2FHGUA/f5dAVFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPS0Z3NzbjK for ; Mon, 05 Jan 2026 20:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 859c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: d448578b445d - main - linuxkpi: Add List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d448578b445da95806ef9af996a0db9754daadeb Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:32 +0000 Message-Id: <695c1a7c.859c.12adca29@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=d448578b445da95806ef9af996a0db9754daadeb commit d448578b445da95806ef9af996a0db9754daadeb Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 13:43:11 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:50 +0000 linuxkpi: Add The file is copied as is from Linux 6.10 as it dual-licensend under the GPLv2 and BSD 3-clause. The amdgpu DRM driver started to use it in Linux 6.10. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54501 --- sys/compat/linuxkpi/common/include/linux/siphash.h | 168 +++++++ sys/compat/linuxkpi/common/src/linux_siphash.c | 546 +++++++++++++++++++++ sys/conf/files | 2 + sys/modules/linuxkpi/Makefile | 1 + 4 files changed, 717 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/siphash.h b/sys/compat/linuxkpi/common/include/linux/siphash.h new file mode 100644 index 000000000000..9153e77382e1 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/siphash.h @@ -0,0 +1,168 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +/* Copyright (C) 2016-2022 Jason A. Donenfeld . All Rights Reserved. + * + * SipHash: a fast short-input PRF + * https://131002.net/siphash/ + * + * This implementation is specifically for SipHash2-4 for a secure PRF + * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for + * hashtables. + */ + +#ifndef _LINUX_SIPHASH_H +#define _LINUX_SIPHASH_H + +#include +#include + +#define SIPHASH_ALIGNMENT __alignof__(u64) +typedef struct { + u64 key[2]; +} siphash_key_t; + +#define siphash_aligned_key_t siphash_key_t __aligned(16) + +static inline bool siphash_key_is_zero(const siphash_key_t *key) +{ + return !(key->key[0] | key->key[1]); +} + +u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key); +u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key); + +u64 siphash_1u64(const u64 a, const siphash_key_t *key); +u64 siphash_2u64(const u64 a, const u64 b, const siphash_key_t *key); +u64 siphash_3u64(const u64 a, const u64 b, const u64 c, + const siphash_key_t *key); +u64 siphash_4u64(const u64 a, const u64 b, const u64 c, const u64 d, + const siphash_key_t *key); +u64 siphash_1u32(const u32 a, const siphash_key_t *key); +u64 siphash_3u32(const u32 a, const u32 b, const u32 c, + const siphash_key_t *key); + +static inline u64 siphash_2u32(const u32 a, const u32 b, + const siphash_key_t *key) +{ + return siphash_1u64((u64)b << 32 | a, key); +} +static inline u64 siphash_4u32(const u32 a, const u32 b, const u32 c, + const u32 d, const siphash_key_t *key) +{ + return siphash_2u64((u64)b << 32 | a, (u64)d << 32 | c, key); +} + + +static inline u64 ___siphash_aligned(const __le64 *data, size_t len, + const siphash_key_t *key) +{ + if (__builtin_constant_p(len) && len == 4) + return siphash_1u32(le32_to_cpup((const __le32 *)data), key); + if (__builtin_constant_p(len) && len == 8) + return siphash_1u64(le64_to_cpu(data[0]), key); + if (__builtin_constant_p(len) && len == 16) + return siphash_2u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), + key); + if (__builtin_constant_p(len) && len == 24) + return siphash_3u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), + le64_to_cpu(data[2]), key); + if (__builtin_constant_p(len) && len == 32) + return siphash_4u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), + le64_to_cpu(data[2]), le64_to_cpu(data[3]), + key); + return __siphash_aligned(data, len, key); +} + +/** + * siphash - compute 64-bit siphash PRF value + * @data: buffer to hash + * @size: size of @data + * @key: the siphash key + */ +static inline u64 siphash(const void *data, size_t len, + const siphash_key_t *key) +{ + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || + !IS_ALIGNED((unsigned long)data, SIPHASH_ALIGNMENT)) + return __siphash_unaligned(data, len, key); + return ___siphash_aligned(data, len, key); +} + +#define HSIPHASH_ALIGNMENT __alignof__(unsigned long) +typedef struct { + unsigned long key[2]; +} hsiphash_key_t; + +u32 __hsiphash_aligned(const void *data, size_t len, + const hsiphash_key_t *key); +u32 __hsiphash_unaligned(const void *data, size_t len, + const hsiphash_key_t *key); + +u32 hsiphash_1u32(const u32 a, const hsiphash_key_t *key); +u32 hsiphash_2u32(const u32 a, const u32 b, const hsiphash_key_t *key); +u32 hsiphash_3u32(const u32 a, const u32 b, const u32 c, + const hsiphash_key_t *key); +u32 hsiphash_4u32(const u32 a, const u32 b, const u32 c, const u32 d, + const hsiphash_key_t *key); + +static inline u32 ___hsiphash_aligned(const __le32 *data, size_t len, + const hsiphash_key_t *key) +{ + if (__builtin_constant_p(len) && len == 4) + return hsiphash_1u32(le32_to_cpu(data[0]), key); + if (__builtin_constant_p(len) && len == 8) + return hsiphash_2u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), + key); + if (__builtin_constant_p(len) && len == 12) + return hsiphash_3u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), + le32_to_cpu(data[2]), key); + if (__builtin_constant_p(len) && len == 16) + return hsiphash_4u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), + le32_to_cpu(data[2]), le32_to_cpu(data[3]), + key); + return __hsiphash_aligned(data, len, key); +} + +/** + * hsiphash - compute 32-bit hsiphash PRF value + * @data: buffer to hash + * @size: size of @data + * @key: the hsiphash key + */ +static inline u32 hsiphash(const void *data, size_t len, + const hsiphash_key_t *key) +{ + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || + !IS_ALIGNED((unsigned long)data, HSIPHASH_ALIGNMENT)) + return __hsiphash_unaligned(data, len, key); + return ___hsiphash_aligned(data, len, key); +} + +/* + * These macros expose the raw SipHash and HalfSipHash permutations. + * Do not use them directly! If you think you have a use for them, + * be sure to CC the maintainer of this file explaining why. + */ + +#define SIPHASH_PERMUTATION(a, b, c, d) ( \ + (a) += (b), (b) = rol64((b), 13), (b) ^= (a), (a) = rol64((a), 32), \ + (c) += (d), (d) = rol64((d), 16), (d) ^= (c), \ + (a) += (d), (d) = rol64((d), 21), (d) ^= (a), \ + (c) += (b), (b) = rol64((b), 17), (b) ^= (c), (c) = rol64((c), 32)) + +#define SIPHASH_CONST_0 0x736f6d6570736575ULL +#define SIPHASH_CONST_1 0x646f72616e646f6dULL +#define SIPHASH_CONST_2 0x6c7967656e657261ULL +#define SIPHASH_CONST_3 0x7465646279746573ULL + +#define HSIPHASH_PERMUTATION(a, b, c, d) ( \ + (a) += (b), (b) = rol32((b), 5), (b) ^= (a), (a) = rol32((a), 16), \ + (c) += (d), (d) = rol32((d), 8), (d) ^= (c), \ + (a) += (d), (d) = rol32((d), 7), (d) ^= (a), \ + (c) += (b), (b) = rol32((b), 13), (b) ^= (c), (c) = rol32((c), 16)) + +#define HSIPHASH_CONST_0 0U +#define HSIPHASH_CONST_1 0U +#define HSIPHASH_CONST_2 0x6c796765U +#define HSIPHASH_CONST_3 0x74656462U + +#endif /* _LINUX_SIPHASH_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_siphash.c b/sys/compat/linuxkpi/common/src/linux_siphash.c new file mode 100644 index 000000000000..b4842a8250e1 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_siphash.c @@ -0,0 +1,546 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) +/* Copyright (C) 2016-2022 Jason A. Donenfeld . All Rights Reserved. + * + * SipHash: a fast short-input PRF + * https://131002.net/siphash/ + * + * This implementation is specifically for SipHash2-4 for a secure PRF + * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for + * hashtables. + */ + +#include +#include + +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 +#include +#include +#endif + +#define EXPORT_SYMBOL(name) + +#define SIPROUND SIPHASH_PERMUTATION(v0, v1, v2, v3) + +#define PREAMBLE(len) \ + u64 v0 = SIPHASH_CONST_0; \ + u64 v1 = SIPHASH_CONST_1; \ + u64 v2 = SIPHASH_CONST_2; \ + u64 v3 = SIPHASH_CONST_3; \ + u64 b = ((u64)(len)) << 56; \ + v3 ^= key->key[1]; \ + v2 ^= key->key[0]; \ + v1 ^= key->key[1]; \ + v0 ^= key->key[0]; + +#define POSTAMBLE \ + v3 ^= b; \ + SIPROUND; \ + SIPROUND; \ + v0 ^= b; \ + v2 ^= 0xff; \ + SIPROUND; \ + SIPROUND; \ + SIPROUND; \ + SIPROUND; \ + return (v0 ^ v1) ^ (v2 ^ v3); + +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS +u64 __siphash_aligned(const void *_data, size_t len, const siphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + PREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = le64_to_cpup(data); + v3 ^= m; + SIPROUND; + SIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= le32_to_cpup(data); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= le16_to_cpup(data); break; + case 1: b |= end[0]; + } +#endif + POSTAMBLE +} +EXPORT_SYMBOL(__siphash_aligned); +#endif + +u64 __siphash_unaligned(const void *_data, size_t len, const siphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + PREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = get_unaligned_le64(data); + v3 ^= m; + SIPROUND; + SIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= get_unaligned_le32(end); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= get_unaligned_le16(end); break; + case 1: b |= end[0]; + } +#endif + POSTAMBLE +} +EXPORT_SYMBOL(__siphash_unaligned); + +/** + * siphash_1u64 - compute 64-bit siphash PRF value of a u64 + * @first: first u64 + * @key: the siphash key + */ +u64 siphash_1u64(const u64 first, const siphash_key_t *key) +{ + PREAMBLE(8) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_1u64); + +/** + * siphash_2u64 - compute 64-bit siphash PRF value of 2 u64 + * @first: first u64 + * @second: second u64 + * @key: the siphash key + */ +u64 siphash_2u64(const u64 first, const u64 second, const siphash_key_t *key) +{ + PREAMBLE(16) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + v3 ^= second; + SIPROUND; + SIPROUND; + v0 ^= second; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_2u64); + +/** + * siphash_3u64 - compute 64-bit siphash PRF value of 3 u64 + * @first: first u64 + * @second: second u64 + * @third: third u64 + * @key: the siphash key + */ +u64 siphash_3u64(const u64 first, const u64 second, const u64 third, + const siphash_key_t *key) +{ + PREAMBLE(24) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + v3 ^= second; + SIPROUND; + SIPROUND; + v0 ^= second; + v3 ^= third; + SIPROUND; + SIPROUND; + v0 ^= third; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_3u64); + +/** + * siphash_4u64 - compute 64-bit siphash PRF value of 4 u64 + * @first: first u64 + * @second: second u64 + * @third: third u64 + * @forth: forth u64 + * @key: the siphash key + */ +u64 siphash_4u64(const u64 first, const u64 second, const u64 third, + const u64 forth, const siphash_key_t *key) +{ + PREAMBLE(32) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + v3 ^= second; + SIPROUND; + SIPROUND; + v0 ^= second; + v3 ^= third; + SIPROUND; + SIPROUND; + v0 ^= third; + v3 ^= forth; + SIPROUND; + SIPROUND; + v0 ^= forth; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_4u64); + +u64 siphash_1u32(const u32 first, const siphash_key_t *key) +{ + PREAMBLE(4) + b |= first; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_1u32); + +u64 siphash_3u32(const u32 first, const u32 second, const u32 third, + const siphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + PREAMBLE(12) + v3 ^= combined; + SIPROUND; + SIPROUND; + v0 ^= combined; + b |= third; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_3u32); + +#if BITS_PER_LONG == 64 +/* Note that on 64-bit, we make HalfSipHash1-3 actually be SipHash1-3, for + * performance reasons. On 32-bit, below, we actually implement HalfSipHash1-3. + */ + +#define HSIPROUND SIPROUND +#define HPREAMBLE(len) PREAMBLE(len) +#define HPOSTAMBLE \ + v3 ^= b; \ + HSIPROUND; \ + v0 ^= b; \ + v2 ^= 0xff; \ + HSIPROUND; \ + HSIPROUND; \ + HSIPROUND; \ + return (v0 ^ v1) ^ (v2 ^ v3); + +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS +u32 __hsiphash_aligned(const void *_data, size_t len, const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = le64_to_cpup(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= le32_to_cpup(data); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= le16_to_cpup(data); break; + case 1: b |= end[0]; + } +#endif + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_aligned); +#endif + +u32 __hsiphash_unaligned(const void *_data, size_t len, + const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = get_unaligned_le64(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= get_unaligned_le32(end); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= get_unaligned_le16(end); break; + case 1: b |= end[0]; + } +#endif + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_unaligned); + +/** + * hsiphash_1u32 - compute 64-bit hsiphash PRF value of a u32 + * @first: first u32 + * @key: the hsiphash key + */ +u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) +{ + HPREAMBLE(4) + b |= first; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_1u32); + +/** + * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 + * @first: first u32 + * @second: second u32 + * @key: the hsiphash key + */ +u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + HPREAMBLE(8) + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_2u32); + +/** + * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @key: the hsiphash key + */ +u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, + const hsiphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + HPREAMBLE(12) + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + b |= third; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_3u32); + +/** + * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @forth: forth u32 + * @key: the hsiphash key + */ +u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, + const u32 forth, const hsiphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + HPREAMBLE(16) + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + combined = (u64)forth << 32 | third; + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_4u32); +#else +#define HSIPROUND HSIPHASH_PERMUTATION(v0, v1, v2, v3) + +#define HPREAMBLE(len) \ + u32 v0 = HSIPHASH_CONST_0; \ + u32 v1 = HSIPHASH_CONST_1; \ + u32 v2 = HSIPHASH_CONST_2; \ + u32 v3 = HSIPHASH_CONST_3; \ + u32 b = ((u32)(len)) << 24; \ + v3 ^= key->key[1]; \ + v2 ^= key->key[0]; \ + v1 ^= key->key[1]; \ + v0 ^= key->key[0]; + +#define HPOSTAMBLE \ + v3 ^= b; \ + HSIPROUND; \ + v0 ^= b; \ + v2 ^= 0xff; \ + HSIPROUND; \ + HSIPROUND; \ + HSIPROUND; \ + return v1 ^ v3; + +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS +u32 __hsiphash_aligned(const void *_data, size_t len, const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u32)); + const u8 left = len & (sizeof(u32) - 1); + u32 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u32)) { + m = le32_to_cpup(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } + switch (left) { + case 3: b |= ((u32)end[2]) << 16; fallthrough; + case 2: b |= le16_to_cpup(data); break; + case 1: b |= end[0]; + } + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_aligned); +#endif + +u32 __hsiphash_unaligned(const void *_data, size_t len, + const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u32)); + const u8 left = len & (sizeof(u32) - 1); + u32 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u32)) { + m = get_unaligned_le32(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } + switch (left) { + case 3: b |= ((u32)end[2]) << 16; fallthrough; + case 2: b |= get_unaligned_le16(end); break; + case 1: b |= end[0]; + } + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_unaligned); + +/** + * hsiphash_1u32 - compute 32-bit hsiphash PRF value of a u32 + * @first: first u32 + * @key: the hsiphash key + */ +u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) +{ + HPREAMBLE(4) + v3 ^= first; + HSIPROUND; + v0 ^= first; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_1u32); + +/** + * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 + * @first: first u32 + * @second: second u32 + * @key: the hsiphash key + */ +u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) +{ + HPREAMBLE(8) + v3 ^= first; + HSIPROUND; + v0 ^= first; + v3 ^= second; + HSIPROUND; + v0 ^= second; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_2u32); + +/** + * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @key: the hsiphash key + */ +u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, + const hsiphash_key_t *key) +{ + HPREAMBLE(12) + v3 ^= first; + HSIPROUND; + v0 ^= first; + v3 ^= second; + HSIPROUND; + v0 ^= second; + v3 ^= third; + HSIPROUND; + v0 ^= third; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_3u32); + +/** + * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @forth: forth u32 + * @key: the hsiphash key + */ +u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, + const u32 forth, const hsiphash_key_t *key) +{ + HPREAMBLE(16) + v3 ^= first; + HSIPROUND; + v0 ^= first; + v3 ^= second; + HSIPROUND; + v0 ^= second; + v3 ^= third; + HSIPROUND; + v0 ^= third; + v3 ^= forth; + HSIPROUND; + v0 ^= forth; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_4u32); +#endif diff --git a/sys/conf/files b/sys/conf/files index 8deb2bd400c0..d0c4ea5f544d 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4704,6 +4704,8 @@ compat/linuxkpi/common/src/linux_shmemfs.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_shrinker.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_siphash.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_skbuff.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_slab.c optional compat_linuxkpi \ diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index a662f5dffbb6..c465c76a7626 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -28,6 +28,7 @@ SRCS= linux_compat.c \ linux_shmemfs.c \ linux_shrinker.c \ linux_simple_attr.c \ + linux_siphash.c \ linux_skbuff.c \ linux_slab.c \ linux_tasklet.c \ From nobody Mon Jan 5 20:09:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPT5N3mz6N03F for ; Mon, 05 Jan 2026 20:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQPT1gvBz3R7C for ; Mon, 05 Jan 2026 20:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8io3NvmfZID3+P1f/epRmCbkQVcwV80xCJsJQi/cBXg=; b=IjIXJcjoq6jWFfDJ5UOFrhX0xnd5kSHJ0TITcTB/qCANCICpnrCNTIZc5FO16JfOARyn6W SDZNyfAYfVz54Lxwe1NTW1BD3tTcL8cAXMvSFNZRbMOr58M+Gf66ACH7svj6fl/S2ri8Kj TDpaBFdamCr+rsX4ic2mI38Pb2FtCQjTjwNMTGu/hXQJXvbyfLYJ+KTD8SD6VS92NsVD1f ElJIw3sFUAcz4Rdhqlle67Ywt+PBgzb885g7UH4hEENg5esmaCm9OnrJQrsavzAMjHhKeA DMtUXGVId2yS6I0vC+UQJdcoruVmdhgbhcngM18WRGWBn0uIWv5pzG5yDEHdvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8io3NvmfZID3+P1f/epRmCbkQVcwV80xCJsJQi/cBXg=; b=vKn/yg+gMxIRNCqgLUOfYUn+VAtbOMfXbS7X5yp4wpPyVhyVuF4wqwqOzOXv23KX/bTYMz rZoFz8DQyhw7dI47hdZyCxQRI5wIzrJanKUR2euL4Eo4CF4B0XrvVDjOOurvZTXW3L+P0D EyeawB+YH8rwNfACinBGmsQieNmJHJXqdvBnHmo7AwezFt7gocJOsIG43x32M+GsRTW593 e8sRt4OOrh79Vk8FsTKBUNJARElRNdx1XpMWmpYI4yjzYZGtWWVQj0OFuG6d/UkvatrFm/ XDu97toeJT8XkW7WljM63/py4EOYdhKiadB6q6InFaUF5qBg5kNV+4LyvaoTOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643773; a=rsa-sha256; cv=none; b=kieACye5iK11zFZStbR8IE6szc8m634TRZmFTQqAzu9eOs7BbgHhwsL7e9M6BMSbM7kbof fo7m3zJ/cNSz9Fs5KN4AC9CuHpZTVoH0JVxdez8xnbe1lZm0EBplI4efLE1tUQAXTNyaCV B3v8TmxMQX2Ppxru9LRyur0eqE3b49gBGSTiVgbJj02wswDNWklD+uCBPwAbh6ndLt6JPo OTg3mwAa1Oqk0ShikUhXP3IVIS83ql4PcF0axx1/HTljjt4HvsCuARhXeSKO8KwrlISTD0 N1jWuJL3DlUPSMhz5vqpU7OKlBlgibDGEpZ8E3oXS67qlSLW/vmFM46k1z3odg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQPT14QRzbyX for ; Mon, 05 Jan 2026 20:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8013 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:09:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 4c89b333808a - main - linuxkpi: Add `radix_tree_deref_slot()` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c89b333808a7eae0dad595b13686e9cf60bd4e6 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:09:33 +0000 Message-Id: <695c1a7d.8013.62c10f5@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=4c89b333808a7eae0dad595b13686e9cf60bd4e6 commit 4c89b333808a7eae0dad595b13686e9cf60bd4e6 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 13:45:10 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-05 19:32:50 +0000 linuxkpi: Add `radix_tree_deref_slot()` We don't do reference counting, we only dereference the pointer and retunr the value. The amdgpu DRM driver started to use it in Linux 6.10. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54502 --- sys/compat/linuxkpi/common/include/linux/radix-tree.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/radix-tree.h b/sys/compat/linuxkpi/common/include/linux/radix-tree.h index 1019697303db..55f0fc949807 100644 --- a/sys/compat/linuxkpi/common/include/linux/radix-tree.h +++ b/sys/compat/linuxkpi/common/include/linux/radix-tree.h @@ -68,6 +68,12 @@ struct radix_tree_iter { for ((iter)->index = (start); \ radix_tree_iter_find(root, iter, &(slot)); (iter)->index++) +static inline void * +radix_tree_deref_slot(void **slot) +{ + return (*slot); +} + static inline int radix_tree_exception(void *arg) { From nobody Mon Jan 5 20:25:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQlk1r90z6N1Hk for ; Mon, 05 Jan 2026 20:25: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQlk1BTdz3Y51 for ; Mon, 05 Jan 2026 20:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767644722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/r+LOuD5QGSXhH4pz0NiWRzXLzA1vDcZQPmvh45tkfk=; b=YNA+YC1HbfcysS/Vj7XEEx6pspUPmL1NH4RQfyp3jc+Bwwp+9TutpykiWqzS6sJg3IbzR/ qEutquNCiV93xfQVWF0DxN4kgFLY2MbTVx25qrC6fMdYD9wjMiU4MmFjg2aZlSIxxJof11 05laANkI99ujz7aI1j5FVqDB0HkidXLTlQNPyawESQnB8R053RlznHEYMNn44Fzi83TK4m lWhonFgp+aWgzJ5kjWLhMH6IIoxeNmrYod3nIUgiDCoeVSjFBexaL/6y6kwNxzpSga7vAo KOg/fYKXhNndNsqy5LHJGI52asAIeVOrGJnbCyxO+Bo1ys7Qk2SVqeJ1Proolg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767644722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/r+LOuD5QGSXhH4pz0NiWRzXLzA1vDcZQPmvh45tkfk=; b=AiKdj3pB33/N0ISD+jvNrhWngBK7PvEs4Dlmg3dVXQp6Ix/yPU6smfT/NHlFy1xuV7SuJ+ uuRer6uOak6+v6ZrNis5EZOR/UjV++Q7wc/najnc2txPt6sQeuidPXy9qkclOzQLR0+CDH i/zp9ixnSrOVFosWyFm5L9omXjv+aDTfXtvpJeF+nqmpoo4fXkAdNGQqpXzH1q8DWfYPzi 4Q5cFi1iQ9kVt6gq8NkgMLlzzh27amKkHOUw+/owXuqjhqOGRbMtRg0553N7H8+tFa04K4 PDgK9103NnLadA1WkR1jctO6E+uF5FwP+QVWUl2QA19Naj5LluJl6ujEcWdHIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767644722; a=rsa-sha256; cv=none; b=OoWLIw6Y45C6nadzlXctJP8QCRxV48hC6iRlPGwRRegpTs6qMGdFNhs3ov8BOsAYAee/lG YJHR/OwiIhVPGl6wyvp8UqdlUbF+dntxfY6N2u/fjITr5dg1fwBjx3v+TweyUfEZUGXWn2 rSVHt6vM9Wcld8IBaGm+C6ptXAaYDqfAtfGp7G1qiVRYXimZI6sebLCO1P2pVdJUKOzVPm 07aDEi5l9UIW+yQJe+Jf3QjFzyriZQDHXTNj8ffQG7qERz8WTDsaQWgAtVzYlcesZMRZd7 aTeizo0tij2GBlBIEhzaxrq+43fBi8r+OIOYvKfir01zJnyQnsWXYVZYquffFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQlk0GylzcTL for ; Mon, 05 Jan 2026 20:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a6bb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:25:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 4b047c3af3fe - main - libarchive: merge from vendor branch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 4b047c3af3fec1607ba1cfe04e1d442a17fc1cf6 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:25:21 +0000 Message-Id: <695c1e31.a6bb.520f6459@gitrepo.freebsd.org> The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=4b047c3af3fec1607ba1cfe04e1d442a17fc1cf6 commit 4b047c3af3fec1607ba1cfe04e1d442a17fc1cf6 Merge: 4c89b333808a 01333e8c4dd7 Author: Martin Matuska AuthorDate: 2026-01-05 20:14:54 +0000 Commit: Martin Matuska CommitDate: 2026-01-05 20:16:19 +0000 libarchive: merge from vendor branch libarchive 3.8.5 Important bugfixes: #2809 bsdtar: fix regression from 3.8.4 zero-length pattern issue bugfix Obtained from: libarchive Vendor commit: dd897a78c662a2c7a003e7ec158cea7909557bee MFC after: 1 week contrib/libarchive/NEWS | 2 ++ contrib/libarchive/README.md | 4 ++-- contrib/libarchive/cpio/cpio.c | 2 +- contrib/libarchive/libarchive/archive.h | 4 ++-- contrib/libarchive/libarchive/archive_entry.h | 2 +- .../libarchive/archive_read_support_filter_uu.c | 8 ++++---- .../libarchive/archive_read_support_format_cab.c | 2 +- .../libarchive/archive_read_support_format_cpio.c | 6 +++--- .../libarchive/archive_read_support_format_lha.c | 2 +- .../libarchive/archive_read_support_format_mtree.c | 12 ++++++------ contrib/libarchive/libarchive/archive_string.c | 4 ++-- contrib/libarchive/libarchive/archive_util.c | 2 +- contrib/libarchive/libarchive/archive_write_open_fd.c | 6 +----- .../libarchive/libarchive/archive_write_open_file.c | 6 +----- .../libarchive/libarchive/archive_write_open_memory.c | 6 +----- .../libarchive/archive_write_set_format_shar.c | 5 ++++- .../libarchive/archive_write_set_format_ustar.c | 2 +- contrib/libarchive/libarchive/test/test_compat_lzip.c | 4 ++-- contrib/libarchive/libarchive_fe/line_reader.c | 2 ++ contrib/libarchive/tar/subst.c | 16 ++++++++-------- contrib/libarchive/tar/write.c | 5 ++--- contrib/libarchive/test_utils/test_main.c | 19 ++++++++++++++++--- contrib/libarchive/unzip/bsdunzip.c | 4 ++-- contrib/libarchive/unzip/la_queue.h | 2 +- 24 files changed, 67 insertions(+), 60 deletions(-) diff --cc contrib/libarchive/README.md index 0d63357292ec,000000000000..e9691f1b710b mode 100644,000000..100644 --- a/contrib/libarchive/README.md +++ b/contrib/libarchive/README.md @@@ -1,247 -1,0 +1,247 @@@ +# Welcome to libarchive! + +The libarchive project develops a portable, efficient C library that +can read and write streaming archives in a variety of formats. It +also includes implementations of the common `tar`, `cpio`, and `zcat` +command-line tools that use the libarchive library. + +## Questions? Issues? + +* https://www.libarchive.org is the home for ongoing + libarchive development, including documentation, + and links to the libarchive mailing lists. +* To report an issue, use the issue tracker at + https://github.com/libarchive/libarchive/issues +* To submit an enhancement to libarchive, please + submit a pull request via GitHub: https://github.com/libarchive/libarchive/pulls + +## Contents of the Distribution + +This distribution bundle includes the following major components: + +* **libarchive**: a library for reading and writing streaming archives +* **tar**: the 'bsdtar' program is a full-featured 'tar' implementation built on libarchive +* **cpio**: the 'bsdcpio' program is a different interface to essentially the same functionality +* **cat**: the 'bsdcat' program is a simple replacement tool for zcat, bzcat, xzcat, and such +* **unzip**: the 'bsdunzip' program is a simple replacement tool for Info-ZIP's unzip +* **examples**: Some small example programs that you may find useful. +* **examples/minitar**: a compact sample demonstrating use of libarchive. +* **contrib**: Various items sent to me by third parties; please contact the authors with any questions. + +The top-level directory contains the following information files: + +* **NEWS** - highlights of recent changes +* **COPYING** - what you can do with this +* **INSTALL** - installation instructions +* **README** - this file +* **CMakeLists.txt** - input for "cmake" build tool, see INSTALL +* **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`). + +The following files in the top-level directory are used by the 'configure' script: + +* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers +* `Makefile.in`, `config.h.in` - templates used by configure script + +## Documentation + +In addition to the informational articles and documentation +in the online [libarchive Wiki](https://github.com/libarchive/libarchive/wiki), +the distribution also includes a number of manual pages: + + * bsdtar.1 explains the use of the bsdtar program + * bsdcpio.1 explains the use of the bsdcpio program + * bsdcat.1 explains the use of the bsdcat program + * libarchive.3 gives an overview of the library as a whole + * archive_read.3, archive_write.3, archive_write_disk.3, and + archive_read_disk.3 provide detailed calling sequences for the read + and write APIs + * archive_entry.3 details the "struct archive_entry" utility class + * archive_internals.3 provides some insight into libarchive's + internal structure and operation. + * libarchive-formats.5 documents the file formats supported by the library + * cpio.5, mtree.5, and tar.5 provide detailed information about these + popular archive formats, including hard-to-find details about + modern cpio and tar variants. + +The manual pages above are provided in the 'doc' directory in +a number of different formats. + +You should also read the copious comments in `archive.h` and the +source code for the sample programs for more details. Please let us +know about any errors or omissions you find. + +## Supported Formats + +Currently, the library automatically detects and reads the following formats: + + * Old V7 tar archives + * POSIX ustar + * GNU tar format (including GNU long filenames, long link names, and sparse files) + * Solaris 9 extended tar format (including ACLs) + * POSIX pax interchange format + * POSIX octet-oriented cpio + * SVR4 ASCII cpio + * Binary cpio (big-endian or little-endian) + * PWB binary cpio + * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions) + * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives) + * ZIPX archives (with support for bzip2, zstd, ppmd8, lzma and xz compressed entries) + * GNU and BSD 'ar' archives + * 'mtree' format + * 7-Zip archives (including archives that use zstandard compression) + * Microsoft CAB format + * LHA and LZH archives + * RAR and RAR 5.0 archives (with some limitations due to RAR's proprietary status) + * WARC archives + * XAR archives + +The library also detects and handles any of the following before evaluating the archive: + + * uuencoded files + * files with RPM wrapper + * gzip compression + * bzip2 compression + * compress/LZW compression + * lzma, lzip, and xz compression + * lz4 compression + * lzop compression + * zstandard compression + +The library can create archives in any of the following formats: + + * POSIX ustar + * POSIX pax interchange format + * "restricted" pax format, which will create ustar archives except for + entries that require pax extensions (for long filenames, ACLs, etc). + * Old GNU tar format + * Old V7 tar format + * POSIX octet-oriented cpio + * SVR4 "newc" cpio + * Binary cpio (little-endian) + * PWB binary cpio + * shar archives + * ZIP archives (with uncompressed or "deflate" compressed entries) + * ZIPX archives (with bzip2, zstd, lzma or xz compressed entries) + * GNU and BSD 'ar' archives + * 'mtree' format + * ISO9660 format + * 7-Zip archives (including archives that use zstandard compression) + * WARC archives + * XAR archives + +When creating archives, the result can be filtered with any of the following: + + * uuencode + * base64 + * gzip compression + * bzip2 compression + * compress/LZW compression + * lzma, lzip, and xz compression + * lz4 compression + * lzop compression + * zstandard compression + +## Notes about the Library Design + +The following notes address many of the most common +questions we are asked about libarchive: + +* This is a heavily stream-oriented system. That means that + it is optimized to read or write the archive in a single + pass from beginning to end. For example, this allows + libarchive to process archives too large to store on disk + by processing them on-the-fly as they are read from or + written to a network or tape drive. This also makes + libarchive useful for tools that need to produce + archives on-the-fly (such as webservers that provide + archived contents of a users account). + +* In-place modification and random access to the contents + of an archive are not directly supported. For some formats, + this is not an issue: For example, tar.gz archives are not + designed for random access. In some other cases, libarchive + can re-open an archive and scan it from the beginning quickly + enough to provide the needed abilities even without true + random access. Of course, some applications do require true + random access; those applications should consider alternatives + to libarchive. + +* The library is designed to be extended with new compression and + archive formats. The only requirement is that the format be + readable or writable as a stream and that each archive entry be + independent. There are articles on the libarchive Wiki explaining + how to extend libarchive. + +* On read, compression and format are always detected automatically. + +* The same API is used for all formats; it should be very + easy for software using libarchive to transparently handle + any of libarchive's archiving formats. + +* Libarchive's automatic support for decompression can be used + without archiving by explicitly selecting the "raw" and "empty" + formats. + +* I've attempted to minimize static link pollution. If you don't + explicitly invoke a particular feature (such as support for a + particular compression or format), it won't get pulled in to + statically-linked programs. In particular, if you don't explicitly + enable a particular compression or decompression support, you won't + need to link against the corresponding compression or decompression + libraries. This also reduces the size of statically-linked + binaries in environments where that matters. + - * The library is generally _thread safe_ depending on the platform: ++* The library is generally _thread-safe_ depending on the platform: + it does not define any global variables of its own. However, some + platforms do not provide fully thread-safe versions of key C library + functions. On those platforms, libarchive will use the non-thread-safe + functions. Patches to improve this are of great interest to us. + +* The function `archive_write_disk_header()` is _not_ thread safe on + POSIX machines and could lead to security issue resulting in world + writeable directories. Thus it must be mutexed by the calling code. + This is due to calling `umask(oldumask = umask(0))`, which sets the + umask for the whole process to 0 for a short time frame. + In case other thread calls the same function in parallel, it might + get interrupted by it and cause the executable to use umask=0 for the + remaining execution. + This will then lead to implicitly created directories to have 777 + permissions without sticky bit. + +* In particular, libarchive's modules to read or write a directory + tree do use `chdir()` to optimize the directory traversals. This + can cause problems for programs that expect to do disk access from + multiple threads. Of course, those modules are completely + optional and you can use the rest of libarchive without them. + - * The library is _not_ thread aware, however. It does no locking ++* The library is _not_ thread-aware, however. It does no locking + or thread management of any kind. If you create a libarchive + object and need to access it from multiple threads, you will + need to provide your own locking. + +* On read, the library accepts whatever blocks you hand it. + Your read callback is free to pass the library a byte at a time + or mmap the entire archive and give it to the library at once. + On write, the library always produces correctly-blocked output. + +* The object-style approach allows you to have multiple archive streams + open at once. bsdtar uses this in its "@archive" extension. + +* The archive itself is read/written using callback functions. + You can read an archive directly from an in-memory buffer or + write it to a socket, if you wish. There are some utility + functions to provide easy-to-use "open file," etc, capabilities. + +* The read/write APIs are designed to allow individual entries + to be read or written to any data source: You can create + a block of data in memory and add it to a tar archive without + first writing a temporary file. You can also read an entry from + an archive and write the data directly to a socket. If you want + to read/write entries to disk, there are convenience functions to + make this especially easy. + +* Note: The "pax interchange format" is a POSIX standard extended tar + format that should be used when the older _ustar_ format is not + appropriate. It has many advantages over other tar formats + (including the legacy GNU tar format) and is widely supported by + current tar implementations. From nobody Mon Jan 5 20:38:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3J0Jx9z6N1x3 for ; Mon, 05 Jan 2026 20:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlR3H58R3z3Z0v for ; Mon, 05 Jan 2026 20:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Bk4C4RYnqOR7ZlTRXX9rpXmIRSkK6Z/o+b/PDd8HSQ=; b=eeS6Xlpx26XSroLSWHotoqDAyj9d0gKlNBVE2ik13K5lX+mYDEQqgcr9WEpjhOJz3ypiVg kJI4APD49K5v5RiQ5uYHDtQrai53iyNosUuPir3gyzSzrf6pI0waDyZyWpELtp2aiOOyBN aFUpFqmkH1f2j3F+QGuX2FitzFuKMBx3cSa/NCvHPJdCf9s7mwKBiTaYhQyZFZHsfXXHiM nD/YKNUXowsErBUnsvF8uvKakGIjCMXq5Hn9ZS2Fh7e7l9DfyYHQUjjFe8qxNo0cCbtBAv mMagkfYmzsv+hlfBO6IXp03ra+KkO/DbE/+gGSYFh7h9oUQUK9Jt2aqUisy89g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Bk4C4RYnqOR7ZlTRXX9rpXmIRSkK6Z/o+b/PDd8HSQ=; b=KnkEsjCPvu/bf+dYPRCjVT9mF8CoYm/ySMiMYd8c6ZyaECTzb+Fhv09PORWkp1KjKhSxvB Za7b7GSPL00pQ3ixWP89qGogDncWXY3iBxE6tb8EgYfZfnSff8csnZxvFn5zeFOvfQFoVc rRnsbBhPCpak7DzX5oVMKhIa4HVprBgCjjqTRHl9OT5uWTVIhULnpYJXX8FeQQWLxpxGUZ l/y2n+BOgZciH11VKKASfYJ8k/2aj3tjL/NLja51BocC2Tv46+JKduIt7HFHUGdj8qLMPQ wDfwlD05PMrGKvr1q1a49gJCYoA2lf3zro/1k+KkJ+cyaObh3ohhxM55Ms2FUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767645531; a=rsa-sha256; cv=none; b=HOPE/J7KyXhaSsKWPKESDG5LDn6ZXYTdlGD+PXQ6MTNr32HGhugtANO/5B4KW850ysLaSR +mJgWJD6coz9iiT/H574LbbM/2IF520Q4tkr6s8Z337/Veuqk/ML+pAr6HtZWwHp9kjfte yKpSgw3OLxWv63KESKtHRTNQie+Q9qhHx2zPBEhZbmC7/8UM4meN16skZnDd/RIF/MEPuR RB0iHpU7kgFcTmpTmsWa1qkRkcBRPFMJ2UFR/pLpNor2Rr9LlM+yVeHATMZHLQqaA6d9Eo mQbyvePgTYdrELSSv0lb8a8zikJ/rIusxjCOywV0I6/XZmLf2OpMq4o77z93qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3H3vCyzcHZ for ; Mon, 05 Jan 2026 20:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ae88 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:38:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 9f28e92637e9 - main - makefs: tests: Double the timeout of ZFS compression test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f28e92637e9a29124f407b74d7665a921865a53 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:38:51 +0000 Message-Id: <695c215b.ae88.68cc70f1@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=9f28e92637e9a29124f407b74d7665a921865a53 commit 9f28e92637e9a29124f407b74d7665a921865a53 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:31:40 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-05 20:31:40 +0000 makefs: tests: Double the timeout of ZFS compression test The test makefs_zfs_tests:compression is timing out on ci.freebsd.org. Double the default timeout to allow it to finish. While here, check if the file exists before cleaning up, otherwise, cat may fail. Reported by: Jenkins Reviewed by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54424 --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 2fafce85b347..ac4c56796011 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -41,14 +41,18 @@ common_cleanup() # Try to force a TXG, this can help catch bugs by triggering a panic. sync - pool=$(cat $TEST_ZFS_POOL_NAME) - if zpool list "$pool" >/dev/null; then - zpool destroy "$pool" + if [ -f "$TEST_ZFS_POOL_NAME" ]; then + pool=$(cat $TEST_ZFS_POOL_NAME) + if zpool list "$pool" >/dev/null; then + zpool destroy "$pool" + fi fi - md=$(cat $TEST_MD_DEVICE_FILE) - if [ -c /dev/"$md" ]; then - mdconfig -d -u "$md" + if [ -f "$TEST_MD_DEVICE_FILE" ]; then + md=$(cat $TEST_MD_DEVICE_FILE) + if [ -c /dev/"$md" ]; then + mdconfig -d -u "$md" + fi fi } @@ -128,6 +132,12 @@ basic_cleanup() # Try configuring various compression algorithms. # atf_test_case compression cleanup +compression_head() +{ + # Double the default timeout to make it pass on emulated architectures + # on ci.freebsd.org + atf_set "timeout" 600 +} compression_body() { create_test_inputs From nobody Mon Jan 5 20:38:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3J6Fw2z6N20R for ; Mon, 05 Jan 2026 20:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlR3J5HG6z3Z0w for ; Mon, 05 Jan 2026 20:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kzbml8CDV9If3KXaoYfFAy/7NLN4blh0sVZ54woDDag=; b=kSuycy5VVqh9qHQwtNop7h8koUBviGPrXf28Ggf3jTqcWfvAX5XaLplzoQHTbacjvDtxMH ej2IOXSagCAd1SjV/5xtwpvUxrva6kqq0VIJ/OCucK65vbLobVE5T5fIDwx2LrRYqllaTf aQZXYuRjXERWK00sB3Mb7WVEDQkq/hpH9dqF3+ljccHYcKFutF7/S8DWI/RYrO9LbScnuG eUMbGq7ZrHkzji+Y9wRkhYI0Aj93+LJOf6zI8C4KL9vGTKquDwNcBihtxxQ2z/5632sMh7 rASDIb+wj6fCdXVrbm8UWNYlKDjnMYPlZsTt4TxwZUAPd0Z0PNyDOYSl5JCXUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kzbml8CDV9If3KXaoYfFAy/7NLN4blh0sVZ54woDDag=; b=pzqTXyGymgD/5mAZmdNcXHQQVQqjSAqMV72uskGXcAN65A2ZxXZIAA3Zfa4Ra5/e1kZEm5 /W+vZw2Q0F93cCyseOQfEmAF5wQMm3j21Ti057V5yJisuBgQ88CmXFnIehh28iS81v9qXp BP1Bx2pddevlNB4xXyGdBRbhDoeDNK+GIcOySAzJom32/aeGyTrNhGgQkehJ8wwH9swZ/f TGmgAzMKYvprAYZaITaCy5xNfBIn+hz6ROgXpKl6t2DoRG6zKzNc+qe5CKdRJc3As7BtNh APWAiD5WfT5jjuI1rQTyz8p2bfAWEIUPbrOfCdWPaHCMXCsL8bptH33KacBQgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767645532; a=rsa-sha256; cv=none; b=kBMkXl2d+NPoDtH0vQZT861WcqI+bfA0Kel5tqh4Td3PgEXHOdLZuEeMm4n4juIQI1iVXP zTugNjgD8vgiCFcwQC7+I/djI/hjRoMsftFJCpoq1NNVCzmLs5zw8LCsgCbJqT48dYJM0N Aub5umzuTIkXvxDC1y9b8S8qi5St7TCOr26mGguf6zge4xWGDfINfC3NZuNiydF0jWqwvT gW3UgdKucGapP78vxNZFrL82HoFfAfLEHBpAUZofPBpsR4clacvCAd745QALXI7VzdDPZm Z6n6CJuvJXyk+/pdql/wapcSmcIGJWu+W1L6ZZnbIg6+SiOb/uaN+74sv2n6pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3J4dcMzcCS for ; Mon, 05 Jan 2026 20:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ad20 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:38:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 065f02174f76 - main - makefs: tests: Double the timeout of ZFS file_extend test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 065f02174f76a49fbf537ee51ed8068d3d398b08 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:38:52 +0000 Message-Id: <695c215c.ad20.598e5043@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=065f02174f76a49fbf537ee51ed8068d3d398b08 commit 065f02174f76a49fbf537ee51ed8068d3d398b08 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:32:24 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-05 20:32:24 +0000 makefs: tests: Double the timeout of ZFS file_extend test The test makefs_zfs_tests:file_extend is timing out on ci.freebsd.org. Double the default timeout to allow it to finish. Reported by: Jenkins Reviewed by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54425 --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index ac4c56796011..1694fa05683b 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -312,6 +312,12 @@ empty_fs_cleanup() } atf_test_case file_extend cleanup +file_extend_head() +{ + # Double the default timeout to make it pass on emulated architectures + # on ci.freebsd.org + atf_set "timeout" 600 +} file_extend_body() { local i start From nobody Mon Jan 5 20:38:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3L4199z6N1hs for ; Mon, 05 Jan 2026 20:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlR3L10d6z3Z5p for ; Mon, 05 Jan 2026 20:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwQ7V/KiWASR+8pjycNBAORoMl7af2BeFsS+lp07VE4=; b=S1Ro8kz4tAgLSafao+WO8td+hDiS3L5dsJfzKfg/UwlMzfuJ3+kQKO9DVnMRIp1U6ICikj rPmvFWkIvsYxL0kyNqeiV+qcCQlVAaK9kqCoItE5mxcLUW6VRgWfuOF0WpM/nIpLUGRqUA SwnKgPF6D9Lwnjad16ue12tPhhNt20TQJ3HEgXnd8QX0lTrE7sg7AFnCwvzYgZxiquQm2L fpjR/F8OEV0us0iY+bO2JuQDfRJfA1L51J9hbvaahngu0THUYRE+tAaGmLsOSZbVn3JlVA vy7c285fw2I4r0hZOJwvn4Ql7th5Wy1bRScCB8g4s3100SVnoKY+nOiGLgfvnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwQ7V/KiWASR+8pjycNBAORoMl7af2BeFsS+lp07VE4=; b=GOBKshZ9XZppuNEhRZS6w9OoCx+tZqcqN8aRsjg2Zthyq041d5Ie6rFxFPaI7/0de5FAlw a06WDvanzWyNNVJDMdi7N33LWFrE3zKTqAO5PAoUj7Bpf7b6LggU7AE76A2g2ZfiMXndRR GkKBLQDyHd3P8exCt99l/MdlTBySogG4xYiHcHUniPXynPrkFYnuwPU8SwJ+RQdVDyS/pJ LSaRyXAgVTapD+QxEFwq8/n1dgwNOeuVrtM1J/DsFAJvOo/U/iE/R49LRnKKIQyNbH9wbo Me6EPLqev3RGIjPyXDSE9zkCL2H7E9ArsZ5dc2c04YuPXJXMJ6EL+yo9EG96GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767645534; a=rsa-sha256; cv=none; b=mXZ0WdYSqALg2Ctg+13D4EWiX2s0WTvAPA2XZTPMSc9oFCYL88Qk/8ApOxP5mBopE3H/EV ePopRZA4cte1//89WLxnMF+SOcoX2oM6m8PeALzWe+rvGFyfLBQ3Hj5Qpp8MYvbgwLVnAp uv+7ZyjrsPsgOmIcqeeQSf8P4zTJN0Qy1y2NYCBk8CwGG+reQOXx6cisYvYI4yWSMRwpDl wveuTmP8oElldpwvVpHtez8RcwMbGrG3109t4iCjuE4LlA1j5DW7X9N46LSzI8p1PVAyZV b5sbOB7qo2zgEACxEVsBfZdByU1b7WLDJaCkxjVbSD+vkSEfbS9iU5d8bDB64g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3K5GGbzcm7 for ; Mon, 05 Jan 2026 20:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id bc81 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:38:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 0a6deb87c280 - main - makefs: tests: Cleanup and remove default flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a6deb87c2802a47709c58d09b5f9122ed40c157 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:38:53 +0000 Message-Id: <695c215d.bc81.7cba7f20@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=0a6deb87c2802a47709c58d09b5f9122ed40c157 commit 0a6deb87c2802a47709c58d09b5f9122ed40c157 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:32:46 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-05 20:32:46 +0000 makefs: tests: Cleanup and remove default flags Cleanup and remove default atf_check flags for clarity. The following two lines are equivalent: atf_check $cmd atf_check -s exit:0 -e empty -o empty $cmd Update the links to the reference documents. Remove the D_flag_cleanup function, as common_cleanup() for these particular set of tests does two things: 1. Unmount the md(4) device. 2. Destroy the md(4) device. Essentially, one should only call common_cleanup() if the test body invokes mount_image(). This is not the case for D_flag_body(). No functional changes intended. Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54427 --- usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 147 +++++++++++---------------- usr.sbin/makefs/tests/makefs_ffs_tests.sh | 69 +++++-------- usr.sbin/makefs/tests/makefs_msdos_tests.sh | 14 +-- usr.sbin/makefs/tests/makefs_tests_common.sh | 73 +++++++------ usr.sbin/makefs/tests/makefs_zfs_tests.sh | 69 +++++-------- 5 files changed, 154 insertions(+), 218 deletions(-) diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index b36753de3393..5b1a53443290 100644 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -26,11 +26,11 @@ # A note on specs: # - A copy of the ISO-9660 spec can be found here: -# https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf +# https://ecma-international.org/wp-content/uploads/ECMA-119_5th_edition_december_2024.pdf # - Any references to `rockridge` are referring to the `Rock Ridge` extensions # of the ISO-9660 spec. A copy of the draft `IEEE-P1282` spec can be found # here: -# http://www.ymi.com/ymi/sites/default/files/pdf/Rockridge.pdf +# https://people.freebsd.org/~emaste/rrip112.pdf MAKEFS="makefs -t cd9660" MOUNT="mount_cd9660" @@ -54,35 +54,28 @@ check_base_iso9660_image_contents() # specified, and directories cannot contain a '.'. check_image_contents "$@" -X c -X .g -X _g - atf_check -e empty -o empty -s exit:0 test -L $TEST_INPUTS_DIR/c - atf_check -e empty -o empty -s exit:0 test -f $TEST_MOUNT_DIR/c + atf_check test -L $TEST_INPUTS_DIR/c + atf_check test -f $TEST_MOUNT_DIR/c } -atf_test_case D_flag cleanup +atf_test_case D_flag D_flag_body() { atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" create_test_inputs - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -cp $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR + atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o empty -s exit:0 \ - cp $TEST_SPEC_FILE spec2.mtree - atf_check -e empty -o save:dupe_$TEST_SPEC_FILE -s exit:0 \ - cat $TEST_SPEC_FILE spec2.mtree + atf_check cp $TEST_SPEC_FILE spec2.mtree + atf_check -o save:${TEST_SPEC_FILE}_dupe cat $TEST_SPEC_FILE spec2.mtree - atf_check -e empty -o not-empty -s not-exit:0 \ - $MAKEFS -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS -D -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR -} -D_flag_cleanup() -{ - common_cleanup + atf_check -o not-empty -s not-exit:0 \ + $MAKEFS -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -o not-empty \ + $MAKEFS -D -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR } atf_test_case F_flag cleanup @@ -90,11 +83,9 @@ F_flag_body() { create_test_inputs - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -cp $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents @@ -109,11 +100,10 @@ from_mtree_spec_file_body() { create_test_inputs - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE \ mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE + atf_check $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE cd - mount_image @@ -131,12 +121,10 @@ from_multiple_dirs_body() create_test_inputs - atf_check -e empty -o empty -s exit:0 mkdir -p $test_inputs_dir2 - atf_check -e empty -o empty -s exit:0 \ - touch $test_inputs_dir2/multiple_dirs_test_file + atf_check mkdir -p $test_inputs_dir2 + atf_check touch $test_inputs_dir2/multiple_dirs_test_file - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 + atf_check $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 mount_image check_base_iso9660_image_contents -d $test_inputs_dir2 @@ -151,8 +139,7 @@ from_single_dir_body() { create_test_inputs - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents @@ -168,11 +155,9 @@ o_flag_allow_deep_trees_body() create_test_inputs # Make sure the "more than 8 levels deep" requirement is met. - atf_check -e empty -o empty -s exit:0 \ - mkdir -p $TEST_INPUTS_DIR/a/b/c/d/e/f/g/h/i/j + atf_check mkdir -p $TEST_INPUTS_DIR/a/b/c/d/e/f/g/h/i/j - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o allow-deep-trees $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -o allow-deep-trees $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents @@ -185,17 +170,16 @@ o_flag_allow_deep_trees_cleanup() atf_test_case o_flag_allow_max_name cleanup o_flag_allow_max_name_body() { - atf_expect_fail "-o allow-max-name doesn't appear to be implemented on FreeBSD's copy of makefs [yet]" + atf_skip "-o allow-max-name is not implemented" create_test_inputs long_path=$TEST_INPUTS_DIR/$(jot -s '' -b 0 37) # Make sure the "37 char name" limit requirement is met. - atf_check -e empty -o empty -s exit:0 touch $long_path + atf_check touch $long_path - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o allow-max-name $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -o allow-max-name $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents @@ -208,12 +192,11 @@ o_flag_allow_max_name_cleanup() atf_test_case o_flag_isolevel_1 cleanup o_flag_isolevel_1_body() { - atf_expect_fail "this testcase needs work; the filenames generated seem incorrect/corrupt" + atf_skip "-o isolevel=1 is failing" create_test_inputs - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o isolevel=1 $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -o isolevel=1 $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents @@ -228,8 +211,7 @@ o_flag_isolevel_2_body() { create_test_inputs - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o isolevel=2 $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -o isolevel=2 $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents @@ -242,19 +224,19 @@ o_flag_isolevel_2_cleanup() atf_test_case o_flag_isolevel_3 cleanup o_flag_isolevel_3_body() { - create_test_inputs - # XXX: isolevel=3 isn't implemented yet. See FreeBSD bug # 203645 - if true; then - atf_check -e match:'makefs: ISO Level 3 is greater than 2\.' -o empty -s not-exit:0 \ - $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR - else - atf_check -e empty -o empty -s exit:0 \ + atf_check -e match:'makefs: ISO Level 3 is greater than 2\.' \ + -s not-exit:0 \ $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR + atf_skip "-o isolevel=3 is not implemented" + + create_test_inputs + + atf_check $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR + mount_image check_base_iso9660_image_contents - fi } o_flag_isolevel_3_cleanup() { @@ -273,11 +255,9 @@ o_flag_preparer_body() preparer='My Very First ISO' preparer_uppercase="$(echo $preparer | tr '[[:lower:]]' '[[:upper:]]')" - atf_check -e empty -o empty -s exit:0 touch $TEST_INPUTS_DIR/dummy_file - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o preparer="$preparer" $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o match:"$preparer_uppercase" -s exit:0 \ - strings $TEST_IMAGE + atf_check touch $TEST_INPUTS_DIR/dummy_file + atf_check $MAKEFS -o preparer="$preparer" $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -o match:"$preparer_uppercase" strings $TEST_IMAGE } atf_test_case o_flag_publisher @@ -292,11 +272,9 @@ o_flag_publisher_body() publisher='My Super Awesome Publishing Company LTD' publisher_uppercase="$(echo $publisher | tr '[[:lower:]]' '[[:upper:]]')" - atf_check -e empty -o empty -s exit:0 touch $TEST_INPUTS_DIR/dummy_file - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o publisher="$publisher" $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o match:"$publisher_uppercase" -s exit:0 \ - strings $TEST_IMAGE + atf_check touch $TEST_INPUTS_DIR/dummy_file + atf_check $MAKEFS -o publisher="$publisher" $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -o match:"$publisher_uppercase" strings $TEST_IMAGE } atf_test_case o_flag_rockridge cleanup @@ -305,27 +283,24 @@ o_flag_rockridge_body() create_test_dirs # Make sure the "more than 8 levels deep" requirement is met. - atf_check -e empty -o empty -s exit:0 \ - mkdir -p $TEST_INPUTS_DIR/a/b/c/d/e/f/g/h/i/j + atf_check mkdir -p $TEST_INPUTS_DIR/a/b/c/d/e/f/g/h/i/j # Make sure the "pathname larger than 255 chars" requirement is met. # # $long_path's needs to be nested in a directory, as creating it # outright as a 256 char filename via touch will fail with ENAMETOOLONG long_path=$TEST_INPUTS_DIR/$(jot -s '/' -b "$(jot -s '' -b 0 64)" 4) - atf_check -e empty -o empty -s exit:0 mkdir -p "$(dirname $long_path)" - atf_check -e empty -o empty -s exit:0 touch "$long_path" + atf_check mkdir -p "$(dirname $long_path)" + atf_check touch "$long_path" - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_image_contents -X .rr_moved # .rr_moved is a special directory created when you have deep directory # trees with rock ridge extensions on - atf_check -e empty -o empty -s exit:0 \ - test -d $TEST_MOUNT_DIR/.rr_moved + atf_check test -d $TEST_MOUNT_DIR/.rr_moved } o_flag_rockridge_cleanup() { @@ -342,13 +317,12 @@ o_flag_rockridge_dev_nodes_body() create_test_dirs (tar -cvf - -C /dev null && touch .tar_ok) | \ - atf_check -e not-empty -o empty -s exit:0 tar -xvf - -C "$TEST_INPUTS_DIR" + atf_check -e not-empty tar -xvf - -C "$TEST_INPUTS_DIR" - atf_check -e empty -o empty -s exit:0 test -c $TEST_INPUTS_DIR/null - atf_check -e empty -o empty -s exit:0 test -f .tar_ok + atf_check test -c $TEST_INPUTS_DIR/null + atf_check test -f .tar_ok - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_image_contents @@ -365,8 +339,7 @@ T_flag_dir_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR mount_image eval $(stat -s $TEST_MOUNT_DIR/dir1) @@ -389,10 +362,9 @@ T_flag_F_flag_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type,time" -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F - atf_check -e empty -o not-empty -s exit:0 \ + atf_check \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -414,10 +386,8 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k "type" -p $TEST_INPUTS_DIR - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_SPEC_FILE + atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_SPEC_FILE mount_image eval $(stat -s $TEST_MOUNT_DIR/dir1) @@ -446,8 +416,7 @@ duplicate_names_body() mkdir -p $TEST_INPUTS_DIR/${dir_prefix}2 mkdir -p $TEST_INPUTS_DIR/${dir_prefix}3 - atf_check -e empty -o empty -s exit:0 \ - $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR + atf_check $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR # Disable Rock Ridge extensions to read the plain ISO Level 2 names. mount_image -r diff --git a/usr.sbin/makefs/tests/makefs_ffs_tests.sh b/usr.sbin/makefs/tests/makefs_ffs_tests.sh index f828f632b06e..6b8fb4afd707 100644 --- a/usr.sbin/makefs/tests/makefs_ffs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_ffs_tests.sh @@ -44,7 +44,7 @@ common_cleanup() check_ffs_image_contents() { - atf_check -e save:$TEST_TUNEFS_OUTPUT -o empty -s exit:0 \ + atf_check -e save:$TEST_TUNEFS_OUTPUT \ tunefs -p /dev/$(cat $TEST_MD_DEVICE_FILE) check_image_contents "$@" @@ -56,12 +56,11 @@ autocalculate_image_size_body() { create_test_inputs - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE \ mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE + atf_check -o not-empty $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE cd - mount_image @@ -72,31 +71,24 @@ autocalculate_image_size_cleanup() common_cleanup } -atf_test_case D_flag cleanup +atf_test_case D_flag D_flag_body() { atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" create_test_inputs - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -cp $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR + atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o empty -s exit:0 \ - cp $TEST_SPEC_FILE spec2.mtree - atf_check -e empty -o save:dupe_$TEST_SPEC_FILE -s exit:0 \ - cat $TEST_SPEC_FILE spec2.mtree + atf_check cp $TEST_SPEC_FILE spec2.mtree + atf_check -o save:${TEST_SPEC_FILE}_dupe cat $TEST_SPEC_FILE spec2.mtree - atf_check -e empty -o not-empty -s not-exit:0 \ - $MAKEFS -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS -D -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR -} -D_flag_cleanup() -{ - common_cleanup + atf_check -o not-empty -s not-exit:0 \ + $MAKEFS -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -o not-empty \ + $MAKEFS -D -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR } atf_test_case F_flag cleanup @@ -104,10 +96,9 @@ F_flag_body() { create_test_inputs - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -cp $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -123,12 +114,11 @@ from_mtree_spec_file_body() { create_test_inputs - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE \ mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE + atf_check -o not-empty $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE cd - mount_image @@ -146,11 +136,10 @@ from_multiple_dirs_body() create_test_inputs - atf_check -e empty -o empty -s exit:0 mkdir -p $test_inputs_dir2 - atf_check -e empty -o empty -s exit:0 \ - touch $test_inputs_dir2/multiple_dirs_test_file + atf_check mkdir -p $test_inputs_dir2 + atf_check touch $test_inputs_dir2/multiple_dirs_test_file - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -M 1m $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 mount_image @@ -166,8 +155,7 @@ from_single_dir_body() { create_test_inputs - atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -o not-empty $MAKEFS -M 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_ffs_image_contents @@ -197,7 +185,7 @@ o_flag_version_1_body() create_test_inputs - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -M 1m -o version=$ffs_version $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -229,7 +217,7 @@ o_flag_version_2_body() create_test_inputs - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -M 1m -o version=$ffs_version $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -249,7 +237,7 @@ T_flag_dir_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -M 1m -T $timestamp $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -273,10 +261,9 @@ T_flag_F_flag_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type,time" -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -M 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -298,9 +285,8 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k "type" -p $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o not-empty \ $MAKEFS -M 1m -T $timestamp $TEST_IMAGE $TEST_SPEC_FILE mount_image @@ -317,7 +303,6 @@ T_flag_mtree_cleanup() atf_init_test_cases() { - atf_add_test_case autocalculate_image_size atf_add_test_case D_flag diff --git a/usr.sbin/makefs/tests/makefs_msdos_tests.sh b/usr.sbin/makefs/tests/makefs_msdos_tests.sh index ce246f3d268c..00ab1509ef55 100644 --- a/usr.sbin/makefs/tests/makefs_msdos_tests.sh +++ b/usr.sbin/makefs/tests/makefs_msdos_tests.sh @@ -30,6 +30,7 @@ MAKEFS="makefs -t msdos" MOUNT="mount_msdosfs" + . "$(dirname "$0")/makefs_tests_common.sh" common_cleanup() @@ -53,7 +54,7 @@ T_flag_dir_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -T $timestamp -s 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -77,10 +78,10 @@ T_flag_F_flag_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE \ mtree -c -k "type,time" -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -s 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image @@ -102,14 +103,13 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k "type" -p $TEST_INPUTS_DIR - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o not-empty \ $MAKEFS -T $timestamp -s 1m $TEST_IMAGE $TEST_SPEC_FILE mount_image eval $(stat -s $TEST_MOUNT_DIR/dir1) - # FAT directory entries don't have an access time, just a date. + # FAT directory entries don't have an access time, just a date. #atf_check_equal $st_atime $timestamp atf_check_equal $st_mtime $timestamp atf_check_equal $st_ctime $timestamp diff --git a/usr.sbin/makefs/tests/makefs_tests_common.sh b/usr.sbin/makefs/tests/makefs_tests_common.sh index edb79bc811e1..fa2cbaff9521 100644 --- a/usr.sbin/makefs/tests/makefs_tests_common.sh +++ b/usr.sbin/makefs/tests/makefs_tests_common.sh @@ -75,16 +75,14 @@ check_image_contents() echo "<---- Input spec BEGIN ---->" cat $mtree_file echo "<---- Input spec END ---->" - atf_check -e empty -o empty -s exit:0 \ - mtree -UW -f $mtree_file \ - -p $TEST_MOUNT_DIR \ - $mtree_excludes_arg + atf_check mtree -UW -f $mtree_file \ + -p $TEST_MOUNT_DIR $mtree_excludes_arg } create_test_dirs() { - atf_check -e empty -s exit:0 mkdir -m 0777 -p $TEST_MOUNT_DIR - atf_check -e empty -s exit:0 mkdir -m 0777 -p $TEST_INPUTS_DIR + atf_check mkdir -m 0777 -p $TEST_MOUNT_DIR + atf_check mkdir -m 0777 -p $TEST_INPUTS_DIR } create_test_inputs() @@ -93,40 +91,39 @@ create_test_inputs() cd $TEST_INPUTS_DIR - atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b/1 - atf_check -e empty -s exit:0 ln -s a/b c - atf_check -e empty -s exit:0 touch d - atf_check -e empty -s exit:0 ln d e - atf_check -e empty -s exit:0 touch .f - atf_check -e empty -s exit:0 mkdir .g + atf_check mkdir -m 0755 -p a/b/1 + atf_check ln -s a/b c + atf_check touch d + atf_check ln d e + atf_check touch .f + atf_check mkdir .g # XXX: fifos on the filesystem don't match fifos created by makefs for # some odd reason. - #atf_check -e empty -s exit:0 mkfifo h - atf_check -e ignore -s exit:0 dd if=/dev/zero of=i count=1000 bs=1 - atf_check -e empty -s exit:0 touch klmn - atf_check -e empty -s exit:0 touch opqr - atf_check -e empty -s exit:0 touch stuv - atf_check -e empty -s exit:0 install -m 0755 /dev/null wxyz - atf_check -e empty -s exit:0 touch 0b00000001 - atf_check -e empty -s exit:0 touch 0b00000010 - atf_check -e empty -s exit:0 touch 0b00000011 - atf_check -e empty -s exit:0 touch 0b00000100 - atf_check -e empty -s exit:0 touch 0b00000101 - atf_check -e empty -s exit:0 touch 0b00000110 - atf_check -e empty -s exit:0 touch 0b00000111 - atf_check -e empty -s exit:0 touch 0b00001000 - atf_check -e empty -s exit:0 touch 0b00001001 - atf_check -e empty -s exit:0 touch 0b00001010 - atf_check -e empty -s exit:0 touch 0b00001011 - atf_check -e empty -s exit:0 touch 0b00001100 - atf_check -e empty -s exit:0 touch 0b00001101 - atf_check -e empty -s exit:0 touch 0b00001110 + #atf_check mkfifo h + atf_check -e ignore dd if=/dev/zero of=i count=1000 bs=1 + atf_check touch klmn + atf_check touch opqr + atf_check touch stuv + atf_check install -m 0755 /dev/null wxyz + atf_check touch 0b00000001 + atf_check touch 0b00000010 + atf_check touch 0b00000011 + atf_check touch 0b00000100 + atf_check touch 0b00000101 + atf_check touch 0b00000110 + atf_check touch 0b00000111 + atf_check touch 0b00001000 + atf_check touch 0b00001001 + atf_check touch 0b00001010 + atf_check touch 0b00001011 + atf_check touch 0b00001100 + atf_check touch 0b00001101 + atf_check touch 0b00001110 for filesize in 1 512 $(( 2 * $KB )) $(( 10 * $KB )) $(( 512 * $KB )); \ do - atf_check -e ignore -o empty -s exit:0 \ - dd if=/dev/zero of=${filesize}.file bs=1 \ - count=1 oseek=${filesize} conv=sparse + atf_check -e ignore dd if=/dev/zero of=${filesize}.file bs=1 \ + count=${filesize} conv=sparse files="${files} ${filesize}.file" done @@ -135,10 +132,8 @@ create_test_inputs() mount_image() { - atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ - mdconfig -a -f $TEST_IMAGE - atf_check -e empty -o empty -s exit:0 \ - $MOUNT ${1} /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR + atf_check -o save:$TEST_MD_DEVICE_FILE mdconfig -a -f $TEST_IMAGE + atf_check $MOUNT ${1} /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR } change_mtree_timestamp() diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 1694fa05683b..7dd6005e49ec 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -58,9 +58,8 @@ common_cleanup() import_image() { - atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ - mdconfig -a -f $TEST_IMAGE - atf_check -o ignore -e empty -s exit:0 \ + atf_check -o save:$TEST_MD_DEVICE_FILE mdconfig -a -f $TEST_IMAGE + atf_check -o ignore \ zdb -e -p /dev/$(cat $TEST_MD_DEVICE_FILE) -mmm -ddddd $ZFS_POOL_NAME atf_check zpool import -R $TEST_MOUNT_DIR $ZFS_POOL_NAME echo "$ZFS_POOL_NAME" > $TEST_ZFS_POOL_NAME @@ -167,11 +166,11 @@ compression_body() fi # The "dir" dataset's compression algorithm should be # inherited from the root dataset. - atf_check -o inline:$alg\\n -e empty -s exit:0 \ + atf_check -o inline:$alg\\n \ zfs get -H -o value compression ${ZFS_POOL_NAME} - atf_check -o inline:$alg\\n -e empty -s exit:0 \ + atf_check -o inline:$alg\\n \ zfs get -H -o value compression ${ZFS_POOL_NAME}/dir - atf_check -o inline:off\\n -e empty -s exit:0 \ + atf_check -o inline:off\\n \ zfs get -H -o value compression ${ZFS_POOL_NAME}/dir2 atf_check -e ignore dd if=/dev/random \ @@ -184,7 +183,7 @@ compression_body() # Export and reimport to ensure that everything is # flushed to disk. atf_check zpool export ${ZFS_POOL_NAME} - atf_check -o ignore -e empty -s exit:0 \ + atf_check -o ignore \ zdb -e -p /dev/$(cat $TEST_MD_DEVICE_FILE) -mmm -ddddd \ $ZFS_POOL_NAME atf_check zpool import -R $TEST_MOUNT_DIR $ZFS_POOL_NAME @@ -413,20 +412,16 @@ hard_links_body() stat -f '%i' ${TEST_MOUNT_DIR}/1 > ./ino stat -f '%l' ${TEST_MOUNT_DIR}/1 > ./nlink for f in 1 2 dir/1; do - atf_check -o file:./nlink -e empty -s exit:0 \ - stat -f '%l' ${TEST_MOUNT_DIR}/${f} - atf_check -o file:./ino -e empty -s exit:0 \ - stat -f '%i' ${TEST_MOUNT_DIR}/${f} + atf_check -o file:./nlink stat -f '%l' ${TEST_MOUNT_DIR}/${f} + atf_check -o file:./ino stat -f '%i' ${TEST_MOUNT_DIR}/${f} atf_check cmp -s ${TEST_INPUTS_DIR}/1 ${TEST_MOUNT_DIR}/${f} done stat -f '%i' ${TEST_MOUNT_DIR}/dir/a > ./ino stat -f '%l' ${TEST_MOUNT_DIR}/dir/a > ./nlink for f in dir/a dir/b a; do - atf_check -o file:./nlink -e empty -s exit:0 \ - stat -f '%l' ${TEST_MOUNT_DIR}/${f} - atf_check -o file:./ino -e empty -s exit:0 \ - stat -f '%i' ${TEST_MOUNT_DIR}/${f} + atf_check -o file:./nlink stat -f '%l' ${TEST_MOUNT_DIR}/${f} + atf_check -o file:./ino stat -f '%i' ${TEST_MOUNT_DIR}/${f} atf_check cmp -s ${TEST_INPUTS_DIR}/dir/a ${TEST_MOUNT_DIR}/${f} done } @@ -535,19 +530,19 @@ multi_dataset_1_body() check_image_contents # Make sure that we have three datasets with the expected mount points. - atf_check -o inline:${ZFS_POOL_NAME}\\n -e empty -s exit:0 \ + atf_check -o inline:${ZFS_POOL_NAME}\\n \ zfs list -H -o name ${ZFS_POOL_NAME} - atf_check -o inline:${TEST_MOUNT_DIR}\\n -e empty -s exit:0 \ + atf_check -o inline:${TEST_MOUNT_DIR}\\n \ zfs list -H -o mountpoint ${ZFS_POOL_NAME} - atf_check -o inline:${ZFS_POOL_NAME}/dir1\\n -e empty -s exit:0 \ + atf_check -o inline:${ZFS_POOL_NAME}/dir1\\n \ zfs list -H -o name ${ZFS_POOL_NAME}/dir1 - atf_check -o inline:${TEST_MOUNT_DIR}/dir1\\n -e empty -s exit:0 \ + atf_check -o inline:${TEST_MOUNT_DIR}/dir1\\n \ zfs list -H -o mountpoint ${ZFS_POOL_NAME}/dir1 - atf_check -o inline:${ZFS_POOL_NAME}/dir2\\n -e empty -s exit:0 \ + atf_check -o inline:${ZFS_POOL_NAME}/dir2\\n \ zfs list -H -o name ${ZFS_POOL_NAME}/dir2 - atf_check -o inline:${TEST_MOUNT_DIR}/dir2\\n -e empty -s exit:0 \ + atf_check -o inline:${TEST_MOUNT_DIR}/dir2\\n \ zfs list -H -o mountpoint ${ZFS_POOL_NAME}/dir2 } multi_dataset_1_cleanup() @@ -607,7 +602,7 @@ multi_dataset_3_body() import_image - atf_check -o inline:${TEST_MOUNT_DIR}/dir2\\n -e empty -s exit:0 \ + atf_check -o inline:${TEST_MOUNT_DIR}/dir2\\n \ zfs list -H -o mountpoint ${ZFS_POOL_NAME}/dir2 # Mounting dir2 should have created a directory called dir2. Go @@ -641,14 +636,14 @@ multi_dataset_4_body() import_image - atf_check -o inline:none\\n -e empty -s exit:0 \ + atf_check -o inline:none\\n \ zfs list -H -o mountpoint ${ZFS_POOL_NAME}/dir1 check_image_contents atf_check zfs set mountpoint=/dir1 ${ZFS_POOL_NAME}/dir1 atf_check zfs mount ${ZFS_POOL_NAME}/dir1 - atf_check -o inline:${TEST_MOUNT_DIR}/dir1\\n -e empty -s exit:0 \ + atf_check -o inline:${TEST_MOUNT_DIR}/dir1\\n \ zfs list -H -o mountpoint ${ZFS_POOL_NAME}/dir1 # dir1/a should be part of the root dataset, not dir1. @@ -838,14 +833,10 @@ root_props_body() check_image_contents - atf_check -o inline:off\\n -e empty -s exit:0 \ - zfs get -H -o value atime $ZFS_POOL_NAME - atf_check -o inline:local\\n -e empty -s exit:0 \ - zfs get -H -o source atime $ZFS_POOL_NAME - atf_check -o inline:off\\n -e empty -s exit:0 \ - zfs get -H -o value setuid $ZFS_POOL_NAME - atf_check -o inline:local\\n -e empty -s exit:0 \ - zfs get -H -o source setuid $ZFS_POOL_NAME + atf_check -o inline:off\\n zfs get -H -o value atime $ZFS_POOL_NAME + atf_check -o inline:local\\n zfs get -H -o source atime $ZFS_POOL_NAME + atf_check -o inline:off\\n zfs get -H -o value setuid $ZFS_POOL_NAME + atf_check -o inline:local\\n zfs get -H -o source setuid $ZFS_POOL_NAME } root_props_cleanup() { @@ -898,8 +889,7 @@ used_space_props_body() usedchild=$(zfs list -o usedchild -Hp ${ZFS_POOL_NAME}) atf_check test $usedchild -gt $(($childmb * 1024 * 1024)) -a \ $usedchild -le $(($childmb * 1024 * 1024 + $fudge)) - atf_check -o inline:'0\n' \ - zfs list -Hp -o usedchild ${ZFS_POOL_NAME}/dir + atf_check -o inline:'0\n' zfs list -Hp -o usedchild ${ZFS_POOL_NAME}/dir # Make sure that the used property value makes sense: the parent's # value is the sum of the two sizes, and the child's value is the @@ -908,8 +898,7 @@ used_space_props_body() atf_check test $used -gt $(($totalmb * 1024 * 1024)) -a \ $used -le $(($totalmb * 1024 * 1024 + 2 * $fudge)) used=$(zfs list -o used -Hp ${ZFS_POOL_NAME}/dir) - atf_check -o inline:$used'\n' \ - zfs list -Hp -o usedds ${ZFS_POOL_NAME}/dir + atf_check -o inline:$used'\n' zfs list -Hp -o usedds ${ZFS_POOL_NAME}/dir # Both datasets do not have snapshots. atf_check -o inline:'0\n' zfs list -Hp -o usedsnap ${ZFS_POOL_NAME} @@ -956,7 +945,6 @@ perms_body() su -m tests -c ${TEST_INPUTS_DIR}/$mode fi done - } perms_cleanup() { @@ -997,10 +985,10 @@ T_flag_F_flag_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + atf_check -o save:$TEST_SPEC_FILE \ mtree -c -k "type,time" -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F - atf_check -e empty -o not-empty -s exit:0 \ + atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -s 10g -o rootpath=/ \ -o poolname=$ZFS_POOL_NAME $TEST_IMAGE $TEST_INPUTS_DIR @@ -1023,8 +1011,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ - mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR atf_check $MAKEFS -T $timestamp -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \ $TEST_IMAGE $TEST_SPEC_FILE From nobody Mon Jan 5 20:38:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3N1n5mz6N20b for ; Mon, 05 Jan 2026 20:38: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlR3M0Fxmz3ZHM for ; Mon, 05 Jan 2026 20:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X6vxOmridEhUvJ5kZdKbt9/hC+rMQ6eeVTPUj9H8wds=; b=sRLovupFtxE2bySh3FVBZoMrygm5yBFRQPAw3fF8PwXHPzA3IbFL6GCV901yftniy7PweI 8wGOFfL8GhuP7YrQPzB0tCgGwSp4eaeUgyyTa225kz+JXwRa+DDdlV4U58H0Rzi2MqP306 6P0zWHUjOGWcyiKwJSN4wjvb0H/DsbXLXeBWT6J1Bc+2P+Jecyjjf869t2qSq3kQL5x6Iv VfPUiu5YdW7nQPFYyWvmYVlR7ZamROrlftxzbPTP2zvoT6g7mhcOPDMd1VLBMH0gOwDIhE MAU5XsFjs3FrEQldEdxVE+xfQgrKd7jXOvehauvHZHUg9ov3/oj8DYnvJTlt1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X6vxOmridEhUvJ5kZdKbt9/hC+rMQ6eeVTPUj9H8wds=; b=HK1ihNZS4BxNWEKrZyBOhtYPJx7GFje1W0uf2x/+73zBMAxWPiJfugZmyV9pgo/lbkJMGm Pt4+DlknnRKTYj3UEkuP/POxAjjJHLfI6U2B7eMA9VpB0UZoegL0ALbd1Ii0lZjHbtThut XWUx5sS9FyknKZqAiFlJplX6jBZ+5vU2RlMWKmxuEeNRcJ2Pp0hcJ2hydDkDxdFKcqtOpH aKCihATn4RV3dgoEJNcbq1hxT5ZoCyqFYxM2j73ka2MqzNHJK/5FCkTTpHNaVePn+V/T40 fuGGYi2JpTpwwb9fZmRYNTqbWDAa7eQjmfAnQWCKZInuZIZ4oI+VNxSTP4BTbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767645535; a=rsa-sha256; cv=none; b=SQSUY2Yhe2VsTHJ54hTxJq9VSnEoxtjIX1++H06sUvk6sPDu0jZtn/coO/m2jJR2GYaYA6 3B3LduI9HOquneNTm728ezEj9sd5Whuac1yK62C8Z0GJNGbpq9gNc3jpLhH5FYDf+6FnGA fcs2pYEX4hoUc2dgJXSaTdmW7QTYrFsgjufW05WH55670w3GeXY+8Z7AL7+sp5k0Tg9t6q K3AOVyCd2ZgSWyKwQOiW/x0g4/I/crPeiYOmBBdKvpYonxqH/SaArQyWDWU4dNZvwYOdnL gUfTbRs12E7auhLYbCemLMmrV7vFHSGFGafFdatVCxAzdVpvQCmCie5aMiv4Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3L5w6lzcVQ for ; Mon, 05 Jan 2026 20:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b5a6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:38:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 96efda9cd556 - main - makefs: tests: Fix -D flag test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96efda9cd55689ef3fa067281d8b0a42a7122536 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:38:54 +0000 Message-Id: <695c215e.b5a6.6b3a294a@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=96efda9cd55689ef3fa067281d8b0a42a7122536 commit 96efda9cd55689ef3fa067281d8b0a42a7122536 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:33:27 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-05 20:33:27 +0000 makefs: tests: Fix -D flag test As stated in the manual page: -F is almost certainly not the option you are looking for. To create an image from a list of files in an mtree format manifest, specify it as the last argument on the command line, not as the argument to -F. This change does exactly that. Also bug #192839 has already been fixed. Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54428 --- usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 24 +++++++++++++----------- usr.sbin/makefs/tests/makefs_ffs_tests.sh | 24 +++++++++++++----------- usr.sbin/makefs/tests/makefs_tests_common.sh | 8 ++++++++ 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index 5b1a53443290..21382684a96c 100644 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -61,21 +61,23 @@ check_base_iso9660_image_contents() atf_test_case D_flag D_flag_body() { - atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" - create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + create_manifest_file + + # Check that it works + atf_check $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE - atf_check cp $TEST_SPEC_FILE spec2.mtree - atf_check -o save:${TEST_SPEC_FILE}_dupe cat $TEST_SPEC_FILE spec2.mtree + # Duplicate entries in the manifest file + cp $TEST_SPEC_FILE spec2.mtree + cat $TEST_SPEC_FILE spec2.mtree | sort > "${TEST_SPEC_FILE}_dupe" - atf_check -o not-empty -s not-exit:0 \ - $MAKEFS -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -D -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + # Check that it errors + atf_check -e not-empty -s not-exit:0 \ + $MAKEFS -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe + # Check that it warns + atf_check -e not-empty \ + $MAKEFS -D -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe } atf_test_case F_flag cleanup diff --git a/usr.sbin/makefs/tests/makefs_ffs_tests.sh b/usr.sbin/makefs/tests/makefs_ffs_tests.sh index 6b8fb4afd707..e1db5fa1b997 100644 --- a/usr.sbin/makefs/tests/makefs_ffs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_ffs_tests.sh @@ -74,21 +74,23 @@ autocalculate_image_size_cleanup() atf_test_case D_flag D_flag_body() { - atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" - create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + create_manifest_file - atf_check cp $TEST_SPEC_FILE spec2.mtree - atf_check -o save:${TEST_SPEC_FILE}_dupe cat $TEST_SPEC_FILE spec2.mtree + # Check that it works + atf_check -o not-empty $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE - atf_check -o not-empty -s not-exit:0 \ - $MAKEFS -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -D -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + # Duplicate entries in the manifest file + cp $TEST_SPEC_FILE spec2.mtree + cat $TEST_SPEC_FILE spec2.mtree | sort > "${TEST_SPEC_FILE}_dupe" + + # Check that it errors + atf_check -e not-empty -s not-exit:0 \ + $MAKEFS -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe + # Check that it warns + atf_check -e not-empty -o not-empty \ + $MAKEFS -D -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe } atf_test_case F_flag cleanup diff --git a/usr.sbin/makefs/tests/makefs_tests_common.sh b/usr.sbin/makefs/tests/makefs_tests_common.sh index fa2cbaff9521..44b02557925a 100644 --- a/usr.sbin/makefs/tests/makefs_tests_common.sh +++ b/usr.sbin/makefs/tests/makefs_tests_common.sh @@ -79,6 +79,14 @@ check_image_contents() -p $TEST_MOUNT_DIR $mtree_excludes_arg } +create_manifest_file() +{ + # Prefer a specification format that is easier to parse (-C) + mtree -k "$DEFAULT_MTREE_KEYWORDS" -cp "$TEST_INPUTS_DIR" | \ + mtree -C > "$TEST_SPEC_FILE" + sed -i "" "s|^\.|.${TEST_INPUTS_DIR##$TMPDIR}|g" "$TEST_SPEC_FILE" +} + create_test_dirs() { atf_check mkdir -m 0777 -p $TEST_MOUNT_DIR From nobody Mon Jan 5 20:38:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3P48SPz6N1x9 for ; Mon, 05 Jan 2026 20:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlR3P0qrrz3ZVY for ; Mon, 05 Jan 2026 20:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4u3lH9C4JR0qaynwpk8PC7sDbdv2vnDuylBMiURJqc=; b=UUq+22/VPqFg7D3rOGl6UiPkIyFa/fas4uslDpKx6HQ/kJxg3SzOgxkoAzizVhc4IpfWe6 ZYjpwwThCn0bAYSUi7v59fcK5CM9P4Whse6VmfAVNa8cYEcx3zxYSXuYwcwEl+i9JQOdSW 2khwXRzbUAc5Duiumy1LXCi6TV05assbCQOUK4M8+OPGL11xxG1VDB+5w38KOVsbJY1qQ1 BWCGk6yupON1vWJMFAFGE0TN6S6wUxQCJOy8p+vyuxQ/n/DOc+5IW6YE7XDz61wUJoxx4d 5Ja7oWecPt/tYyBuBphQ+t8kNy2YX6H1q5MsU9EYmuZZvUasSIulKq2R8paEwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4u3lH9C4JR0qaynwpk8PC7sDbdv2vnDuylBMiURJqc=; b=jugfDrTvg+W9WnRTr3drU2Gp2ZojVeqk/v1vb1rHAM1XJ7OqH+qTV0k8mAJRplEe2gfhA3 7KG7PPP7XuDO+nYTkbaU0YcM7rLyI0w6u8PehnWZycvA9XIJ8sLStGb1RNqT0Pqewt3A+M tn557/enD6AaySKCi0tBGVp4ork/CuPVqKUQkZjOE0Nvp3XAQm0Luv4AYr3U13yQwv6pij XdHMUsNPBE52B9hfod4YwAprfVNnDrG9ksUViSAM/phUMnDJ6bSSPSeCwaigiC5rVxH14o Jk9JS6iMy50KK3wYjdA/8rJ3xEIzvIiSmwjUD3A2gHGeh+wPGtbcbedUbItOUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767645537; a=rsa-sha256; cv=none; b=CmNzOcOueQcAImnIQI+Iy0Psrs31RpcqIJpf0kcNNE4MxYNf6CHv8YQr8VZI/l/QLxfa44 KKH+IkYuOAkxgfaOOXI3RtRgcqJTt7tAyulh8spNjKChoiBi4PPQHFK71bFF6hmSE1vSOx ULs6R2QDblww9vIOHPTxZNE/UTdXVsshEPOq7VdZkpa9yM1cgU22BypY26L34mtm/qqm51 kFR/vFg4err5RH13HCyMuJA2J5GdalI5JnwW8O9d64j0u7ecz/hb2H1DaL9akLpql4vwED vUR8c5VbYnhufG6fBmXZUZnaf4+ASFg0qlYY3/PE75MuqD0VX8Y6hOczj/cdsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3P0Mxfzc0y for ; Mon, 05 Jan 2026 20:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9faf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:38:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 73af599fb7be - main - makefs: Fix typo 's/mirrorring/mirroring/' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73af599fb7be6806b553ac6f470d76711b74286c Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:38:57 +0000 Message-Id: <695c2161.9faf.38304c4b@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=73af599fb7be6806b553ac6f470d76711b74286c commit 73af599fb7be6806b553ac6f470d76711b74286c Author: Jose Luis Duran AuthorDate: 2026-01-05 20:35:37 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-05 20:35:37 +0000 makefs: Fix typo 's/mirrorring/mirroring/' MFC after: 1 week --- usr.sbin/makefs/msdos/msdosfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/makefs/msdos/msdosfs_vfsops.c b/usr.sbin/makefs/msdos/msdosfs_vfsops.c index 8b5eac4a4b66..c6d0a38c834b 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c @@ -163,7 +163,7 @@ m_msdosfs_mount(struct m_vnode *devvp) pmp->pm_fatdiv = 1; pmp->pm_FATsecs = getulong(b710->bpbBigFATsecs); - /* mirrorring is enabled if the FATMIRROR bit is not set */ + /* mirroring is enabled if the FATMIRROR bit is not set */ if ((getushort(b710->bpbExtFlags) & FATMIRROR) == 0) pmp->pm_flags |= MSDOSFS_FATMIRROR; else From nobody Mon Jan 5 20:38:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3N5KH4z6N1hw for ; Mon, 05 Jan 2026 20:38: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlR3N1THxz3Z3L for ; Mon, 05 Jan 2026 20:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9YwPYSywA4D273oQXe8u/NMNFi0uu/wL23DpSauy/U=; b=hWIh1bVo9l+OBw5M+fRIAi8yV5b4Ikr1+M0fkIsuaOYPHDDDpC4GHOv+uAf6bDY25Yx5ZS VGxxdLtGUISYlVh5y4NMi6bf/Ixs4wQvoO5A3FcTw9cR+YaS7DOWqUa/nVHvjaEKInOxdn HK1+jaU0g8wb6zFfg6jhyuH8cN4fEBpTygNDul2MycnVKr4rjI13tr2EANy+YRFVNw9n2f +WTVDUGpPjCgSimaxNB4nA5hqQGzfP20rvrJkkh8BdR4QquBP2eQLVJd+1t2cMvTfoAhaJ RFNYlogwiMwyX8N5HvdoDf4+xkQRde5MPGILGxcRtZriZgjCrL+5ECnfB7Guyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9YwPYSywA4D273oQXe8u/NMNFi0uu/wL23DpSauy/U=; b=bqYD1JXjH+P9R/jOz7samV22jDL5QciJSAZLFYXAxJaigmVVxbzRKiSCnlWeoqlkhVsM7k 6shI2axqzWGHlxHi3yo170vKqYbdAWYBogXEGNwLE4Lov9MMHNafZJvXT3UGBBAcinOkaU TEcPjYrRDE2lhJVFqmU8S2eYWA+I8tp4S6QYyVWHl1CD5aCU999s2Wnm0PIdnCNtbx5ygY D6nWLW0+zrDHG1JengNYvPmBW15wWeu2OgKqNrPsRvpyBSYbgSb6hCzeML7MrPgxVMs8KN MH1zD8J3QZmojzXDRIZ1Ho7rrR/lXN4cNtyhe83JP90ZYVL1MZg7QUR4R/o+8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767645536; a=rsa-sha256; cv=none; b=xGrq8c4qA8wdy+ADtuq9vEGmokvH9q2ptfMnoieZ2Wx4+L4LImE8rLrOdQ/Sda2yziHWn1 ghp4RzmJyIu68qLDNDaDD8pOXYDYSx2jBYV6yca318NQgS2iyu9TmTs/MWCPbs9YnwBTqf 3j+RpDAAkkTGXymosXl95Jmxv50cdo1tKkn3kQ4cSKpK+oKIWcmWfSuyv2/fTF21Oa8KzI 5egdQOv+BT2bYQQcICRQjItGZkV2H/+6gs2ns+71sTVJQanOfQFpv9B2U71mSel1xLR1T3 CsC6rOzb4SlVMubBvPfmjxEdQsG00PxNEC4X47RJW6IugHUlOzSli6vmN0KkJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3M6jHLzc0x for ; Mon, 05 Jan 2026 20:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ac5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:38:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 93b15dbc1fbc - main - makefs: tests: Fix timestamp-related tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:38:55 +0000 Message-Id: <695c215f.ac5b.94e85f2@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1 commit 93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:34:03 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-05 20:34:03 +0000 makefs: tests: Fix timestamp-related tests Use a variable for mtree that includes the DEFAULT_MTREE_KEYWORDS, in order to avoid missing the important "time" keyword or passing an unimplemented "nlink" keyword. Unskip the "failing" tests, and comment out the specific failing checks, these will be addressed (or at least discussed) in a different revision. For MS-DOS tests, use an even value timestamp, as precision is 2s. For ZFS tests, use import_image instead of mount_image consistently. Reviewed by: bnovkov, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54429 --- usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 12 +++++------- usr.sbin/makefs/tests/makefs_ffs_tests.sh | 15 ++++++--------- usr.sbin/makefs/tests/makefs_msdos_tests.sh | 19 ++++++++----------- usr.sbin/makefs/tests/makefs_tests_common.sh | 1 + usr.sbin/makefs/tests/makefs_zfs_tests.sh | 12 +++++------- 5 files changed, 25 insertions(+), 34 deletions(-) diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index 21382684a96c..719c2045305f 100644 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -85,7 +85,7 @@ F_flag_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR @@ -102,8 +102,7 @@ from_mtree_spec_file_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE cd - @@ -358,13 +357,12 @@ T_flag_dir_cleanup() atf_test_case T_flag_F_flag cleanup T_flag_F_flag_body() { - atf_expect_fail "-F doesn't take precedence over -T" timestamp_F=1742574909 timestamp_T=1742574910 create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F atf_check \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR @@ -373,7 +371,7 @@ T_flag_F_flag_body() eval $(stat -s $TEST_MOUNT_DIR/dir1) atf_check_equal $st_atime $timestamp_F atf_check_equal $st_mtime $timestamp_F - atf_check_equal $st_ctime $timestamp_F + # atf_check_equal $st_ctime $timestamp_F } T_flag_F_flag_cleanup() @@ -388,7 +386,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_SPEC_FILE mount_image diff --git a/usr.sbin/makefs/tests/makefs_ffs_tests.sh b/usr.sbin/makefs/tests/makefs_ffs_tests.sh index e1db5fa1b997..ac078394bf03 100644 --- a/usr.sbin/makefs/tests/makefs_ffs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_ffs_tests.sh @@ -56,8 +56,7 @@ autocalculate_image_size_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check -o not-empty $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE @@ -98,7 +97,7 @@ F_flag_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR @@ -116,8 +115,7 @@ from_mtree_spec_file_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check -o not-empty $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE @@ -257,13 +255,12 @@ T_flag_dir_cleanup() atf_test_case T_flag_F_flag cleanup T_flag_F_flag_body() { - atf_expect_fail "-F doesn't take precedence over -T" timestamp_F=1742574909 timestamp_T=1742574910 create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -M 1m $TEST_IMAGE $TEST_INPUTS_DIR @@ -272,7 +269,7 @@ T_flag_F_flag_body() eval $(stat -s $TEST_MOUNT_DIR/dir1) atf_check_equal $st_atime $timestamp_F atf_check_equal $st_mtime $timestamp_F - atf_check_equal $st_ctime $timestamp_F + # atf_check_equal $st_ctime $timestamp_F } T_flag_F_flag_cleanup() @@ -287,7 +284,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check -o not-empty \ $MAKEFS -M 1m -T $timestamp $TEST_IMAGE $TEST_SPEC_FILE diff --git a/usr.sbin/makefs/tests/makefs_msdos_tests.sh b/usr.sbin/makefs/tests/makefs_msdos_tests.sh index 00ab1509ef55..f800bbcd6925 100644 --- a/usr.sbin/makefs/tests/makefs_msdos_tests.sh +++ b/usr.sbin/makefs/tests/makefs_msdos_tests.sh @@ -47,10 +47,7 @@ common_cleanup() atf_test_case T_flag_dir cleanup T_flag_dir_body() { - atf_expect_fail \ - "The msdos backend saves the wrong timestamp value" \ - "(possibly due to the 2s resolution for FAT timestamp)" - timestamp=1742574909 + timestamp=1742574908 # Even value, timestamp precision is 2s. create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 @@ -59,7 +56,8 @@ T_flag_dir_body() mount_image eval $(stat -s $TEST_MOUNT_DIR/dir1) - atf_check_equal $st_atime $timestamp + # FAT directory entries don't have an access time, just a date. + #atf_check_equal $st_atime $timestamp atf_check_equal $st_mtime $timestamp atf_check_equal $st_ctime $timestamp } @@ -72,21 +70,20 @@ T_flag_dir_cleanup() atf_test_case T_flag_F_flag cleanup T_flag_F_flag_body() { - atf_expect_fail "-F doesn't take precedence over -T" - timestamp_F=1742574909 + timestamp_F=1742574908 # Even value, timestamp precision is 2s. timestamp_T=1742574910 create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -s 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image eval $(stat -s $TEST_MOUNT_DIR/dir1) - atf_check_equal $st_atime $timestamp_F + # FAT directory entries don't have an access time, just a date. + #atf_check_equal $st_atime $timestamp atf_check_equal $st_mtime $timestamp_F atf_check_equal $st_ctime $timestamp_F } @@ -103,7 +100,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check -o not-empty \ $MAKEFS -T $timestamp -s 1m $TEST_IMAGE $TEST_SPEC_FILE diff --git a/usr.sbin/makefs/tests/makefs_tests_common.sh b/usr.sbin/makefs/tests/makefs_tests_common.sh index 44b02557925a..27ab89ae26ec 100644 --- a/usr.sbin/makefs/tests/makefs_tests_common.sh +++ b/usr.sbin/makefs/tests/makefs_tests_common.sh @@ -27,6 +27,7 @@ KB=1024 : ${TMPDIR=/tmp} DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link,time" +MTREE="mtree -k $DEFAULT_MTREE_KEYWORDS" TEST_IMAGE="$TMPDIR/test.img" TEST_INPUTS_DIR="$TMPDIR/inputs" TEST_MD_DEVICE_FILE="$TMPDIR/md.output" diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 7dd6005e49ec..9d5ce300843e 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -979,24 +979,22 @@ T_flag_dir_cleanup() atf_test_case T_flag_F_flag cleanup T_flag_F_flag_body() { - atf_expect_fail "-F doesn't take precedence over -T" timestamp_F=1742574909 timestamp_T=1742574910 create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F - atf_check -o not-empty \ + atf_check \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -s 10g -o rootpath=/ \ -o poolname=$ZFS_POOL_NAME $TEST_IMAGE $TEST_INPUTS_DIR - mount_image + import_image eval $(stat -s $TEST_MOUNT_DIR/dir1) atf_check_equal $st_atime $timestamp_F atf_check_equal $st_mtime $timestamp_F - atf_check_equal $st_ctime $timestamp_F + # atf_check_equal $st_ctime $timestamp_F } T_flag_F_flag_cleanup() @@ -1011,7 +1009,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check $MAKEFS -T $timestamp -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \ $TEST_IMAGE $TEST_SPEC_FILE From nobody Mon Jan 5 20:57:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlRSx4VMcz6N2ym for ; Mon, 05 Jan 2026 20:57: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlRSx3s5rz3dd6 for ; Mon, 05 Jan 2026 20:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767646657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrzIgpqK4H8H6N+MJ7sn+gr1vreZ8XvkGkavj22qQag=; b=ZtKAz7p5+n4PpLUwUGnW5a2ukfSEvyLTO7fuDiEW/RvJ1khwNcrlRW5fVP97X+OAoBF8nN YZP2oNKcBc0fPgx7FIh4UzGwzuTtopX8ukRVkwhIKlG+KHGxTk+eBpbFnY5jfeJ0kFutTQ IK3U16eYUYBCh1wwOJU5vEarHvN/OJa96V21Y8/biQDEsZVtDDAPfs5NCtdaRshBK6O53N nQAqFoO1j+IGQaTw//VC/xb1P05tPWiP2jqvhB2iZALHLag/EHiZKg9eR7XLBQktbsjoeI Wu+8IN5zNOkWL3i43ogUJXvPXw6b9yDSBbu9/GpcpxfWkBGSPHgbYEPoyo9lYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767646657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrzIgpqK4H8H6N+MJ7sn+gr1vreZ8XvkGkavj22qQag=; b=UzMKNN8ZjzKM1G1lxZm7tqYdWzpJlVZIaNP7VWmX5lPf7l671juwltD8Ejg1Nr7sboeKow vAIVOZEjWM7RGx3MxXb7GsW11Nh2vWoYMu2TAhaNEDnin9qkBEE2JdINzIxGYJcsIo10M+ 1QiiFV1+5g6ez5FPtnXUHeZVY1iIRWrAMGBqPtLwnruumyV+GdmZRPNQ6F9n/fMB4HCz9a 2HxShXCIo/+tegz4C6My1j5RbTz5k25kk1dXdXwXhJ91n3H85hnt1R9Is0F2+NbGmmcEAp UIwFLIA9H6Gv6ZT2WbP1VJCywZq1PVERzylLwxHPQBiTTCpII2todlGhX2LjvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767646657; a=rsa-sha256; cv=none; b=V1445mIwqh5a2+1pR7c8qY76mmy9P84xEAb0xGPLBud84yDt+sFI9sfN4Wq3uVp1xpk9jl 7WE+NpnJKccf7DOFakkw8p6rzbCBlKP+yDbWahD2oyzlqr1iGuEgQVpDAD6QJ1a0eh1Ome aNBYhxAgxJkWF2k6T+Tm1I3FPP/IAe8e+uBxK1GkmCsI5XbMbkkg1Lqp7rQevFILtvtmUT igir3zEWvL90x2KVnGXNqEca8vkRSs6r7vrnHvHoLwgRdt+czt4E/5tv+T82QD6yIu4bb+ u9y1zK5XufJ0zyuj5F/5WJLtocdAICaOaEw8dAiFEl+1j8om4nqTHS7CP+VDFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlRSx38wVzctX for ; Mon, 05 Jan 2026 20:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ce8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:57:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 21865c970888 - main - tcp: Unifidef use of rss software hash in syncache List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21865c970888ad0e2cde06db843ae2a05af550e7 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:57:37 +0000 Message-Id: <695c25c1.ce8b.9faf4a2@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=21865c970888ad0e2cde06db843ae2a05af550e7 commit 21865c970888ad0e2cde06db843ae2a05af550e7 Author: Andrew Gallatin AuthorDate: 2026-01-05 19:54:35 +0000 Commit: Andrew Gallatin CommitDate: 2026-01-05 20:57:11 +0000 tcp: Unifidef use of rss software hash in syncache Ever since "d9c55b2e8cd6 rss: Enable portions of RSS globally.." exposed the RSS software hashing functions, it has been possible to use them without "ifdef RSS". Do so now in the syncache so as to get flowids recorded. Note that the use of the rss hash functions is conditional on IP versions, so we must ifdef INET to ensure rss_proto_software_hash_v4() is available. Fixes 73fe85e486d2 Sponsored by: Netflix Reviewed by: glebius, p.mousavizadeh_protonmail.com, nickbanks_netflix.com, tuexen Differential Revision: https://reviews.freebsd.org/D54534 --- sys/netinet/tcp_syncache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 6a3c5a5c9310..8c58be63cd5a 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -35,7 +35,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_rss.h" #include #include @@ -882,7 +881,6 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) if (sc->sc_flowtype != M_HASHTYPE_NONE) { inp->inp_flowid = sc->sc_flowid; inp->inp_flowtype = sc->sc_flowtype; -#ifdef RSS } else { /* assign flowid by software RSS hash */ #ifdef INET6 @@ -897,6 +895,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) } else #endif /* INET6 */ { +#ifdef INET rss_proto_software_hash_v4(inp->inp_faddr, inp->inp_laddr, inp->inp_fport, @@ -904,8 +903,8 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) IPPROTO_TCP, &inp->inp_flowid, &inp->inp_flowtype); +#endif /* INET */ } -#endif /* RSS */ } #ifdef NUMA inp->inp_numa_domain = sc->sc_numa_domain; From nobody Mon Jan 5 23:16:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlVYf2rrVz6MSbP for ; Mon, 05 Jan 2026 23:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlVYf269Dz3qld for ; Mon, 05 Jan 2026 23:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767655014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYx4UC1i+c5Eqwma0vzfDidiQFB8t2ihOfFNNtrfsQI=; b=ZxeOeAnnK2Tn96NU8cmbPMhq5ZbkwsW9O8S0jfgbUpHXlq7qeR8hOzCqOHBveu8XnvNgNY hh0/9eR2OPfIHw3SM0LV/42BrYcESMvFBMO0ECXIRlxwcEb900DOKqfU3jxKiafldnqtfw JRKYqCtbRoQIzpaTb5X1D/x2FZCLauxRs3sp1UnEZW5JU90TfrXNZGij6ckpxI+nACpcQa F2vm8Ztq5461a9pcWcEd3nGTyW7OV4B/0Mqof76m8oNpebifb5+p5uICyVUngf6Rm/WxNJ YhlIihh6/MFNOLGU202Gr5ZbEwmbz1P0eNauRiuUvm2Ol4tUcXt7LOjdFHJDJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767655014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYx4UC1i+c5Eqwma0vzfDidiQFB8t2ihOfFNNtrfsQI=; b=NuohkAsupl5u13qsn60oFxtRh+oSj7zGJTIAMcblqNZ0kZkHbq6ert9jWj3Q1EKpR4A/z4 elsIdyal9eYqpQLNE77evRgdbRcOZ10U/UpNeU6yJJJwIUlbPB2+DwHPT0tOKoUEkQIqW5 zQuo0UhHV8A9xsyEZUpYLIHeuLw+WVfp9gnoURMSMOOVooRunpaiQzWiahbeM0exL+zXfR c62xm6IvTlZRE1IiSPDTw9BE5Lg/Os0R/DdzVjq63DN5gXH0HCT7ZzdD33it3lJ8tz7CHZ SxjdZWFxTMlNtS3ndNhOgEI4pz/stLx2kS5uHKYht/tkkTc2RsxUz4Hz/1x60w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767655014; a=rsa-sha256; cv=none; b=kf6OulGiuOrnzZn6sUK5kjWPFeV9ryka3VtKT7Hmmr9xjWVjp073bel+KDK/fnMH1oyrRv +wDsIt+G17p+HjKLx4klHTjN0eAWf8LYGOovY2itbxuQnjaMqH4Srva4Kz5XURYsrL4PMd ZeNuG/1HeO3O0UTU03JmNAMmCsbQ+q/3W1QUKwKtJ2i8ZrHPpJiHSo7LBmSaNZDizxqWPF /s/bYRcsvDqjY6MrqpIBJRgNE79y9mOhlw2lNWyayjYO/478F6SbbRXsDaDNK8z2HfLS8C ewapxqSS7VTYJ1aTZCRHpsXlnS93g35aYrI681uTC1g1S+jajAGBJzLsHsu4nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlVYf1g23zhjP for ; Mon, 05 Jan 2026 23:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 315eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 23:16:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 55305b590797 - main - x86: change ap_boot_mtx from spinlock mutex to naive lock List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55305b590797524dd1cecfc9406869700e925e51 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 23:16:54 +0000 Message-Id: <695c4666.315eb.774c8d12@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=55305b590797524dd1cecfc9406869700e925e51 commit 55305b590797524dd1cecfc9406869700e925e51 Author: Konstantin Belousov AuthorDate: 2026-01-03 01:09:32 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 23:12:22 +0000 x86: change ap_boot_mtx from spinlock mutex to naive lock Problem is that the printfs done under the spinlock might be very slow, then spinlock triggers the panic due to some AP holding the mutex too long. We do want to ensure that the printfs are serialized, still. Also, reduce the scope of the lock. The local APIC and MTRR initializations are local to the AP, while mca_init() protects the shared state with mca-private spinlock. PR: 289297 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54464 --- sys/amd64/amd64/mp_machdep.c | 1 - sys/i386/i386/mp_machdep.c | 2 -- sys/x86/include/x86_smp.h | 1 - sys/x86/x86/mp_x86.c | 17 ++++++++++++----- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 96ed0a2cc3ba..61f1bdb6f942 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -344,7 +344,6 @@ start_all_aps(void) u_char mpbiosreason; amd64_mp_alloc_pcpu(); - mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); MPASS(bootMP_size <= PAGE_SIZE); m_boottramp = vm_page_alloc_noobj_contig(0, 1, 0, diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index f7d9289b1848..18ec0d83fad3 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -369,8 +369,6 @@ start_all_aps(void) u_int32_t mpbioswarmvec; int apic_id, cpu; - mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); - pmap_remap_lower(true); /* install the AP 1st level boot code */ diff --git a/sys/x86/include/x86_smp.h b/sys/x86/include/x86_smp.h index f5015e9d8a24..045beb3b0f9a 100644 --- a/sys/x86/include/x86_smp.h +++ b/sys/x86/include/x86_smp.h @@ -35,7 +35,6 @@ extern char *bootSTK; extern void *bootstacks[]; extern unsigned int bootMP_size; extern volatile int aps_ready; -extern struct mtx ap_boot_mtx; extern int cpu_logical; extern int cpu_cores; extern volatile uint32_t smp_tlb_generation; diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 6b1715853763..0c32657290a0 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -124,7 +124,7 @@ volatile cpuset_t resuming_cpus; volatile cpuset_t toresume_cpus; /* used to hold the AP's until we are ready to release them */ -struct mtx ap_boot_mtx; +static int ap_boot_lock; /* Set to 1 once we're ready to let the APs out of the pen. */ volatile int aps_ready = 0; @@ -1086,8 +1086,6 @@ init_secondary_tail(void) PCPU_SET(curthread, PCPU_GET(idlethread)); schedinit_ap(); - mtx_lock_spin(&ap_boot_mtx); - mca_init(); /* Init local apic for irq's */ @@ -1096,6 +1094,15 @@ init_secondary_tail(void) /* Set memory range attributes for this CPU to match the BSP */ mem_range_AP_init(); + /* + * Use naive spinning lock instead of the real spinlock, since + * printfs() below might take a very long time and trigger + * spinlock timeout panics. This is the only use of the + * ap_boot_lock anyway. + */ + while (atomic_cmpset_acq_int(&ap_boot_lock, 0, 1) == 0) + ia32_pause(); + smp_cpus++; CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", cpuid); @@ -1117,6 +1124,8 @@ init_secondary_tail(void) atomic_store_rel_int(&smp_started, 1); } + atomic_store_rel_int(&ap_boot_lock, 0); + #ifdef __amd64__ if (pmap_pcid_enabled) load_cr4(rcr4() | CR4_PCIDE); @@ -1125,8 +1134,6 @@ init_secondary_tail(void) load_fs(_ufssel); #endif - mtx_unlock_spin(&ap_boot_mtx); - /* Wait until all the AP's are up. */ while (atomic_load_acq_int(&smp_started) == 0) ia32_pause(); From nobody Tue Jan 6 01:00:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlXsP1dPvz6MqD4 for ; Tue, 06 Jan 2026 01:00: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlXsN5xwRz40Gh for ; Tue, 06 Jan 2026 01:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767661240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xkFHTmQPIDdFKMqYG5+GvW5ZhWbkSY63b8kd8x7Yeh4=; b=Udx+jdrTS0lFocQ5kKn55bnrNVVXiWQ2C5g2RJj2fuyMPrDdPb3fN/+Y5F6sJwNOo+Lzkr haVeLlyHOKuN8P3ZbYuDtNJHCPiruYQBIk5ADpbZXAxvfamgTQkcz0b+KB6IvrqRgQdxVz oL+wyq0GpDpBclwriNRq5kkNgEwqzmRWJkqAKYIHztUhXvKwRV5sOQr/Ej8jGJStZ0bwT0 aGh/gIqsX7SHh3gr8O7D7hbymmQcL/PI1WZta2QQRCqC5iXZEndkbEHBU0E9AROjziGsxS 0byjYlsxEVYcZD+upPJfTOtybiXWMqZHn1KylhdONl4GZejMb4noA8apLEJajg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767661240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xkFHTmQPIDdFKMqYG5+GvW5ZhWbkSY63b8kd8x7Yeh4=; b=NnoHFQCkI1XlGFNKeEeD7jaK+Bv8KimY//DE+6CPRI77l/sOnSJKzvI+BHC1YJ4mAvHeSs iKA42/b68PdsH3zxAxosLmopKSnI+3y7zqnIJVy87O7gDvJ1LloBkCxmW+nwl5e31syJpQ Sd+zY2amByuV8DrUaxJTQA4X6ACzf4kQ+NDIyv1g81vcK9ZKRPuvdV2zv5ppH2I2f16O43 UnTgla1yWCvW/uWZqIT/QcnuKqeuBSlHOOFBjOwl18MuvW0NcYL7dniO4qmjjX28ZNWZ3/ eoAcqdQS/WxSPP9tvOzD5f6oeBAsGV48NvVVLdVL5PibDiLeXAfYSCq/b62a7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767661240; a=rsa-sha256; cv=none; b=uilrJxdj4MlhR5PAMZtVxrLv46NiDA5jBdCZUnZWZn7jclGFJxFzgsMDFHE8GzzsoDcDCA lDC3HZNiKJaoXNm1m7fXwYENmObmU7RxmO/sQD0xY3pxdB3r/3k3zoGqh2BHbh4Wji1UNb 2zZiqQplIgJ4MquoWBjYf/r9fuOGGQO+0HHVvoqZ7xb+3CS9syHpsOmeZthd862mnJKD+e 25LEmqeeFwAWhOgRpRs/vSJaYEv77SRL2qKAuQHhjdF+l1PyocuUDPvc7zGd7aZ9F9TROH und8GmKTEYc93elLap3eaqopofldo7zcluP2vhkZ+IcCCNm8rYSLcJ2TeS//AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlXsN5GBZzlDF for ; Tue, 06 Jan 2026 01:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e29b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 01:00:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 12c51484188f - main - makefs.8: Cleanup man page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12c51484188f88bcabc5b38ca8523fcde76830a6 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 01:00:40 +0000 Message-Id: <695c5eb8.3e29b.1a780506@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=12c51484188f88bcabc5b38ca8523fcde76830a6 commit 12c51484188f88bcabc5b38ca8523fcde76830a6 Author: Jose Luis Duran AuthorDate: 2026-01-06 00:59:27 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-06 00:59:27 +0000 makefs.8: Cleanup man page Reviewed by: ziaee MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54538 --- usr.sbin/makefs/makefs.8 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index d20f69d87559..f77e07902ad2 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -33,7 +33,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 19, 2025 +.Dd January 5, 2026 .Dt MAKEFS 8 .Os .Sh NAME @@ -124,7 +124,7 @@ See the source for usage, and look for defines starting with .It Fl F Ar mtree-specfile .Em This is almost certainly not the option you are looking for. To create an image from a list of files in an mtree format manifest, -specify it as the last argument on the command line, not as a the +specify it as the last argument on the command line, not as the argument to .Fl F . .Pp @@ -325,7 +325,8 @@ Expected number of files per directory. .It Sy bsize Block size. .It Sy density -Bytes per inode. If unset, will allocate the minimum number of inodes to +Bytes per inode. +If unset, will allocate the minimum number of inodes to represent the filesystem if no free space has been requested (free blocks or minimum size set); otherwise the larger of the newfs defaults or what is required by the free inode parameters if set. @@ -598,7 +599,7 @@ Dataset properties, as described in may be specified following the dataset name. The following properties may be set for a dataset: .Pp -.Bl -tag -compact -offset indent +.Bl -hang -compact -offset indent .It atime .It canmount .It compression From nobody Tue Jan 6 01:43:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlYpt72dnz6Mv0S for ; Tue, 06 Jan 2026 01:43: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlYpt3jn4z488S for ; Tue, 06 Jan 2026 01:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767663814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QgAI4qSqFMYcFKHeI8F409dmIbKNqHrG2ssgC/DoTnM=; b=BN1SnWxbDKeGLBeYq0ED+evSALNh2FCeWgrSdqAjmCrXNUf435ZiEXXwbXGoJ9oNvflquf +t5yOmtgAPBUwrZvljCrpTQSfuEvqUdKdJWfCPyhLp+2nwsV887hxpx9zoSzyCotxp5UXO Wn/RUDGYELtUivW4DRwwoSG57wn9qd92dx2MUPi67v/7cDO4UTMtP17l/Xd07p/jAWVQvN dfj1KymQu3Lejm6c6eVU5tHTqwcIcsHu0p7+tqIPp82cgsxOWtQ2jHX66DzwjBek5sS7A1 +y+YIkGEEz8v4F4cKe6pQxwHxKym79b7neyj+jUK93yNkqdN2Ckvp3288KWkGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767663814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QgAI4qSqFMYcFKHeI8F409dmIbKNqHrG2ssgC/DoTnM=; b=r17BCdrIzHvNlVxyLnyOYPRs4X3EDT+YMtwwHnJMoOyPOm8DljHvU6sxHqklbKUAxT/V/D eVkZFrix50E03zZs+7VfvqgcCJRWFD7lfa77WAItpEX3DxuDipyOHiPkM7dzcD+hkUz3lm jpiXsMpqtlO/91WekBg4xl3AuaTfNNw7o07GRcLE7wzlrxv+GTIkEnV3DGzimA9oHZysmx voK6Hw51wwZT26Qb7NKJU5iGTz43mKe8ECUuiAgMgPz8dQE89qoMM1r0nJ+QG7OxSHVtBz K85NMo+Fd87UDG+OlMzWnMOQqthq1mAMDzR6qlz1B+Gu+vYLAilUcPreBJGyMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767663814; a=rsa-sha256; cv=none; b=ULaYXy4UHz/uowmZNZgBx3uutKMWeZr7YDpcx+ec/w5W8mm5icIlzNWCULofoZ0yoH3hr0 WtgVppXSOq5Mzw76VALbOE6NMwKLnt2y1wbhNQoZieNSd8Ta8Q3rHUe5O7xlg9tqx0rdsF EnpJPy0YT35jTEIP/dyDlmybmPsnCbXoqyP5OjgDZ8MBk+R3gW0YZcnvo2SHPV+DJPErRv rgm5Ur39a6aZZLdaCXqOjNWfrYsG9LPYWXHEWGrnm1X/bJwiPG3yJQHkzzbxqMm8ArrdsC HmeSMQTYS/I5IU7mPy5rA7Iu3GpHHHNHrB1DM+3BmYbKyJvl2/ZgUT9I2uxSPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlYpt2m0VzmVF for ; Tue, 06 Jan 2026 01:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ff5d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 01:43:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: f224591746bd - main - Add ASMC_DEBUG make option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f224591746bdaf14ad5f63de4738a3146cc2f55f Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 01:43:34 +0000 Message-Id: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f224591746bdaf14ad5f63de4738a3146cc2f55f commit f224591746bdaf14ad5f63de4738a3146cc2f55f Author: Enji Cooper AuthorDate: 2026-01-04 08:27:57 +0000 Commit: Enji Cooper CommitDate: 2026-01-06 01:43:04 +0000 Add ASMC_DEBUG make option This allows folks to enable debug statements in asmc(4) using kernel configs via the `options ASMC_DEBUG` directive. While here, remove a duplicate `device vt_efifb` directive in `NOTES` as it's already handled in the `GENERIC` config MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54511 --- sys/amd64/conf/NOTES | 7 ++++--- sys/conf/options.amd64 | 3 +++ sys/dev/asmc/asmc.c | 20 +++++++++++--------- sys/modules/asmc/Makefile | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index d48fd10c0e62..efcc03623c05 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -43,9 +43,6 @@ cpu HAMMER # aka K8, aka Opteron & Athlon64 # Optional devices: # -# vt(4) drivers. -device vt_efifb # EFI framebuffer - # 3Dfx Voodoo Graphics, Voodoo II /dev/3dfx CDEV support. This will create # the /dev/3dfx0 device to work with glide implementations. This should get # linked to /dev/3dfx and /dev/voodoo. Note that this is not the same as @@ -116,6 +113,10 @@ device efidev # EFI RTC device efirtc +# Apple System Management Controller (SMC) +device asmc +options ASMC_DEBUG # Enable asmc(4)-specific debug logic. + # # Intel QuickAssist driver with OpenCrypto support # diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index df18abfa8e1e..a3a735731438 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -68,3 +68,6 @@ MPTABLE_LINUX_BUG_COMPAT # x86 specific uart options UART_NS8250_EARLY_PORT opt_uart.h + +# Enable asmc(4)-specific debug logic. +ASMC_DEBUG opt_asmc.h diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 0572c8e663a7..5d3b97a065c9 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -34,6 +34,8 @@ * Inspired by the Linux applesmc driver. */ +#include "opt_asmc.h" + #include #include #include @@ -83,7 +85,7 @@ static void asmc_sms_calibrate(device_t dev); static int asmc_sms_intrfast(void *arg); static void asmc_sms_printintr(device_t dev, uint8_t); static void asmc_sms_task(void *arg, int pending); -#ifdef DEBUG +#ifdef ASMC_DEBUG void asmc_dumpall(device_t); static int asmc_key_dump(device_t, int); #endif @@ -515,7 +517,7 @@ static driver_t asmc_driver = { */ #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ASMC") -#ifdef DEBUG +#ifdef ASMC_DEBUG #define ASMC_DPRINTF(str) device_printf(dev, str) #else #define ASMC_DPRINTF(str) @@ -828,7 +830,7 @@ asmc_resume(device_t dev) return (0); } -#ifdef DEBUG +#ifdef ASMC_DEBUG void asmc_dumpall(device_t dev) { struct asmc_softc *sc = device_get_softc(dev); @@ -939,7 +941,7 @@ nosms: sc->sc_nkeys = 0; } -#ifdef DEBUG +#ifdef ASMC_DEBUG asmc_dumpall(dev); #endif @@ -974,19 +976,19 @@ asmc_wait_ack(device_t dev, uint8_t val, int amount) static int asmc_wait(device_t dev, uint8_t val) { -#ifdef DEBUG +#ifdef ASMC_DEBUG struct asmc_softc *sc; #endif if (asmc_wait_ack(dev, val, 1000) == 0) return (0); -#ifdef DEBUG +#ifdef ASMC_DEBUG sc = device_get_softc(dev); #endif val = val & ASMC_STATUS_MASK; -#ifdef DEBUG +#ifdef ASMC_DEBUG device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, val, ASMC_CMDPORT_READ(sc)); #endif @@ -1009,7 +1011,7 @@ asmc_command(device_t dev, uint8_t command) { } } -#ifdef DEBUG +#ifdef ASMC_DEBUG device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, command, ASMC_CMDPORT_READ(sc)); #endif @@ -1055,7 +1057,7 @@ out: return (error); } -#ifdef DEBUG +#ifdef ASMC_DEBUG static int asmc_key_dump(device_t dev, int number) { diff --git a/sys/modules/asmc/Makefile b/sys/modules/asmc/Makefile index f1b4a981ad24..4ba45a4625d8 100644 --- a/sys/modules/asmc/Makefile +++ b/sys/modules/asmc/Makefile @@ -1,6 +1,6 @@ .PATH: ${SRCTOP}/sys/dev/asmc KMOD= asmc -SRCS= asmc.c opt_acpi.h acpi_if.h bus_if.h device_if.h +SRCS= asmc.c opt_acpi.h opt_asmc.h acpi_if.h bus_if.h device_if.h .include From nobody Tue Jan 6 01:49:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlYxw47sHz6MvKC for ; Tue, 06 Jan 2026 01:49: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlYxw3cJLz49Yg for ; Tue, 06 Jan 2026 01:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767664180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=If1GoPZWu2YCqH8OW2uuLAjjT5BeIKkF1LchliDTBwk=; b=h3xoeuNYQiwN90O9cFf9vSloCSysU9GciZT0zxOACDNF/tQfCSEm0dWgNNq4of6v4Z+Lwj ZAjhoJrTFZDxqg+3KAOgT4ahCI0Juu5R5QF7HaPzXW1P3Ozah8k9GonZWB2eR3ArPtwImN F+YB9q+SNgaEfi+LnHYFB3U1f7qvWXjB/PA4zg/DLe2vkmM6iJWCYoLVEPqWRddRdVkMGO mKEuozW+adPmHg0MCVLdyxpMdZXk+lAG21cFZN5ayha1HCD3FAVXwy/KqKtXrrXAlxDJpC /3fQUcqR3yODfMrRqycCkOOZUIL9snfK3fXaess8al2AEooB0dI/HaaFcYJD/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767664180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=If1GoPZWu2YCqH8OW2uuLAjjT5BeIKkF1LchliDTBwk=; b=g8CkqrXtzhIZtwOn+wegG7ZCb+08aJyR+jI63pAU0hvblXlfFqkc3UeW50/lUpk3cka2Up jJgDk1i12YtsujzCWef1DzMNRHPST2agQFRvBCVDZudNBFCLOACIMQv1DPN1zZnrgKZJrv AybqH9Cjt6SvTE+UAD26iaGGZ6vQGhCjXxSJPyILECX1b98Dmm94SQjOBzOT9SPVWaDz8o NjDlxMP8usn29hvbUzZsnJ6vj/pUBP2uMaLz8elFhFVE1IPzOmhmQtWqM2sJecIKmVRNTa umfUfEzz8zyVK2TU8DlfkhVE3KxrBe9smQDkQhWoWLxHfK87JQEK9Nb3t1Z8tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767664180; a=rsa-sha256; cv=none; b=ZPzadS/wECdo8AqLrJNJzKi5pGTHgrfWfYVoIWIxP/Kv1b5nQqulRJCwBGcm3UI4rfI47u lb8f8ZsQJ7K9PltOhuzBYrSi7RBgPpw5In7Bel1MzykQr734b0iwCTOCJq7q8RtyYl9Azd PohGvp4pfojsTGQ2E2KL1HzfXelDOd90QDkOH+v2mdRYuL6rrNZ5jjOleNdm3if4OwzB1m LV/4vM9fLgTgYeD11OKeqWSPKF7yz+fom54El5YRkk4oy3GWtBIol1Pgu0rrH2ArkCvOvG uroic1PJfDOd2Dg6MdCooSDpV9GnJecWu91BBtYV/bkxN7U38Ej4jGqWQs47WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlYxw3C6MzmkN for ; Tue, 06 Jan 2026 01:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40744 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 01:49:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 0b298e314a8b - main - Makefile.inc1: Fix INSTALLEXTRAKERNELS for one-kernel case List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b298e314a8b47c1f2bf8a9ff86c050accbd744d Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 01:49:40 +0000 Message-Id: <695c6a34.40744.6f1ce1f9@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=0b298e314a8b47c1f2bf8a9ff86c050accbd744d commit 0b298e314a8b47c1f2bf8a9ff86c050accbd744d Author: Lexi Winter AuthorDate: 2026-01-06 01:48:04 +0000 Commit: Lexi Winter CommitDate: 2026-01-06 01:48:04 +0000 Makefile.inc1: Fix INSTALLEXTRAKERNELS for one-kernel case If BUILDKERNELS contains a single kernel, and NO_INSTALLEXTRAKERNELS=no, then ${BUILDKERNELS:[2..-1]} returns the first kernel in the list and that kernel ends up in both INSTALLKERNEL and INSTALLEXTRAKERNELS. This breaks the package build because it means we generate that package twice, once with an incorrect install path of /boot/kernel.NAME instead of /boot/kernel. Only set INSTALLEXTRAKERNELS if we're building at least two kernels. Fixes: 2c0e9a76c1ce ("Makefile.inc1: Make NO_INSTALLKERNEL less of a hack") Reviewed by: jrtc27 Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D54539 --- Makefile.inc1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index b8f59686784d..5005e4e0acc7 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1844,10 +1844,12 @@ NO_INSTALLEXTRAKERNELS?= no .if ${NO_INSTALLEXTRAKERNELS} != "yes" .if defined(NO_INSTALLKERNEL) INSTALLEXTRAKERNELS= ${BUILDKERNELS} -.else +.elif ${BUILDKERNELS:[#]} > 1 # First kernel is installed separately by INSTALLKERNEL, typically to # /boot/kernel, rather than to a config-suffixed directory. INSTALLEXTRAKERNELS= ${BUILDKERNELS:[2..-1]} +.else +INSTALLEXTRAKERNELS= .endif .endif From nobody Tue Jan 6 02:23:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlZhd6pFQz6MxMR for ; Tue, 06 Jan 2026 02:23: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlZhd5hnxz3Fj0 for ; Tue, 06 Jan 2026 02:23:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767666193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzBaxXdj/GTeBdTF/HqbR62QnACC2+JD7k02YwmvB5Q=; b=gB+piHl7UhOdXDkBmS8julPH7vgmxCpU8x/LGBXkxr4shB4VJWaUdM/k4ziKLZpjXNTcN/ 64rReBwcm0eulFODEa8Tcj8u05Xeo8zmwsI7GqcdM1S2t61s22KdYpU0iioVLvxpl/ZQZQ 2OGTZ1vrhw0/n8Grj2aXAUy3Ct+hMmYBRmoGhWwXE11dh4dNQeBEEPhUnIH5Qu+sb/xw/V MCyjDrjeLjWfW5KbiPln2G8ExtchcvYyHAAtoTjePqe4BOV8c3np4VDA4ByGV643ig8dly vjz9VHSY+aFToh+Alnci1XHvEljh6Ocw08cvfVoEhNVkkerY6YLxuQD/zwDqOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767666193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzBaxXdj/GTeBdTF/HqbR62QnACC2+JD7k02YwmvB5Q=; b=qfwMkbXKicPA0SnATzrbjqaCX5fLQfCsn6nw6gacp3NkYXbZVz2zVn0AmkrlFfXRz/PkWy WMaDBI22BKEro7772MmE3oi952V61nXSDvV0Lg7kAKP0oTawjdX+F4OpL34HZ5HaX7+Bbq 5xhAVLXTp1g4BfXKN4ZMw4YuxHovaLDtnbvg02meTI0Q8YlycF43fWMB8/iwFIOhICyM9S BGKECwXMEVXPh3EskWW5TrTe+sbU6d+oVXacIAYeleioUZl11xGFYnxTrBOplc65C/orlR Jsyj19UwfzfkDgK6/Dw+1Nfe1LUUwDDYXP4XJw7ToL9jb3bWvvGLhHM4jynZYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767666193; a=rsa-sha256; cv=none; b=PSMd/aJqBg/ZEofF5dXMG27L/u5+k+XMrTc1mw8rlcE5uAt4ueMDtNAmi+OxaH0wGEDtxl 91gCRqGACYtAkW/GK4Yg4eoQBq1Om5yTS/o5nfvFmifdbTxOSqztanw5+E2UToY66nyNs3 7ZCbT3+oHS8GbPX132Ck/B/T102yd1qQQRfbzgETjdmxfQieLVjF7QugBYIasQYOrTyNju rV0SzlWiuGn3Ly8i+qTzJGN5tSvTacf9Ah275vWXT1ZgEviHlgOzhJFjXnL+qWT6y9T1Ky Lz/Z62rigiRUJjkrrOrGF3diVvT7BdZ6ncpw9xtB7byhCUvEHhaC4XHBXfBtOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlZhd59VWznRb for ; Tue, 06 Jan 2026 02:23:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45c1e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 02:23:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: ykla From: Ahmad Khalifa Subject: git: 171f9cbbbfa1 - main - UPDATING: move entry to the correct place List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 171f9cbbbfa1f29c854716dc5a1904d9c8d8ea78 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 02:23:13 +0000 Message-Id: <695c7211.45c1e.4b5c717@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=171f9cbbbfa1f29c854716dc5a1904d9c8d8ea78 commit 171f9cbbbfa1f29c854716dc5a1904d9c8d8ea78 Author: ykla AuthorDate: 2026-01-05 04:40:56 +0000 Commit: Ahmad Khalifa CommitDate: 2026-01-06 02:16:22 +0000 UPDATING: move entry to the correct place Reviewed by: vexeduxr Signed-off-by: ykla yklaxds@gmail.com Sponsored by: Chinese FreeBSD Community Pull Request: https://github.com/freebsd/freebsd-src/pull/1917 --- UPDATING | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UPDATING b/UPDATING index 40fb9fbac87d..ee035c3d7615 100644 --- a/UPDATING +++ b/UPDATING @@ -875,6 +875,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: belongs. Consequently, users may experience surprising results with such names when roaming to different homenets. +20211118: + Mips has been removed from universe builds. It will be removed from the + tree shortly. + 20211110: Commit b8d60729deef changed the TCP congestion control framework so that any of the included congestion control modules could be @@ -888,10 +892,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: kernel and you are including networking, the kernel compile will fail. Also if no default is declared the kernel compile will fail. -20211118: - Mips has been removed from universe builds. It will be removed from the - tree shortly. - 20211106: Commit f0c9847a6c47 changed the arguments for VOP_ALLOCATE. The NFS modules must be rebuilt from sources and any out From nobody Tue Jan 6 02:23:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlZhj5w77z6Mx0B for ; Tue, 06 Jan 2026 02:23: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlZhj5F94z3Frd for ; Tue, 06 Jan 2026 02:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767666197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rf87Tx7oDMKVKp3Q2aVgblQL72bDLHlJsJWdu1pKRO8=; b=tlKVEddvxCLAydcP0cKeW6eaKj3WnGVA1TmVCY/L+gdsDtTvmrAL4SkYuQttP9YnTHH8UH yIyw/NLA1k+j6pxiqIgvam90FbjxhE/ypJvEWLxkswXk3Dkzsq89fL3gAlIvzXMgY9kCTn sNEAest7CtbtVQS9tjwhKV8YtNk3fxEZrpfmbukTCIkZ61SEsxGHIxI1ejD+dKOv+0+Per OjAwA4J9jT0PF1rOSpnEUUjQ97UXPEqgY0+2BBo7ffurdwetr32E2zn7S93Ec2nzvJT200 j490khdz85ra51va4gPaUs1cx3LJtPDVjrGdk5bLy3MRRCYt3jxfRUHd9GHM3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767666197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rf87Tx7oDMKVKp3Q2aVgblQL72bDLHlJsJWdu1pKRO8=; b=sNfA4MYbCj9c+Ae//aaHRKF8WJvQ52IgMiBWokAt5FBkObeCjGFZE3lArTHXyNZqkttSBg BG9KotiEapEsEIdN3ef2IR6VXz6E79xy2jXIP4oxS0q8glbOZYZVqvyNzhQiIEXxmgiQ1K Uo+zjqkYYrdfc74N8dd1i7dQftpecu1/+bq1DLPMtdYHJPkz29qH3Jxa99kBkIPBD+h+K2 IClnvQchoLPRv19tbzS7AYM2o5Bk3bDz0JVY4yvpAMDHv6c1yAdTB55vftzoLpL8EYVgEP +duP/ZtvThuuCn6caxEyP4H2oMS3akZi6+qXkrDA0WbPCFhHh6Sxe66IpPk+7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767666197; a=rsa-sha256; cv=none; b=EuEkgTLzgZeMUzO3ewVQJgt4Nd8GcNPgYYbfybw6Jklv90yjEzDlH3dPNp5glHmINUQJb9 F3RPR23wja5ODb1j+52hNVjEyBEIBQsdjKOwshlB3rE8i/u5N+Z6phl1qHRN9x0tnwSC0Z Klz43o/GbwUngKEJXz3xnnYlKzt+Ksjps1kBpJy3ELUNhmfST9PDOJaOPOPgX5fzFk2+RR i1uWnY14lud4giRlpMCyhNgBISMm12SaYoPNo2dzdomVSs2tdNsqE/CuQq1h2SXJCFXFbi c4sQ/zMyvmZr/AAbvypMSFIDeUmAcDHPNz5GMdbn0vOAQW0nGCLHYOVlpjZ+QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlZhj4TQNznRc for ; Tue, 06 Jan 2026 02:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44db0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 02:23:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 9b2478f60bfd - main - ng_tty: avoid the sign extention of char List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b2478f60bfda663c84b48e272a2293159e1b0a0 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 02:23:12 +0000 Message-Id: <695c7210.44db0.1fed2d7b@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=9b2478f60bfda663c84b48e272a2293159e1b0a0 commit 9b2478f60bfda663c84b48e272a2293159e1b0a0 Author: Ahmad Khalifa AuthorDate: 2026-01-06 02:07:29 +0000 Commit: Ahmad Khalifa CommitDate: 2026-01-06 02:10:11 +0000 ng_tty: avoid the sign extention of char When c is compared to sc->hotchar, both undergo integer promotion, which can lead to c being sign extended. Fix this by casting c to an unsigned char. Reviewed by: kevans MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54544 --- sys/netgraph/ng_tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 0e3230a66f66..200a72336110 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -489,7 +489,8 @@ ngt_rint(struct tty *tp, char c, int flags) m->m_pkthdr.len++; /* Ship off mbuf if it's time */ - if (sc->hotchar == -1 || c == sc->hotchar || m->m_len >= MHLEN) { + if (sc->hotchar == -1 || (u_char)c == sc->hotchar || + m->m_len >= MHLEN) { sc->m = NULL; NG_SEND_DATA_ONLY(error, sc->hook, m); /* Will queue */ } From nobody Tue Jan 6 04:40:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dldlb1hMPz6N6L6 for ; Tue, 06 Jan 2026 04:40: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dldlZ6whpz3X16 for ; Tue, 06 Jan 2026 04:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2IuHRqy/TLgq+dzoHbVijztEPh6M5h6KSaCOpBb58FI=; b=QRJdCvjVa/lK+/CwiSidORqBafpRr8Yu46iDR+qbyZnaCQPHQjZlxRfi8L3voHElDQUaP1 oBW2/eo9x4pmkwPIdS3nYtN+AJVmBLzNvC9enyKpdbMZgrPImD8GE65Ch+0fupQl37ZrfH 7WdnrBmA0HMx157wGtELjjilUoilRp3dixDBEzG/chwO4g4tz6Sas7CZyiS/m7YA8Hhqh7 BtCOWJn8UKUB7e9iq9nXJZkeIhTBEOTeHvJCk95vinsYthAcQiJrZ2FhvM8Cp2gxjgNMY/ MUtkLEFsiKHz8raT4nhm63DTujj+l2ScTP1BcXteu2IECNSiTmRJ3eV63lWxyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2IuHRqy/TLgq+dzoHbVijztEPh6M5h6KSaCOpBb58FI=; b=xTDuRqsiNaFvYXVl26Psj+jkpBYo1ws+Gs7rwz1fP6IWeD1S+YAw17iyFhfo1fCC7fY0Py y+YKd/31F7KetzrnBMWz3k+g0hNw8ph+UCPQVuCU0G4GV1YjJoqHyakcr6NmoQDzIlWxNP zOsMCpd1rMdvkrcIUH1/iX0NusltdYpe1OGztTq+WIs/vdOClPhhLcCXPSYOFbhbGevZEX XPQMqX4ToYUwb8B3V6n0nP40DynybSbKdJdbodCnJXlEzgfO58MwuFjsmdS0Yy13nNwWcl H7kN+iA0Z4nooYxGGdzPOkB+sSxWD7ybND8Y/CTmZcT9Vy5waGoHl9R50xFieg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767674459; a=rsa-sha256; cv=none; b=aTmvvBGtcoGrv8uHkgsPC7u77SahPcRKBi5lmkVMVHxox3F1W83UvtZilsYNya2wMmc/7S GOJmFCnvRzwBPw+ITOeB27pSKsclpxQDGJVDCMz4LGiBpqM1lDpVAO8EODQFM3U5SqbwsL 84zMXx6UOE94MLoqamMZ0+bjMoQcivyX1EL7GZiLSQgL1KnX0+LPeMbozFUZKMQVnRfbeg NkN+WpMSNwMjtI6PrGcfogLzYvbzJ/dipuhpUEVhd5X2RPy9icPx++bWGK4VHd5xLNKVmA 4R2IMd9euTB5/pxC+NAdU9Wfp0EFU++CqRiCDET4Qq1jJHTVkGqFm64eorbXmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dldlZ6Bqbzs4T for ; Tue, 06 Jan 2026 04:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23ab4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 04:40:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 665ac052aa04 - main - powerpc: Update CPUTYPE options in make.conf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 665ac052aa04c4dc240d67c3c2166ac63e7f86eb Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 04:40:58 +0000 Message-Id: <695c925a.23ab4.400ed6c7@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=665ac052aa04c4dc240d67c3c2166ac63e7f86eb commit 665ac052aa04c4dc240d67c3c2166ac63e7f86eb Author: Lexi Winter AuthorDate: 2026-01-06 04:22:20 +0000 Commit: Lexi Winter CommitDate: 2026-01-06 04:22:20 +0000 powerpc: Update CPUTYPE options in make.conf Document the supported PPC/POWER CPUTYPEs in the example make.conf. Update bsd.cpu.mk to handle CPUs newer than POWER9, and remove 32-bit CPUTYPEs since we no longer support those at all. Reviewed by: imp, jhibbits Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D54257 --- share/examples/etc/make.conf | 7 ++++++- share/mk/bsd.cpu.mk | 18 ++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf index 93c611557cb6..61bc132bad57 100644 --- a/share/examples/etc/make.conf +++ b/share/examples/etc/make.conf @@ -47,7 +47,12 @@ # cortex-a7, cortex-a8, cortex-a9, cortex-a12, # cortex-a15, cortex-a17 # ARM64 architecture: cortex-a53, cortex-a57, cortex-a72, -# exynos-m1 +# exynos-m1 +# POWER / PowerPC architecture: +# (POWER CPUs) power5, power5x, power6, power6x, power7, power8, +# power9, power10, power11 +# (PowerPC CPUs) g5, 970, e5500 +# # # (?= allows to buildworld for a different CPUTYPE.) # diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index d11b8994dcd7..79268139bb2c 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -277,29 +277,23 @@ MACHINE_CPU = sse3 . endif MACHINE_CPU += amd64 sse2 sse mmx ########## powerpc -. elif ${MACHINE_ARCH} == "powerpc" -. if ${CPUTYPE} == "e500" -MACHINE_CPU = booke softfp -. elif ${CPUTYPE} == "g4" -MACHINE_CPU = aim altivec -. else -MACHINE_CPU= aim -. endif . elif ${MACHINE_ARCH} == "powerpc64" . if ${CPUTYPE} == "e5500" MACHINE_CPU = booke -. elif ${CPUTYPE} == power7 +. elif ${CPUTYPE} == "power7" MACHINE_CPU = altivec vsx -. elif ${CPUTYPE} == power8 +. elif ${CPUTYPE} == "power8" MACHINE_CPU = altivec vsx vsx2 -. elif ${CPUTYPE} == power9 +. elif ${CPUTYPE} == "power9" || ${CPUTYPE} == "power10" || \ + ${CPUTYPE} == "power11" MACHINE_CPU = altivec vsx vsx2 vsx3 . else MACHINE_CPU = aim altivec . endif . elif ${MACHINE_ARCH} == "powerpc64le" MACHINE_CPU = aim altivec vsx vsx2 -. if ${CPUTYPE} == power9 +. if ${CPUTYPE} == "power9" || ${CPUTYPE} == "power10" || \ + ${CPUTYPE} == "power11" MACHINE_CPU += vsx3 . endif ########## riscv From nobody Tue Jan 6 04:40:59 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dldlc2hZsz6N6Hw for ; Tue, 06 Jan 2026 04:41: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dldlc01nwz3Wy0 for ; Tue, 06 Jan 2026 04:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=txwbn65phEa6jnw85HZNeL56BJgCGQMIMN1L8PEFgJE=; b=LsxqJfxsnRBvPspplbkl33Qga7JzZ+6fNwcufJ5ImENt+NXSu76hiNppYWQmEWeJvRjrqV DW+sEr5gQm294i/gFMqtiWXF75BezNSMwsn0oCt92cz7X8qKH4LvXdzNFjwLa2Gi1mouze wET5Mw7F6KEhMM4/fLfE4ZtcTlfO3C19vxrgsNslfifDyJ8FDI+hxlrM5IwlAPZhSv4vZ7 q4tPwo/aAr+RWWAFNmiJzN2UjXoC665SaaAA1ivJK2RM9ONNnlUisSPIOCaLcFMz4PY0k7 Firg9QM9wFESJ01qdAJWWjT00LYx20WTcmzHSiVrzsqWbo5Z51/fvpaowEM4tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=txwbn65phEa6jnw85HZNeL56BJgCGQMIMN1L8PEFgJE=; b=N+j8NzeCGz9LI/gW2gMtp7Qf4oZNu6d69i4saM5/WU7jIFyZ+0t1MRcf8ru6xcoTWGshfg OLkDhy2l0gBHw/HvU5jlE1g7ChAdkvw9fGC35qqyBu1/JVionN97Mhy2SHh10a1Fo6M/Aj zOQjqnIcJcqNio+CQnJBtzFE18M+xzoQV4M7AzGr65GBMqOpiU1vKpHao/q7ZRAY/ylAmH Dp0DuRT2pUAxgMR9NbTSJo36+1rJpel50xRPe/oX23Ut0CXEAf9t+ly0WcPQG5JBH6LmIl a1s+1xL3JyA5w0izurofm3aIdnlFtzO6tlTws/gqusdVIqBlWz1EAlCgEkX/WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767674460; a=rsa-sha256; cv=none; b=VALGY3AWhu3mTzxVLrAPN/cDKsNkxv8jABuPSlImixXjLyd3svatsdvIxtIaK/xsxfNEmS ZI8xxOCYFs4P+3K2P/kfIvkKQ6MVegyDTota//kNGdPPa2GImPOViFhfFRV+vftMk26HVl IljsHGVKQqIFcrpOnQFvI8Htf2Dux+LUi8qMFnbMrh41n+5zKWUlMJAvd8L/tDtaJN5mCS 0dJl5p01ag6aH1QMI2NN3hFsN8M5+tO+sxymrXtohL9HlMdA5KQT5i2ufFbAELV0DZqk+/ qy9U62D4aSbCVd6iS6cnsWGpQfr5/5LbyIvy2BZFqpW+LNbpLh/C2W1nJen6Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dldlb6fZSzrhr for ; Tue, 06 Jan 2026 04:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23702 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 04:40:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9c401bf14854 - main - zstd: Move to a new zstd package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c401bf14854ef20e5e187395a686b0d1b7bcb5f Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 04:40:59 +0000 Message-Id: <695c925b.23702.6be398b3@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9c401bf14854ef20e5e187395a686b0d1b7bcb5f commit 9c401bf14854ef20e5e187395a686b0d1b7bcb5f Author: Lexi Winter AuthorDate: 2026-01-06 04:23:22 +0000 Commit: Lexi Winter CommitDate: 2026-01-06 04:24:59 +0000 zstd: Move to a new zstd package Zstd is a discrete, self-contained system component. To match how we package zlib, bzip2 and xz, move it to its own package, with a separate lib package. Add the new package to the minimal set, since this is a core component that users expect to be installed. This change adds a new package to the system so, until we have a proper policy on how to handle this in release/stable branches, it should not be MFC'd. MFC after: never Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53603 --- UPDATING | 6 ++++++ lib/libzstd/Makefile | 4 +++- release/packages/ucl/zstd-all.ucl | 30 ++++++++++++++++++++++++++++++ usr.bin/zstd/Makefile | 2 ++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index ee035c3d7615..5029bf086bdd 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20260106: + Zstd has moved to the new "zstd" package. If you have set-minimal + installed, this package will be installed automatically, otherwise + you might want to install it manually. This change only affects + pkgbase users. + 20251222: Commit 9f49f436a9ec changed the internal KAPI between the NFS modules. As such, nfscommon, nfscl and nfsd must all be rebuilt diff --git a/lib/libzstd/Makefile b/lib/libzstd/Makefile index 0e25f01d4881..4a1557a14517 100644 --- a/lib/libzstd/Makefile +++ b/lib/libzstd/Makefile @@ -1,3 +1,6 @@ +PACKAGE= zstd +LIB_PACKAGE= + LIB= zstd SRCS= entropy_common.c \ error_private.c \ @@ -43,7 +46,6 @@ LIBADD= pthread CFLAGS+= -DZSTD_DISABLE_ASM PRIVATELIB= yes -PACKAGE= runtime ZSTDDIR= ${SRCTOP}/sys/contrib/zstd .PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \ diff --git a/release/packages/ucl/zstd-all.ucl b/release/packages/ucl/zstd-all.ucl new file mode 100644 index 000000000000..ada125444b68 --- /dev/null +++ b/release/packages/ucl/zstd-all.ucl @@ -0,0 +1,30 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Fast, lossless compression algorithm" + +desc = <; Tue, 06 Jan 2026 04:41: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dldlf1WNZz3X1K for ; Tue, 06 Jan 2026 04:41:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Z4eGnH8CRDj2kz4qMCrZT2EJrNn5iDbwM5Wr0bM1A8=; b=PIm3/KYMiRZZMH6+9EO3Gy+1QD5jboQSCsA5aKrKGMrIlT5xWBWtTiyKS6S9PX8NInMsfF ghf0GwZ8Mr6Cwc6NlscTEcvQLzE/vMJNQmPjASTzeNdBEK92Zpdqwa33K0Dyo/lnaDfjIZ o9QQl1jI/ew6HyxKuLx0Py3TebeCzsfmB8tgAhUK9kORB4MFjtvKLDzCNjbMyQ0BzFig93 xOxZD90cV3XXxn9npGUwsA35uvVNBwiL9sS81x0aCSuD7mdVmSZO3+5cFx2m3VwkUO+Add fsXAaPWxPBKcE6FQX5O+B3U4NWsOCNfA1QpiXcNMHdZ8+74VGC5wxiZwLempmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Z4eGnH8CRDj2kz4qMCrZT2EJrNn5iDbwM5Wr0bM1A8=; b=VWQWRs+35EDiyrRFDcELLOC/i2yoTeKbgeNEzs+nw9clOWvFMDzwmxuNJc0yynVLlcN6lV M/m9b+cGaZh/+biXmKBFQHKsStdp48NvhfA/EkJiWpR8nCWliKDkXOrXbIQhGp92gFa5mb s7Qm055k8aE88iZEps+kxoZQ4aZWURHZkKxMOLAYpVGwkMbtSgzMWGh9KJl7/jXBAtO01E DuMHVKDAlOO6thLy227uBAeybHn/UR8tiF/6lZ68zTICRiyTncUTvGOaoCkMOz10IRuJRT aH2UClK2xmZIMjm0QLbfVjO5lbIxeD7UwnFnoMiSpGgTh2qkzg2bFR/PdhKBxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767674462; a=rsa-sha256; cv=none; b=BDKZRUe5VC6v1UeMMu8MReBz1eELPmPklVVSzlNVdLj5Mye4ByzjtgCfqzx0pKqCJwjSwx /sZyzZ9zyVe47Pkqfl52vmAK2wm7D6hzZG12S4Eu8ZMwiY7DvvCmo1lDr9SsQmjitCjwLF 9rC3+APG50XWN5R02ZjDRkVRNrsaT34QfjJ8ywReIFR9bCkRhU5tPWAVrUEcgpuFIs1Owr HSdu3CE459JM6H9ApcxS2fJVasjeth1OTbwF3iZ0A7d4xk1dQYn+rwB+b7A55OGrsLthgV GUIBFvVn+g/hpztRFqUjTp+JENi2XT8fMGmtR9AgMoBGzTgsq5QQSoI/Uy7h2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dldlf0x9hzs4W for ; Tue, 06 Jan 2026 04:41:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22569 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 04:41:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 4028504b4826 - main - lib/libbl[ao]cklist: Use LIB_PACKAGE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4028504b4826caf3dac64a30cf0de777e2a6b607 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 04:41:02 +0000 Message-Id: <695c925e.22569.31228cc@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=4028504b4826caf3dac64a30cf0de777e2a6b607 commit 4028504b4826caf3dac64a30cf0de777e2a6b607 Author: Lexi Winter AuthorDate: 2026-01-06 04:28:43 +0000 Commit: Lexi Winter CommitDate: 2026-01-06 04:28:43 +0000 lib/libbl[ao]cklist: Use LIB_PACKAGE This avoids e.g. utilities or ssh depending on the full blocklist package just because they link against libblocklist. This change moves files between packages so, until we have a proper policy on how to handle this in release/stable branches, it should not be MFC'd. MFC after: never Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53605 --- lib/libblacklist/Makefile | 2 ++ lib/libblocklist/Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/libblacklist/Makefile b/lib/libblacklist/Makefile index cac023d69bb7..d13633546c33 100644 --- a/lib/libblacklist/Makefile +++ b/lib/libblacklist/Makefile @@ -3,6 +3,8 @@ BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist .PATH: ${BLOCKLIST_DIR}/lib ${BLOCKLIST_DIR}/include ${BLOCKLIST_DIR}/port PACKAGE= blocklist +LIB_PACKAGE= + LIB= blacklist SHLIB_MAJOR= 0 diff --git a/lib/libblocklist/Makefile b/lib/libblocklist/Makefile index 127abb23f43e..2f3ca53cf23a 100644 --- a/lib/libblocklist/Makefile +++ b/lib/libblocklist/Makefile @@ -3,6 +3,8 @@ BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist .PATH: ${BLOCKLIST_DIR}/lib ${BLOCKLIST_DIR}/include ${BLOCKLIST_DIR}/port PACKAGE= blocklist +LIB_PACKAGE= + LIB= blocklist SHLIB_MAJOR= 0 From nobody Tue Jan 6 04:41:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dldld6Ghnz6N6L8 for ; Tue, 06 Jan 2026 04:41: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dldld0wy7z3WvW for ; Tue, 06 Jan 2026 04:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WWEGbw4/KwAnDKRqRQlGdtaqk2waPxl6Wtb5YerW8ng=; b=eaeLnVyrf0iQuhjxInIJpKeXQHkHTYPpeWgCeOyKl1IBpmUv1607gdMccU0TqAV57SvjrK tVVh2P5GWChIO1WSmNOhL4pwj/23C5Z/ct1xFTvVh0LVyxVRJUB1+sOrQ5Un596SgyiguD QY0Dsd3oRUErXNB3lokGJIRyI+nlIMD+c2mpiSbjAnIJxst3ItYm1DYal3Mv6EEMzcP2Wr EkkcNmnPM9yvvSDuTZUn1en08LeGfNTvvhTRNG2YIi77ZLaXemgT+llXLAnqKQahZNnLiu fU6eqvf3rsUL18kRUzTBsgWwKSeL/p5yH32SJ2ltywGb/5rRWk7B0mmHGkvmfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767674461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WWEGbw4/KwAnDKRqRQlGdtaqk2waPxl6Wtb5YerW8ng=; b=jH3ZVugvqa4Y4TGxKL1fNKkFCdpKUocqAzmIrdTRMoocLH1GPn3sBjP49dUMnyeZbiVHQx w7SBZrGdHM6qL2oYQEXrGp3ugc+dRel5+xRlWhl+fuaM1Hs1w1ts0FjTDlLgiyrH7YyT3C dJvwkcI3jXoDBv4MtkR8jF/UTcHZAKr82ovn9Wq3wSHB2guP9CuhGakieLvcYPOIIjBpH/ EQApNFlzX88PWEgpDpaufpIOpJaVm2o/Eo0FGumBEv/vjn8lKvQbEkBekckPE2itTP33tI ez9HrBCDWk0Mc4aNBtWUeygzQzTqTBTcvj39fNhq2PE/k6Ms99PQ1T/zGhbqPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767674461; a=rsa-sha256; cv=none; b=TT3s50Y/nVK2SEci6DaHVmjrsK34YCShsHA2qG09nKFNy5yHYzg8I++CgPDRE1FjFZ5bI6 VxDmKyuqIOv3GR/3sFdUE+TmpEZSV/HzSMGUR25/wNkIGC0HaAe0bAXaaxEntn/BEPH4eg jx+IY+Ypm6oqa/uhLH6S+BSVhl08OKhjjqMKb/bswbLauRNejoT5s6VHdNFGiJucMuK69X XuW1ujZpuKhc6hS04tfSjEzc/luQw6rbWa4LcFBo/jDtRwd2EpmEvf6MYsXI2eauhIOcTP RHPq7lqp/XbZrTqCNxbBjJwFtPnlwX5Bp9S0FVAeyFKSEr2W3VWS0FJaP0i6Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dldld0L79zrys for ; Tue, 06 Jan 2026 04:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23e01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 04:41:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: bde17e7663ef - main - libypclnt: Move to yp package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bde17e7663efc2e6abfb137d4bbd937226a66674 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 04:41:01 +0000 Message-Id: <695c925d.23e01.314d71e5@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=bde17e7663efc2e6abfb137d4bbd937226a66674 commit bde17e7663efc2e6abfb137d4bbd937226a66674 Author: Lexi Winter AuthorDate: 2026-01-06 04:26:53 +0000 Commit: Lexi Winter CommitDate: 2026-01-06 04:26:53 +0000 libypclnt: Move to yp package This was previously in runtime, because pam_unix uses it and we don't want to pull in the entire yp package as a dependency of runtime. However, we can now use LIB_PACKAGE here to create a yp-lib package to contain the library, which is a much more reasonable dependency. Since libypclnt clearly belongs in the yp package, move it there. This change moves files between packages so, until we have a proper policy on how to handle this in release/stable branches, it should not be MFC'd. MFC after: never Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53600 --- lib/libypclnt/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libypclnt/Makefile b/lib/libypclnt/Makefile index 899e301f4608..ce63d8627a5f 100644 --- a/lib/libypclnt/Makefile +++ b/lib/libypclnt/Makefile @@ -1,4 +1,6 @@ -PACKAGE= runtime +PACKAGE= yp +LIB_PACKAGE= + LIB= ypclnt SHLIB_MAJOR= 4 SRCS= ypclnt_connect.c \ From nobody Tue Jan 6 07:49:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dljwt3Zdnz6NHfC for ; Tue, 06 Jan 2026 07: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dljwt1nyfz3nRK for ; Tue, 06 Jan 2026 07:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767685758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBbsJakUtqwepxopSHXpl9ZzbZ6LobNpocUyTXC7ZHI=; b=yLiciAKiwkLI/BhNplRU2z757w0VsVn3/RG8dCMUuoH9XjBTRp4HkKnG2cQxSReWa4fARA 3b5UlT2UKCQtaciS9tgIQI/MywSHGB397WgFZvZ01ZxTSsBUuti8+Q3khToEchuU9+O81s 3rgVW5zOREPShSTvC9gFjVHKohH+itrF+XPrEBGZw6x7nteZQz45ispZIQPlIyLWJ0LFfO lBTsjsjvj/rkIgkTjkoN1w8/qEjfzf5jBKcIT1HkN5bQynPFQHnygeN0J/C1O0/djaUndA /ymuyFQlC+XjmCQ6Wx9zkFmfFQdz0be2Dc8eknIxXeg6xaGb8J1E210wLVRKWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767685758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBbsJakUtqwepxopSHXpl9ZzbZ6LobNpocUyTXC7ZHI=; b=YzSoC2D0sESuWn2QjvSTTRXP3JmRN7dHrYBdiV7ScF8FVyfv3oRK/ni9OUGlM86ArIgX/c W3L7mglbbvmOL0v9secR+xiBNkkq87tsEPWXWTNa4SVCj4teqv58WENkFnDyDnDXWEpa/4 YoQ2mfAVh68bx/eaW0EaN9Mh2bDgMt3QNCGqMoZ1XKRnXBUiWrkP6VXNP7TzbwpruCaX3s c4NzW9QSS7tajDzz5sUBubLWA9KkdNftULdkTXOhv+oM1Jvys/K2AeoL0kTqzeWHpfObEd Gp6B6knBACY07MHLMxXdKTWIAgzbM0B+BnLXJLNGKXFH3yKa0ruwRtTV9vDagQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767685758; a=rsa-sha256; cv=none; b=lfj10sO/PcQMEoGDgKM9V8W4WnxWktJU4T/oyPpryqf+juiyNHl8vHtYvg61zmfTgVibIL gBg57JopxlQiD4kIGO+NQlz3ip2CepXWfYIfYSnWIlR0s0S8gXfQr2np1/EWOutlfwYjDu L5u1k8vSVywvsv8CVlNMUzgfZdoR+wZTwJe+BJU5diEcOPsHuyoa6duFXvN6SorO9SRDLF kGRAUW7i1xOChjOvh7j0ou7/u9PJk7Liszl/zHOKS1+iq+hN2sqG4MnDn4J+XztvtZnUnE w1Topj7fkD6y8D7c5G2yp8QfSCOCDG5ECChHhT4pyMC5/YuFvZi3XBNeQV2vsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dljwt131Jzy0M for ; Tue, 06 Jan 2026 07:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3daf1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 07:49:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Anagh Verma From: Enji Cooper Subject: git: f384784289db - main - kern_syscall_deregister: document syscall 0 no-op logic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f384784289dba13b90138a89d3df3a8ea063aff9 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 07:49:18 +0000 Message-Id: <695cbe7e.3daf1.20a5a762@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f384784289dba13b90138a89d3df3a8ea063aff9 commit f384784289dba13b90138a89d3df3a8ea063aff9 Author: Anagh Verma AuthorDate: 2026-01-06 07:42:56 +0000 Commit: Enji Cooper CommitDate: 2026-01-06 07:48:54 +0000 kern_syscall_deregister: document syscall 0 no-op logic Document syscall #0 being handled specially in `kern_syscall_deregister(..)`: it's a reserved syscall and not dynamically registered, and hence does not need to be deregistered in the function. Co-authored-by: ngie@ MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54326 --- sys/kern/kern_syscalls.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index a93d711e7597..7ddc28ed4e26 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -161,8 +161,14 @@ kern_syscall_deregister(struct sysent *sysents, int offset, { struct sysent *se; - if (offset == 0) - return (0); /* XXX? */ + if (offset == 0) { + /* + * Syscall #0 is reserved and is not dynamically registered. + * Treat deregistration as a no-op to simplify module unload + * paths. + */ + return (0); + } se = &sysents[offset]; if ((se->sy_thrcnt & SY_THR_STATIC) != 0) From nobody Tue Jan 6 08:19:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlkbm72ghz6NKZm for ; Tue, 06 Jan 2026 08:19: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlkbm6VdMz3qSk for ; Tue, 06 Jan 2026 08:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pHHy5q2Y4m0YlJXLwCLi/s8+pnUa4qK2CYA7sfSIASM=; b=IYgr3pAVJDdcZViWdsVh7vAXGrFxd9UTLdLH+J0nxa7dGtnj/DzYStVJvTF5WqvGK6zU9F 8ovhZ/x6gDFpBppP+v2TN+Gv68KuIwXO0t5LFc8XWkrKlO+3yjv+PgEN8AfOr/mX7fYqql k4RXv01NlOBXMFvyu0qZeMZDBjFo99/KrEZiCQ7Lei1gJAdmxBsSlBI5gOR7U6YByIUrZs 6D1KFaWMx4Vs7H+Wl+tHaBiwSo++a0CWg3Rzfx7CU6YBzqcYpkbXKUWhBjd0j4ZJIouKWE uY5+NwE+EiaSOS70hvuJS0obHw3Xv6sr1I4kBwZKCFiTOKEctX1Z9k7COF39Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pHHy5q2Y4m0YlJXLwCLi/s8+pnUa4qK2CYA7sfSIASM=; b=UfEVtACQenu5MFdmKzYPE20TX8FiFAiOt7uddmZWzxDyrv3IcR1MppxmsHTIuL7yJiTQlA KCC3EWncQbFmBNcP5sXchYOvXoAOa/G16/lz2RU9flSjFdFKCVU4KcXDwCGjn+ZbaNWL+6 MGyHPd5DSD5FzqLZQjNEf1QyuPrZq2HqS+lJQk+Qcb6iriJPDQ1/oYH0Uucmy1RsPKR/ru WRcTXPau0h1F/WexZbKrv+C+zt64PjO9x8fm0rUCgDXId9J3/TZoZ1oIjkbX88wtUDDLgQ Qh6FhoV4RR5Xo8zey4K/H9pgTqmW07olYX7lbCsXFdzrSbrKGcnhbfw2TYAsVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767687572; a=rsa-sha256; cv=none; b=h4mEPjLYuUIWgGojHmnRUNy0AMcZBe7g58Nya9aWvURaI0Uoo5I3blt8dHfH6/MIpYmgIe CwAhP4zz+UD/xn3jeZ1OWxH0tVGtACaCG47h/yfWPYdszriyAXJ+HpPsDZLKKWL/PqG9UL jQ+fjqF9iiAJJ8vstOOFfJIbTx3O012LqKqvIv3GJiiaRQYxfFBDnC4624s8adw1VrQl55 TqcQny+AGFvtMYqgqNwNA1ciCr4iTLsVpmvx4rFe8p69KhlvoC8MxgB+QIaqkrLaITiOrI QZn/vk2W/hI65+G0PXCvlXDmt9F6qrog45FzjymWMSK5arYzM2chlOieta2Rfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlkbm660KzyFR for ; Tue, 06 Jan 2026 08:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fa2a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 08:19:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: George V. Neville-Neil Subject: git: e018fedef0a6 - main - Correct the data collection arguments. Add proper tempdirs. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e018fedef0a6389240322da9fa4b9fa9971f6e59 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 08:19:27 +0000 Message-Id: <695cc58f.3fa2a.3915540e@gitrepo.freebsd.org> The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=e018fedef0a6389240322da9fa4b9fa9971f6e59 commit e018fedef0a6389240322da9fa4b9fa9971f6e59 Author: George V. Neville-Neil AuthorDate: 2026-01-06 08:17:38 +0000 Commit: George V. Neville-Neil CommitDate: 2026-01-06 08:18:22 +0000 Correct the data collection arguments. Add proper tempdirs. --- tools/test/hwpmc/pmctest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index f54541aeea1e..8accdf09e69a 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -20,10 +20,12 @@ # prompt would go to stdout you won't see it, just press return # to continue or Ctrl-D to stop. +import sys import subprocess from subprocess import PIPE import argparse import tempfile +from pathlib import Path def gather_counters(): """Run program and return output as array of lines.""" @@ -50,8 +52,10 @@ def main(): print("no counters found") sys.exit() + program = Path(args.program).name + if args.exercise == True: - tmpdir = tempfile.mkdtemp() + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-pmc") print("Exercising program ", args.program, " storing results data in ", tmpdir) for counter in counters: @@ -59,8 +63,7 @@ def main(): continue if args.exercise == True: p = subprocess.Popen(["pmcstat", - "-O", tmpdir + "/" + args.program + "-" + counter + ".pmc", - "-g", + "-O", tmpdir + "/" + program + "-" + counter + ".pmc", "-P", counter, args.program], text=True, stderr=PIPE) result = p.communicate()[1] From nobody Tue Jan 6 08:25:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlkkb2qMsz6NKfT for ; Tue, 06 Jan 2026 08:25: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlkkb2GNPz3r1g for ; Tue, 06 Jan 2026 08:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xD5nwFm7maW3xNsCQIkdN8LZRjyCdo4NiJHHjqtAhoM=; b=N4sgyTe++DdvEEjJ90mpBWpg5YIMF8iiMOsiO6EDBY0ae4wGtiLqGdjmwnvY7JVIWY5GI6 5H3j4pHJ/Cc9Y/wj5Apf7tJAQsa+3kTAlARsTONE8d2JUgYTA41odVsq++jZ5+v+aGnLGW cqWRL48+2xyBZ2QCKW22PivR/ssQEXfF5Jgc4KmeL9Qc5Gmiel1YUppKnzS8HjYYpKD1s9 OutFd1CFSNFnxlER71RJWAchmCNnAN6B/rOuiMKPcPKo+2ZVaYkpdPWGuWHaWQKFkVRu1W Gd04Zqh+U/sPs3qoLWQ4qWQ4atH5Hy0IaEHCbkS+T0Md4Wq/7arujEUonBRvYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xD5nwFm7maW3xNsCQIkdN8LZRjyCdo4NiJHHjqtAhoM=; b=rSnJLYhvgT4cxhW44DtW0MHTjeoYiCZ4JcswYianGyiQ7mWN0zFtgNZjCit/n3P4h1UOmO 0ROg6092T2JRTpohdZGkMSIPYxDw0Ei+Rmx4333QxISqKcsu8F90TH8O5Y0+GCbjS4GzLs 2R3CU3e9ZecDzmHh1jLvbeAdpaHe4pNUN1ifwiQB7LQ+jwQKqDb0vsj58ZjZlt1P+jWwLg CKNyXDfILTp2GdHYIyCK1diVnZVCNth/4zApiVg+mW6+kYY/RwRIUN2NdYKw/F5vOiYrP5 0cldXi8pC/lbkKceVGVJ0CjqoGPWIZIjNzCJFkYp8bTytOUAHyYTSbjf62+kWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767687927; a=rsa-sha256; cv=none; b=vjs+0svu1J7QJsXUhxBYikFvxBzoEJY7EBBf1ZmfxhR/CVGewv8jRYlFDQaFI8wU329pYl UokbZM3HJYWycl8aQTJ+WwP0ysmpE+aE/Ch+qSa7FqtSPR/R74nmWNHTIzNBETNpNn7x/9 Qc8iRaA5U8jIpQhMZ8nJDuGE0IulWVKOAElgeEAuCW/1Br164r9iTRl3UTvITmbby5ShGR noR9Ht9jWCW1WxoJWggQRothjOCa+JzVYGAilGNHpbLFDnpIxDlkeEoVhEtryzsocPPoZ8 sJwxGcLcnON4ce3Z+6voWgQqio/+qpOn49kVWtHzfUCJmTYpRozrTIFYNEpWug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlkkb1W4BzybL for ; Tue, 06 Jan 2026 08:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 931a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 08:25:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: =?utf-8?Q?Gon=C3=A9ri?= Le Bouder From: Baptiste Daroussin Subject: git: 7af8b75201b7 - main - nuageinit: config2_network support dns service cfg List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7af8b75201b7af353fa74c8feb937b52f5ccf9bb Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 08:25:27 +0000 Message-Id: <695cc6f7.931a.423e5f54@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7af8b75201b7af353fa74c8feb937b52f5ccf9bb commit 7af8b75201b7af353fa74c8feb937b52f5ccf9bb Author: Gonéri Le Bouder AuthorDate: 2026-01-03 02:11:55 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-06 08:25:14 +0000 nuageinit: config2_network support dns service cfg This change enhances `config2_network()` to honor the DNS configuration, when it's defined through the `services` section. The `network_data.json` file can hold DNS configuration at two different places: - within a network configuration entry - or `dns` entry in the `services` section, in this case the configuration is global. An example of such configuration: {"links": [{"id": "interface0", "type": "phy", "ethernet_mac_address": "52:54:00:01:59:03"}], "networks": [{"id": "private-ipv4-0", "type": "ipv4", "link": "interface0", "ip_address": "192.168.123.5", "netmask": "255.255.255.0", "routes": [{"network": "0.0.0.0", "netmask": "0.0.0.0", "gateway": "192.168.123.1"}], "network_id": "9e5b1ed9-f5e6-4941-a90f-2e06bab858de", "dns_nameservers": ["192.168.123.1"], "services": [{"type": "dns", "address": "192.168.123.1"}]}], "services": [{"type": "dns", "address": "192.168.123.1"}]} See: https://docs.openstack.org/nova/latest/user/metadata.html MFC After: 1 week Signed-off-by: Gonéri Le Bouder Pull Request: https://github.com/freebsd/freebsd-src/pull/1941 --- libexec/nuageinit/nuageinit | 25 ++++++++++++++++++++++++- libexec/nuageinit/nuageinit.7 | 2 ++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index a5411c60b410..9aaec1b87a6a 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -236,9 +236,16 @@ local function nameservers(interface, obj) resolv_conf_handler:close() end - if not os.execute("resolvconf -a " .. interface .. " < " .. resolv_conf) then + -- Only call resolvconf with interface if interface is provided + if interface then + resolvconf_command = "resolvconf -a " .. interface .. " < " .. resolv_conf + else + resolvconf_command = "resolvconf -u" + end + if not os.execute(resolvconf_command) then nuage.warn("Failed to execute resolvconf(8)") end + end local function install_packages(packages) @@ -572,6 +579,22 @@ local function config2_network(p) --end end end + + -- Handle global nameservers from services section + if obj["services"] then + local dns_servers = {} + for _, service in pairs(obj["services"]) do + if service["type"] == "dns" then + table.insert(dns_servers, service["address"]) + end + end + if #dns_servers > 0 then + -- Use nameservers() function for global services + local nameserver_config = {addresses = dns_servers} + nameservers(nil, nameserver_config) + end + end + if #ipv4 > 0 then routing:write('static_routes="') routing:write(table.concat(ipv4, " ") .. '"\n') diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7 index 445902ccf2c0..4f6b6e269867 100644 --- a/libexec/nuageinit/nuageinit.7 +++ b/libexec/nuageinit/nuageinit.7 @@ -117,6 +117,8 @@ file supports the following keys: Array of network interfaces to be configured. .It Ic networks Array of network configurations to be set. +.It Ic services +Array of service configurations to be set (e.g: DNS). .El .El .Pp From nobody Tue Jan 6 08:25:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlkkc5fdCz6NKYh for ; Tue, 06 Jan 2026 08:25: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlkkc2mY6z3rFN for ; Tue, 06 Jan 2026 08:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnMRPA5W5nh7+4gPqzNlkYdGSvpVGeeNG7yc8PYYXwY=; b=M5hYsEsL5w0h93bASo92mwpNY7habke2gM7HszbsQJtfdPYF18unMBcLmtaOGn6Ln8U4+5 +7DlSYEHau6lZBdWVtsSp/YEgoRAOvBAiLz9L3nP9i/b+vaLJOqnDnkveoHGrWAGP3uaA6 DisiMTsoTKO/QyCTLpJw7AEpgd0tSsI27CYwj4+KarqmhLvG0Grj3P0ALvJ4kah2goDwsM +T3ORp2RgLotMxGIINRpLDrxDb+bHVs4Y+LzyfPCXMjz8ZIb/0NBpVlUZlgNW0/qDhcZmn Ek2kBN94faVOPDeveyTVCA8VETeQ4C/t/1Sx+YvWVdnn3FIwIwmnhkU4DVTs7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnMRPA5W5nh7+4gPqzNlkYdGSvpVGeeNG7yc8PYYXwY=; b=A8P6LLrqsUR0gyvYHylw2guvQ1XeDRP4fd2URbQike4+2G9k+BqTyHnbPB9GFfdx95sXb5 QQwjh989Uq0wD1xfWDXD1N1kAvkuJdd8goC37r0MEuduVuK3TTB2EkoyrgaWLbi2v9BIs7 oQW3jIbfodPIYZb/HA1yzkuNKaY80p1P4ErGt/XlH6whcZ9p3webvjbaUkpHYpdJtMEcaG iYCY55TuUGJWjbZ4tb5FQBsikkv7+fDEv5MBZl/Mr0SxTS1L+Eli0PRKewx6sc16B7ZNIi fr+AVpqP23N1//noIpKW+t+E7dppGITWQixEID7d0aJqrTPvd09lDy4x54SaVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767687928; a=rsa-sha256; cv=none; b=JmTl1ICclxEecKDWb2tM4mJK0+EpNo9e7VM1rzbe9sSbrhAnV0t2s4DaCUrar+E5K+8sD4 yaSs8byoYtwOBlzc4iqfLoO1btm85GaOudO+G6M4lAgT1F3IQx2iK3fHuh0tA8I1iE/MEb ZrJiQKLJpw2UnSgBTF4pQGfsUJRvM5PQB2h8W3KwWWaX+KkxWx2WeTKuJ+2OqgrbzhDf5n mSx/ng+sDLTwXhT331X/ZJ4J0TQycVLmXXp5VhxNd88X45gZCfDhugAQMlmU4w5hIa5M9p BpUXpCX1Kug/X3ae+QCu1197TKjuggN0DxwNHxrw88tuFaaloTQt6/B02Ss0Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlkkc2Kfkzyxc for ; Tue, 06 Jan 2026 08:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 945b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 08:25:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: =?utf-8?Q?Gon=C3=A9ri?= Le Bouder From: Baptiste Daroussin Subject: git: 402f13537077 - main - nuageinit/man: clarify how to enable sudo and doas List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 402f1353707783e2adc8d0bff01faf557820f6f5 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 08:25:28 +0000 Message-Id: <695cc6f8.945b.618c210d@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=402f1353707783e2adc8d0bff01faf557820f6f5 commit 402f1353707783e2adc8d0bff01faf557820f6f5 Author: Gonéri Le Bouder AuthorDate: 2026-01-03 23:10:18 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-06 08:25:14 +0000 nuageinit/man: clarify how to enable sudo and doas Clarify that both `sudo` and `doas` are not part of the base system and they need to be listed in the `packages` section if the user wants to enable them. MFC After: 1 week Signed-off-by: Gonéri Le Bouder Pull Request: https://github.com/freebsd/freebsd-src/pull/1944 --- libexec/nuageinit/nuageinit.7 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7 index 4f6b6e269867..455e1056b578 100644 --- a/libexec/nuageinit/nuageinit.7 +++ b/libexec/nuageinit/nuageinit.7 @@ -3,7 +3,7 @@ .\" Copyright (c) 2025 Baptiste Daroussin .\" Copyright (c) 2025 Jesús Daniel Colmenares Oviedo .\" -.Dd June 26, 2025 +.Dd January 6, 2026 .Dt NUAGEINIT 7 .Os .Sh NAME @@ -323,6 +323,15 @@ which will be replaced by the current username. A special case exist: if the entry is a simple string with the value .Qq default , then the default user is created. + +Configuring +.Nm sudo +or +.Nm doas +does not automatically install them. Ensure the relevant command is listed in your +.Nm packages +section. + .It Ic chpasswd Change the passwords for users, it accepts the following keys: .Bl -tag -width "expire" @@ -397,6 +406,7 @@ users: packages: - neovim - git-lite + - sudo package_update: true package_upgrade: true runcmd: From nobody Tue Jan 6 08:25:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlkkd5MDJz6NKYj for ; Tue, 06 Jan 2026 08:25: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlkkd3ZLTz3r1k for ; Tue, 06 Jan 2026 08:25:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rSk11bw+cLchPPMvLi6mC4/bp3Rbx2lvGoUPbQv8T4=; b=imkGB4wF3eQDTzUt2Z3Seeh99UNwlACaB3k4b9qweo9aSUsorYuD72OlblSoDL8XaIDWyy vUssnQv9n5Ap8rO32YkATt1CfVK4wy6dJG+2dQ4biiZ3rL1ReDMj4gV1ReBpgmqDTq4Frq mm4bqX37DmXdvrT+91qMECC/CPMQTwjzh58qjQNJR3OiVOZ7XQKNOnNoz5qSlTOVdrAUm6 ANOExJ1G4t0cJuzzjSPL4vqyc16gc5jYXYbLijHoVnEK5olaXg3LB1BwPadQKuPXrlE5S9 53sQpqs72tcnXmYv53PVOoyZzVlMrDtF8pSE4+GJsuEiWXPko15qyUp0RILlOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767687929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rSk11bw+cLchPPMvLi6mC4/bp3Rbx2lvGoUPbQv8T4=; b=G+y4gl1Rd1QMjV2/EHqhjsVYGpjTlO8Xnl+0QlLIHEaAuhd50PL+4+6+uDR3yOO5ghZBv7 kwBeXpcNFT8GZ4mBxXo62vuQYuGjJ3MD1e+Ro8IMXAIT6uAFmihevfvE5UkjZ/B0d8h1zx 50zJkfj3ay3rKmvLj8FqruYR76UcVfakfDb6VS32oPvpyfVfx+6AbrF5zea2HkU78TCgUb fUV+GLSJsEQ4HddvRNEKLC4kXlIo+tMiMFRCqAo+euEcV/Ds7I/unbq0RGL3XcCr8PW+/5 tC4D1gIyYpmuCSUnfDRKxRPY+/9ePzNqpsqL0XQ/aHp7TlLjvEuEI78oDLYm9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767687929; a=rsa-sha256; cv=none; b=WFhtC+x2rVpyrzDs2KUAPmUnnAe6JSSgFflLlvh0e/ReBP4320rPzL66Q5EwIndak7nAZV CO7WD4vpGWbHESeQZUqAoF5fN5NQbXlxge0mLu+6eLehk7NGcxHINDG4e1EWdXbm0iGUrZ qyt6qVZ6U8l8XQSf1E0vOJ33BFZxDC46+vZiEjFXt0qYVB8GZhZHDU6rwcNpPbdGVnhaVo wS6g0zovZ9LgWqJ3r67EtTh5sJ+Qx8JBldUU84getEueunfyNlhbIgg7bjGX5lgHisDQV0 1mN/ojbjBnhWpBeAhUXrA1sLd2ko3W/6mTyjXHM7PrXJVvmoFG9BAdoZypqx8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlkkd33mKzyn2 for ; Tue, 06 Jan 2026 08:25:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9460 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 08:25:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 9ea30bbb0e3c - main - nuageinit(7): pert mandoc linter List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ea30bbb0e3c34b3ea369e217d930e2165610c0c Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 08:25:29 +0000 Message-Id: <695cc6f9.9460.597f50ce@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=9ea30bbb0e3c34b3ea369e217d930e2165610c0c commit 9ea30bbb0e3c34b3ea369e217d930e2165610c0c Author: Baptiste Daroussin AuthorDate: 2026-01-06 08:24:50 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-06 08:25:14 +0000 nuageinit(7): pert mandoc linter MFC After: 1 week --- libexec/nuageinit/nuageinit.7 | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7 index 455e1056b578..35e1d6024105 100644 --- a/libexec/nuageinit/nuageinit.7 +++ b/libexec/nuageinit/nuageinit.7 @@ -150,7 +150,7 @@ is not set. Sets the system timezone based on the value provided. .Pp See also -.Xr tzfile 3 Ns . +.Xr tzfile 5 . .It Ic groups An array of strings or objects to be created: .Bl -bullet @@ -191,7 +191,7 @@ Specifying the following parameters from a file named takes precedence over their specification from the .Ic network parameter of -.Pa user-data Ns . +.Pa user-data . .Bl -tag -width "ethernets" .It Ic ethernets Mapping representing a generic configuration for existing network interfaces. @@ -202,10 +202,11 @@ rule is specified. If .Sy match rules are specified, an arbitrary name can be used -.Po e.g.: id0 Pc Ns . +.Po e.g.: id0 Pc . .Bl -tag -width "nameservers" .It Ic match -This selects a subset of available physical devices by various hardware properties. +This selects a subset of available physical devices by various hardware +properties. The following configuration will then apply to all matching devices, as soon as they appear. All specified properties must match. @@ -213,7 +214,7 @@ The following properties for creating matches are supported: .Bl -tag -width "macaddress" .It Ic macaddress -.No Device's MAC address in the form Sy xx:xx:xx:xx:xx:xx Ns . +.No Device's MAC address in the form Sy xx:xx:xx:xx:xx:xx . Letters should be lowercase. .It Ic name Current interface name. @@ -224,8 +225,8 @@ Lua pattern-natching expressions are supported. .El .It Ic set-name -When matching on unique properties such as MAC, match rules can be written so that they -match only one device. +When matching on unique properties such as MAC, match rules can be written so +that they match only one device. Then this property can be used to give that device a more specific/desirable/nicer name than the default. .Pp @@ -233,8 +234,8 @@ While multiple properties can be used in a match, .Sy macaddress is required for nuageinit to perform the rename. .It Ic mtu -The MTU key represents a device's Maximum Transmission Unit, the largest size packet -or frame. +The MTU key represents a device's Maximum Transmission Unit, the largest size +packet or frame. .It Ic wakeonlan Enable wake on LAN. Off by default. @@ -252,16 +253,16 @@ This requires setting .Sy addresses too. .Pp -Since only one default router can be configured at a time, this parameter is applied -when processing the first entry, and any others are silently ignored. +Since only one default router can be configured at a time, this parameter is +applied when processing the first entry, and any others are silently ignored. .It Ic gateway6 Set default gateway for IPv6, for manual address configuration. This requires setting .Sy addresses too. .Pp -Since only one default router can be configured at a time, this parameter is applied -when processing the first entry, and any others are silently ignored. +Since only one default router can be configured at a time, this parameter is +applied when processing the first entry, and any others are silently ignored. .It Ic nameservers Set DNS servers and search domains, for manual address configuration. .Pp @@ -316,22 +317,21 @@ A string or an array of strings which should be appended to .Pa ${LOCALBASE}/etc/doas.conf .Pp Instead of hardcoding the username, you can use -.Sy %u Ns , +.Sy %u , which will be replaced by the current username. .El .Pp A special case exist: if the entry is a simple string with the value .Qq default , then the default user is created. - Configuring .Nm sudo or .Nm doas -does not automatically install them. Ensure the relevant command is listed in your +does not automatically install them. +Ensure the relevant command is listed in your .Nm packages section. - .It Ic chpasswd Change the passwords for users, it accepts the following keys: .Bl -tag -width "expire" From nobody Tue Jan 6 08:55:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dllPc3KNrz6NMhH for ; Tue, 06 Jan 2026 08:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dllPc0Lkwz3vZs for ; Tue, 06 Jan 2026 08:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767689748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oA2AO9eG4dAItbvi8SphV7C7mRATvQ2FEof68kCrJIQ=; b=WR2wEd7sQEJjWHZr0ROBo2MsXzt4xxlMGQ/I+1TKINUm1iONPpYnKDuh9msWHx16/zxVi9 wvvDk2VM1QIsTb45f+N9B+9btubz3WWEVmG0gyuGdTOJ3CW5SOqXVMXdGqcdb15z4UnYCR j/IRKl5LrJWvF8Em35PW46DxreY8a2qoCCS1SVHntztWFDTfDgQjc+P1JM6W0lpNmD9dyQ 6h6hOPGFWgHnysVymsEFtm5q94JNz6OHYzqodWUvTzphJJKuZjabayNHEUaYmTTjFyUmgH PV+XV15sWMJXUX0aIA39JRDC6BNI+9clARY6LYaK9Xq8sSL4fY8TdFOZ6gaKOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767689748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oA2AO9eG4dAItbvi8SphV7C7mRATvQ2FEof68kCrJIQ=; b=O7WCXxkZKvlf2PzY//vDF3CANTZxFvSDWHJWqbRZnkyU7jz2RCQ4Ys2RDYaqxyycJT421g jTjxjRmOtYUXeT4G+9sXhbwcxKqz5Ij7/E2rL7/pWtSTUFNeFWonyeUxpg4C2+VlEI0IEO LLjZIFaFL63TgAs6AWgMVDCVO0l2b6XQ+8/cNVc+k/a+lTrq57MmEV82PRksOj1GObLfW7 3XYaDJGH2iAnJUni9UWob+W5Ej7l7KyIyq65Agd7VmjREKmZHQ1se2FWzoKTWW51PvTJHB Du1DDk0RsE00HXtacy4vY3m89hhvtX1kYJqJPu2Qk+NKVAPr0XohNmZhLbP5og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767689748; a=rsa-sha256; cv=none; b=m5h0WtWm1VFX0P6nc8p/CNcmpUJgQ7dkJZKgoYI4+e4NJ3YvWR8XHscNHQowSrSXAZF27f PUZejN1MxKDJ2BhHQRVA/E6fcCI/1TWJoZvNbK53Q4qhe4OV8Nc2Qpc/QCCnZXQxTT6Sq+ RDL/NHpncbrzyRh8WIX4fFirHQgixQ4XX1gD9ka+Fx1e4z67mYHobTtqsDoF5qcEkJYHQZ n2eRkIWk23TDEoO4zoII4wUo58F5f6XCDg5V2eAsFksUwc7nEkh6atf4JGaV35sC3/vrf/ eb4qfItopIsb/AYP6/O6F6EjT9WxmRTrFEO1tcbDZLovgice3zQRDUVgoy8Ufw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dllPb6b3zz10Xq for ; Tue, 06 Jan 2026 08:55:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id be77 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 08:55:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: George V. Neville-Neil Subject: git: 77153a491e3b - main - Split counting from sampling. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77153a491e3b31475f5faddb21271a0a8e0d4a9b Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 08:55:47 +0000 Message-Id: <695cce13.be77.1543bcd9@gitrepo.freebsd.org> The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=77153a491e3b31475f5faddb21271a0a8e0d4a9b commit 77153a491e3b31475f5faddb21271a0a8e0d4a9b Author: George V. Neville-Neil AuthorDate: 2026-01-06 08:55:14 +0000 Commit: George V. Neville-Neil CommitDate: 2026-01-06 08:55:42 +0000 Split counting from sampling. --- tools/test/hwpmc/pmctest.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 8accdf09e69a..588fe6d79e83 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -42,7 +42,8 @@ def main(): parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') parser.add_argument('--program', type=str, required=True, help='target program') parser.add_argument('--wait', action='store_true', help='Wait after each counter.') - parser.add_argument('--exercise', action='store_true', help='Exercise the program being studied using sampling counters.') + parser.add_argument('--count', action='store_true', help='Exercise the program being studied using counting mode pmcs.') + parser.add_argument('--sample', action='store_true', help='Exercise the program being studied using sampling mode pmcs.') args = parser.parse_args() @@ -52,22 +53,38 @@ def main(): print("no counters found") sys.exit() + if args.count == True and args.sample == True: + print("Choose one of --count OR --sample.") + sys.exit() + program = Path(args.program).name - if args.exercise == True: - tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-pmc") + if args.count == True: + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-counting-pmc") + print("Exercising program ", args.program, " storing results data in ", tmpdir) + + if args.sample == True: + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-sampling-pmc") print("Exercising program ", args.program, " storing results data in ", tmpdir) for counter in counters: if counter in notcounter: continue - if args.exercise == True: + if args.count == True: + with open(tmpdir + "/" + program + "-" + counter + ".txt", 'w') as file: + p = subprocess.Popen(["pmcstat", + "-p", counter, args.program], + text=True, stderr=file, stdout=file) + result = p.communicate()[1] + print(result) + elif args.sample == True: p = subprocess.Popen(["pmcstat", "-O", tmpdir + "/" + program + "-" + counter + ".pmc", "-P", counter, args.program], text=True, stderr=PIPE) result = p.communicate()[1] print(result) + else: p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) From nobody Tue Jan 6 09:42:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlmRW1CqMz6NPtQ; Tue, 06 Jan 2026 09:42:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlmRV3YgPz421G; Tue, 06 Jan 2026 09:42:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 6069gHl1096084; Tue, 6 Jan 2026 11:42:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 6069gHl1096084 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 6069gHbs096083; Tue, 6 Jan 2026 11:42:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 6 Jan 2026 11:42:17 +0200 From: Konstantin Belousov To: Enji Cooper Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Anagh Verma Subject: Re: git: f384784289db - main - kern_syscall_deregister: document syscall 0 no-op logic Message-ID: References: <695cbe7e.3daf1.20a5a762@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <695cbe7e.3daf1.20a5a762@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dlmRV3YgPz421G On Tue, Jan 06, 2026 at 07:49:18AM +0000, Enji Cooper wrote: > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f384784289dba13b90138a89d3df3a8ea063aff9 > > commit f384784289dba13b90138a89d3df3a8ea063aff9 > Author: Anagh Verma > AuthorDate: 2026-01-06 07:42:56 +0000 > Commit: Enji Cooper > CommitDate: 2026-01-06 07:48:54 +0000 > > kern_syscall_deregister: document syscall 0 no-op logic > > Document syscall #0 being handled specially in > `kern_syscall_deregister(..)`: it's a reserved syscall and not > dynamically registered, and hence does not need to be deregistered in > the function. > > Co-authored-by: ngie@ > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D54326 > --- > sys/kern/kern_syscalls.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c > index a93d711e7597..7ddc28ed4e26 100644 > --- a/sys/kern/kern_syscalls.c > +++ b/sys/kern/kern_syscalls.c > @@ -161,8 +161,14 @@ kern_syscall_deregister(struct sysent *sysents, int offset, > { > struct sysent *se; > > - if (offset == 0) > - return (0); /* XXX? */ > + if (offset == 0) { > + /* > + * Syscall #0 is reserved and is not dynamically registered. Syscall number zero is not reserved, it is the mux syscall. It is indeed not dynamic, it is marked with the SY_THR_STATIC flag. > + * Treat deregistration as a no-op to simplify module unload > + * paths. > + */ > + return (0); > + } > > se = &sysents[offset]; > if ((se->sy_thrcnt & SY_THR_STATIC) != 0) This check for SY_THR_STATIC would catch it. That said, what is the use of silencing the error from an erronous attempt to deregister syscall handler not owned by caller? From nobody Tue Jan 6 11:04:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlpG55vDbz6NVPn for ; Tue, 06 Jan 2026 11:04: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlpG53qP8z49Fr for ; Tue, 06 Jan 2026 11:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767697469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HrmhSfrb7L9oxDfB47r7bn+wOAqDsZIpDyK4dIHV61Y=; b=KZwAbhArgJgU7LLYi8hNVHZ4pluv9WcaqNwlW5GDvh9JUiQZcsjgXDtJKjoy1ZoTZnNDec WwG+bYUdY0n1OIbIRx+GD3avMstH0Yq+oAl7tMOq882Ky29eUfA+yL8TAnwpFWr37CdCPi dC3MXOvQg5Fq0g4PCPgMTrFFUgpxAAVweJ4FA0/hbwWUERlno1rJtTpS9vXTxODT0R+ZBZ 2+JAVLbem/zwZbm3HmOdScLhkQaMrarAruGRbgEqwpGFs7y262H6hQaJy57o1YWbN/zQc/ L3i3JsQg2Bzh+We37VqzrF75pJYKEEAPjlX4Qm4C3VXPU7tyVWbRLw8mgJeGPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767697469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HrmhSfrb7L9oxDfB47r7bn+wOAqDsZIpDyK4dIHV61Y=; b=RVDy7dEMA66maSnK1FVwJ8hMDsNUTkbmzsTc8ABjH+PvdEbZbZ2LQPkc4xM9LCTLKwB52R 8qA+hwISlAyprcaRtavaedvGNLu2Wh6SKdXPN/LaRy1n0jbthNsx8MIK1833agTzlEfWIN ruQFD6u8l7ksjPJflepR8YbI6aM3+ZdbREPN77oGvkegNU150GnHoidloyI7jCHpdXTXro mRxpr/O4gj/j2SQMCa2HoyiotMGegengycmGFw4B87Z7SXJs4zwcBvBPwCFqOhMwmFyj4V J68UFnipit6SRP7y55mcjQeLt9XIsalsku/aRRtIKwcuzLsS7dmUveW5aDz5aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767697469; a=rsa-sha256; cv=none; b=ZPaSSqa7qxfSWa05ma8Qjz14jsVbyMVQr4An/klyf2o49hz34cFlrQ8V9PO73Yweo19gOD jA77Q6dKmMcG4ukopXCl0e9nfQypeB54MW7r0E+eXcJWivj58V7aWkW093XqeprBjuPwyY 0BQT4yPRJQ77olcIfOAwdu/rnAmPP86m2tUfg3OEoEogPLHI3XPpIoXGvw55wWY1fOeDBM 3x7ijSGHjMTVVNQ+hefbQqEr4VEsGB1O3TfM/H4TrnPEp5pU6lxMXoNHr5zWR67A4hkRcy 2Qt6KqGyrAGjeGy1Nv+S3ogBkdcVZ/PchGMVE16vvtpZaGp6Qei66DAb1e1IDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlpG52H9sz13ph for ; Tue, 06 Jan 2026 11:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27bf5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 11:04:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sarah Walker From: Andrew Turner Subject: git: 6748ac4ee7ce - main - arm64: Add Arm SPE thread mode support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 6748ac4ee7ce1e6e6888293cf855fed4eb734126 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 11:04:29 +0000 Message-Id: <695cec3d.27bf5.508d53b8@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=6748ac4ee7ce1e6e6888293cf855fed4eb734126 commit 6748ac4ee7ce1e6e6888293cf855fed4eb734126 Author: Sarah Walker AuthorDate: 2026-01-02 16:27:43 +0000 Commit: Andrew Turner CommitDate: 2026-01-06 10:36:36 +0000 arm64: Add Arm SPE thread mode support Add support for the using the Arm Statistical Profiling Extension (SPE) in the hardware tracing framework, hwt(4), thread mode. SPE is an optional extension added in Armv8.1 to provide profiling of software using randomised instruction sampling. Thread mode allows tracing of a single thread, regardless of the CPU it is scheduled on. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D53738 --- sys/arm64/spe/arm_spe_backend.c | 302 +++++++++++++++++++++++++++++++++------- sys/arm64/spe/arm_spe_dev.c | 7 +- sys/arm64/spe/arm_spe_dev.h | 4 +- 3 files changed, 261 insertions(+), 52 deletions(-) diff --git a/sys/arm64/spe/arm_spe_backend.c b/sys/arm64/spe/arm_spe_backend.c index b4e1132f9cbc..c8d7de8f0c8c 100644 --- a/sys/arm64/spe/arm_spe_backend.c +++ b/sys/arm64/spe/arm_spe_backend.c @@ -91,11 +91,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include @@ -123,13 +125,12 @@ static struct hwt_backend backend = { .kva_req = 1, }; -static struct arm_spe_info *spe_info; +/* Pointers to current info structure per CPU. This points to either a per-CPU + * structure (for CPU mode) or a per-thread structure (for thread mode). + */ +static struct arm_spe_info **spe_info; -static int -spe_backend_init_thread(struct hwt_context *ctx) -{ - return (ENOTSUP); -} +static struct arm_spe_info *spe_info_cpu; static void spe_backend_init_cpu(struct hwt_context *ctx) @@ -140,13 +141,12 @@ spe_backend_init_cpu(struct hwt_context *ctx) char *tmp = "Arm SPE lock/cpu/"; int cpu_id; - spe_info = malloc(sizeof(struct arm_spe_info) * mp_ncpus, + spe_info_cpu = malloc(sizeof(struct arm_spe_info) * mp_ncpus, M_ARM_SPE, M_WAITOK | M_ZERO); - sc->spe_info = spe_info; CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { - info = &spe_info[cpu_id]; + info = &spe_info_cpu[cpu_id]; info->sc = sc; info->ident = cpu_id; info->buf_info[0].info = info; @@ -155,6 +155,8 @@ spe_backend_init_cpu(struct hwt_context *ctx) info->buf_info[1].buf_idx = 1; snprintf(lock_name, sizeof(lock_name), "%s%d", tmp, cpu_id); mtx_init(&info->lock, lock_name, NULL, MTX_SPIN); + + spe_info[cpu_id] = info; } } @@ -183,9 +185,11 @@ spe_backend_init(struct hwt_context *ctx) sc->kqueue_fd = ctx->kqueue_fd; sc->hwt_td = ctx->hwt_td; - if (ctx->mode == HWT_MODE_THREAD) - error = spe_backend_init_thread(ctx); - else + spe_info = malloc(sizeof(struct arm_spe_info *) * mp_ncpus, + M_ARM_SPE, M_WAITOK | M_ZERO); + sc->spe_info = spe_info; + + if (ctx->mode == HWT_MODE_CPU) spe_backend_init_cpu(ctx); return (error); @@ -218,19 +222,30 @@ spe_backend_deinit(struct hwt_context *ctx) { #ifdef ARM_SPE_DEBUG struct arm_spe_info *info; + struct hwt_thread *thr; int cpu_id; - CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { - info = &spe_info[cpu_id]; - hex_dump((void *)info->kvaddr, 128); - hex_dump((void *)(info->kvaddr + (info->buf_size/2)), 128); + if (ctx->mode == HWT_MODE_CPU) { + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + info = &spe_info_cpu[cpu_id]; + printf("CPU %u:\n", cpu_id); + hex_dump((void *)info->kvaddr, 128); + hex_dump((void *)(info->kvaddr + (info->buf_size/2)), 128); + } + } else { + TAILQ_FOREACH(thr, &ctx->threads, next) { + info = (struct arm_spe_info *)thr->private; + printf("TID %u:\n", thr->thread_id); + hex_dump((void *)info->kvaddr, 128); + hex_dump((void *)(info->kvaddr + (info->buf_size/2)), 128); + } } #endif - if (ctx->state == CTX_STATE_RUNNING) { - spe_backend_disable_smp(ctx); - ctx->state = CTX_STATE_STOPPED; - } + spe_backend_disable_smp(ctx); + + if (ctx->mode == HWT_MODE_CPU) + free(spe_info_cpu, M_ARM_SPE); free(spe_info, M_ARM_SPE); @@ -279,14 +294,31 @@ arm_spe_set_interval(struct arm_spe_info *info, uint64_t interval) } static int -spe_backend_configure(struct hwt_context *ctx, int cpu_id, int session_id) +spe_backend_configure(struct hwt_context *ctx, int cpu_id, int thread_id) { - struct arm_spe_info *info = &spe_info[cpu_id]; + struct arm_spe_info *info = NULL; struct arm_spe_config *cfg; + struct hwt_thread *thr = NULL; int err = 0; + if (ctx->mode == HWT_MODE_CPU) + info = &spe_info_cpu[cpu_id]; + else { + TAILQ_FOREACH(thr, &ctx->threads, next) { + if (thr->thread_id != thread_id) + continue; + info = (struct arm_spe_info *)thr->private; + break; + } + if (info == NULL) + return (ENOENT); + } + mtx_lock_spin(&info->lock); - info->ident = cpu_id; + if (ctx->mode == HWT_MODE_CPU) + info->ident = cpu_id; + else + info->ident = thread_id; /* Set defaults */ info->pmsfcr = 0; info->pmsevfr = 0xFFFFFFFFFFFFFFFFUL; @@ -311,6 +343,13 @@ spe_backend_configure(struct hwt_context *ctx, int cpu_id, int session_id) info->ctx_field = cfg->ctx_field; } else err = (EINVAL); + + if (ctx->mode == HWT_MODE_THREAD) { + info->kvaddr = thr->vm->kvaddr; + info->buf_size = ctx->bufsize; + } + + spe_info[cpu_id] = info; mtx_unlock_spin(&info->lock); return (err); @@ -320,13 +359,20 @@ spe_backend_configure(struct hwt_context *ctx, int cpu_id, int session_id) static void arm_spe_enable(void *arg __unused) { - struct arm_spe_info *info = &spe_info[PCPU_GET(cpuid)]; + struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; + struct arm_spe_buf_info *buf = &info->buf_info[info->buf_idx]; + struct hwt_context *ctx = info->sc->ctx; uint64_t base, limit; dprintf("%s on cpu:%d\n", __func__, PCPU_GET(cpuid)); mtx_lock_spin(&info->lock); + if (info->stopped) { + mtx_unlock_spin(&info->lock); + return; + } + if (info->ctx_field == ARM_SPE_CTX_CPU_ID) WRITE_SPECIALREG(CONTEXTIDR_EL1_REG, PCPU_GET(cpuid)); @@ -342,13 +388,19 @@ arm_spe_enable(void *arg __unused) WRITE_SPECIALREG(PMSICR_EL1_REG, info->pmsicr); isb(); - base = info->kvaddr; + base = buf_start_addr(info->buf_idx, info); limit = base + (info->buf_size/2); /* Enable the buffer */ limit &= PMBLIMITR_LIMIT_MASK; /* Zero lower 12 bits */ limit |= PMBLIMITR_E; - /* Set the base and limit */ - WRITE_SPECIALREG(PMBPTR_EL1_REG, base); + /* Set the base and limit. Restore base pointer if sampling has previously + * been enabled for this thread. + */ + if (buf->pmbptr == 0) { + WRITE_SPECIALREG(PMBPTR_EL1_REG, base); + } else { + WRITE_SPECIALREG(PMBPTR_EL1_REG, buf->pmbptr); + } WRITE_SPECIALREG(PMBLIMITR_EL1_REG, limit); isb(); @@ -358,6 +410,9 @@ arm_spe_enable(void *arg __unused) info->enabled = true; + if (ctx->mode == HWT_MODE_THREAD) + CPU_SET(PCPU_GET(cpuid), &ctx->cpu_map); + mtx_unlock_spin(&info->lock); } @@ -368,11 +423,13 @@ spe_backend_enable_smp(struct hwt_context *ctx) struct hwt_vm *vm; int cpu_id; + KASSERT(ctx->mode == HWT_MODE_CPU, ("%s: should only be called for CPU mode", __func__)); + HWT_CTX_LOCK(ctx); CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { vm = hwt_cpu_get(ctx, cpu_id)->vm; - - info = &spe_info[cpu_id]; + KASSERT(spe_info[cpu_id] == &spe_info_cpu[cpu_id], ("%s: spe_info mismatch for cpu_id=%u", __func__, cpu_id)); + info = &spe_info_cpu[cpu_id]; mtx_lock_spin(&info->lock); info->kvaddr = vm->kvaddr; @@ -382,7 +439,8 @@ spe_backend_enable_smp(struct hwt_context *ctx) HWT_CTX_UNLOCK(ctx); cpu_id = CPU_FFS(&ctx->cpu_map) - 1; - info = &spe_info[cpu_id]; + KASSERT(spe_info[cpu_id] == &spe_info_cpu[cpu_id], ("%s: spe_info mismatch for cpu_id=%u", __func__, cpu_id)); + info = spe_info[cpu_id]; if (info->ctx_field == ARM_SPE_CTX_PID) arm64_pid_in_contextidr = true; else @@ -394,11 +452,12 @@ spe_backend_enable_smp(struct hwt_context *ctx) return (0); } -void -arm_spe_disable(void *arg __unused) +static void +arm_spe_disable_nolock(void) { - struct arm_spe_info *info = &spe_info[PCPU_GET(cpuid)]; + struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; struct arm_spe_buf_info *buf = &info->buf_info[info->buf_idx]; + struct hwt_context *ctx = info->sc->ctx; if (!info->enabled) return; @@ -423,9 +482,20 @@ arm_spe_disable(void *arg __unused) /* Clear PID/CPU_ID from context ID reg */ WRITE_SPECIALREG(CONTEXTIDR_EL1_REG, 0); - mtx_lock_spin(&info->lock); buf->pmbptr = READ_SPECIALREG(PMBPTR_EL1_REG); info->enabled = false; + + if (ctx->mode == HWT_MODE_THREAD) + CPU_CLR(PCPU_GET(cpuid), &ctx->cpu_map); +} + +void +arm_spe_disable(void *arg __unused) +{ + struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; + + mtx_lock_spin(&info->lock); + arm_spe_disable_nolock(); mtx_unlock_spin(&info->lock); } @@ -438,14 +508,16 @@ spe_backend_disable_smp(struct hwt_context *ctx) int cpu_id; int ret; - /* Disable and send out remaining data in bufs */ - smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, - arm_spe_disable, smp_no_rendezvous_barrier, NULL); + if (!CPU_EMPTY(&ctx->cpu_map)) { + /* Disable and send out remaining data in bufs */ + smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, + arm_spe_disable, smp_no_rendezvous_barrier, NULL); - CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { - info = &spe_info[cpu_id]; - buf = &info->buf_info[info->buf_idx]; - arm_spe_send_buffer(buf, 0); + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + info = spe_info[cpu_id]; + buf = &info->buf_info[info->buf_idx]; + arm_spe_send_buffer(buf, 0); + } } arm64_pid_in_contextidr = false; @@ -462,16 +534,97 @@ spe_backend_disable_smp(struct hwt_context *ctx) return (0); } +static void +spe_backend_enable(struct hwt_context *ctx, int cpu_id) +{ + struct arm_spe_info *info; + + if (ctx->mode == HWT_MODE_CPU) + return; + KASSERT(curcpu == cpu_id, ("%s: attempting to enable SPE on another cpu", __func__)); + + info = spe_info[cpu_id]; + + KASSERT(info != NULL, ("%s: info=NULL", __func__)); + + if (info->ctx_field == ARM_SPE_CTX_PID) + arm64_pid_in_contextidr = true; + else + arm64_pid_in_contextidr = false; + + arm_spe_enable(NULL); +} + +static void +spe_backend_disable(struct hwt_context *ctx, int cpu_id) +{ + struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; + + if (ctx->mode == HWT_MODE_CPU) + return; + + KASSERT(curcpu == cpu_id, ("%s: attempting to disable SPE on another cpu", __func__)); + + mtx_lock_spin(&info->lock); + + if (!info->stopped) + arm_spe_disable_nolock(); + + mtx_unlock_spin(&info->lock); +} + +static void +arm_spe_flush(void *arg, int pending __unused) +{ + struct arm_spe_info *info = arg; + struct arm_spe_buf_info *buf = &info->buf_info[info->buf_idx]; + + arm_spe_send_buffer(buf, 0); +} + static void spe_backend_stop(struct hwt_context *ctx) { + struct arm_spe_info *info; + struct hwt_thread *thr; + + HWT_CTX_LOCK(ctx); + + if (ctx->mode == HWT_MODE_THREAD) { + ctx->state = CTX_STATE_STOPPED; + + TAILQ_FOREACH(thr, &ctx->threads, next) { + info = (struct arm_spe_info *)thr->private; + + mtx_lock_spin(&info->lock); + + info->stopped = true; + + if (!info->enabled) { + /* Not currently tracing. Enqueue buffer for sending */ + TASK_INIT(&info->flush_task, 0, (task_fn_t *)arm_spe_flush, info); + taskqueue_enqueue(taskqueue_arm_spe, &info->flush_task); + } + /* Otherwise tracing currently active. As this thread has been + * marked as stopped, buffer will be sent on next disable + */ + + mtx_unlock_spin(&info->lock); + } + + } + + HWT_CTX_UNLOCK(ctx); + + taskqueue_drain_all(taskqueue_arm_spe); + spe_backend_disable_smp(ctx); } static void arm_spe_reenable(void *arg __unused) { - struct arm_spe_info *info = &spe_info[PCPU_GET(cpuid)];; + struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; WRITE_SPECIALREG(PMSCR_EL1_REG, info->pmscr); isb(); @@ -481,9 +634,10 @@ static int spe_backend_svc_buf(struct hwt_context *ctx, void *data, size_t data_size, int data_version) { - struct arm_spe_info *info; + struct arm_spe_info *info = NULL; struct arm_spe_buf_info *buf; struct arm_spe_svc_buf *s; + struct hwt_thread *thr; int err = 0; cpuset_t cpu_set; @@ -496,15 +650,29 @@ spe_backend_svc_buf(struct hwt_context *ctx, void *data, size_t data_size, s = (struct arm_spe_svc_buf *)data; if (s->buf_idx > 1) return (ENODEV); - if (s->ident >= mp_ncpus) - return (EINVAL); - info = &spe_info[s->ident]; + if (ctx->mode == HWT_MODE_CPU) { + if (s->ident >= mp_ncpus) + return (EINVAL); + + info = spe_info[s->ident]; + } else { + TAILQ_FOREACH(thr, &ctx->threads, next) { + if (thr->thread_id != s->ident) + continue; + info = (struct arm_spe_info *)thr->private; + break; + } + + if (info == NULL) + return (ENOENT); + } + mtx_lock_spin(&info->lock); buf = &info->buf_info[s->buf_idx]; - if (!info->enabled) { + if (!info->enabled && ctx->mode == HWT_MODE_CPU) { err = ENXIO; goto end; } @@ -513,7 +681,7 @@ spe_backend_svc_buf(struct hwt_context *ctx, void *data, size_t data_size, buf->buf_svc = false; /* Re-enable profiling if we've been waiting for this notification */ - if (buf->buf_wait) { + if (buf->buf_wait && !info->stopped) { CPU_SETOF(s->ident, &cpu_set); mtx_unlock_spin(&info->lock); @@ -563,6 +731,38 @@ error: return (0); } +static int +spe_backend_thread_alloc(struct hwt_thread *thr) +{ + struct arm_spe_softc *sc = device_get_softc(spe_dev); + char lock_name[32]; + struct arm_spe_info *info; + + info = malloc(sizeof(*info), M_ARM_SPE, M_WAITOK | M_ZERO); + + info->sc = sc; + info->buf_info[0].info = info; + info->buf_info[0].buf_idx = 0; + info->buf_info[1].info = info; + info->buf_info[1].buf_idx = 1; + snprintf(lock_name, sizeof(lock_name), "Arm SPE lock/thr/%d", thr->thread_id); + mtx_init(&info->lock, lock_name, NULL, MTX_SPIN); + + thr->private = info; + + return (0); +} + +static void +spe_backend_thread_free(struct hwt_thread *thr) +{ + struct arm_spe_info *info; + + info = (struct arm_spe_info *)thr->private; + + free(info, M_ARM_SPE); +} + static struct hwt_backend_ops spe_ops = { .hwt_backend_init = spe_backend_init, .hwt_backend_deinit = spe_backend_deinit, @@ -571,10 +771,16 @@ static struct hwt_backend_ops spe_ops = { .hwt_backend_svc_buf = spe_backend_svc_buf, .hwt_backend_stop = spe_backend_stop, + .hwt_backend_enable = spe_backend_enable, + .hwt_backend_disable = spe_backend_disable, + .hwt_backend_enable_smp = spe_backend_enable_smp, .hwt_backend_disable_smp = spe_backend_disable_smp, .hwt_backend_read = spe_backend_read, + + .hwt_backend_thread_alloc = spe_backend_thread_alloc, + .hwt_backend_thread_free = spe_backend_thread_free, }; int diff --git a/sys/arm64/spe/arm_spe_dev.c b/sys/arm64/spe/arm_spe_dev.c index 8a834197eeef..61c0b5cc16c4 100644 --- a/sys/arm64/spe/arm_spe_dev.c +++ b/sys/arm64/spe/arm_spe_dev.c @@ -131,7 +131,7 @@ arm_spe_intr(void *arg) uint64_t pmbsr; uint64_t base, limit; uint8_t ec; - struct arm_spe_info *info = &sc->spe_info[cpu_id]; + struct arm_spe_info *info = sc->spe_info[cpu_id]; uint8_t i = info->buf_idx; struct arm_spe_buf_info *buf = &info->buf_info[i]; struct arm_spe_buf_info *prev_buf = &info->buf_info[!i]; @@ -311,8 +311,9 @@ arm_spe_error(void *arg, int pending __unused) struct kevent kev; int ret; - smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, - arm_spe_disable, smp_no_rendezvous_barrier, NULL); + if (!CPU_EMPTY(&ctx->cpu_map)) + smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, + arm_spe_disable, smp_no_rendezvous_barrier, NULL); EV_SET(&kev, ARM_SPE_KQ_SHUTDOWN, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL); ret = kqfd_register(ctx->kqueue_fd, &kev, ctx->hwt_td, M_WAITOK); diff --git a/sys/arm64/spe/arm_spe_dev.h b/sys/arm64/spe/arm_spe_dev.h index df88d98ef1c0..ed1727b5b090 100644 --- a/sys/arm64/spe/arm_spe_dev.h +++ b/sys/arm64/spe/arm_spe_dev.h @@ -80,7 +80,7 @@ struct arm_spe_softc { int64_t sc_pmsidr; int kqueue_fd; struct thread *hwt_td; - struct arm_spe_info *spe_info; + struct arm_spe_info **spe_info; struct hwt_context *ctx; STAILQ_HEAD(, arm_spe_queue) pending; uint64_t npending; @@ -105,7 +105,9 @@ struct arm_spe_info { struct mtx lock; struct arm_spe_softc *sc; struct task task[2]; + struct task flush_task; bool enabled : 1; + bool stopped : 1; /* buffer is split in half as a ping-pong buffer */ vm_object_t bufobj; From nobody Tue Jan 6 11:04:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlpG64ymTz6NV9N for ; Tue, 06 Jan 2026 11:04: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlpG63b0yz49FN for ; Tue, 06 Jan 2026 11:04:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767697470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv4HxZbvGZ+29kZK3gT6a9WCKom+feYnTNQ0j8FkUko=; b=Ft7KrkYLLu7/GU/BE2sOlpeTHKNLkthjCG9t0tLPrdVXYFI+Smyq0CvoLQ+G5dnNUI43pC xmx7gm+cTfKyzQatAeZgmuaved6r0z+XRXpevSA04S+hIruan6On08/+53G73rS6qF9gO4 /3FMGHADoM0V08jIYYiqFRKt8m3ZZrERuJ8kXU/uJEYHPXu/LS4H2RQp/aZrtcoNToryj9 xmJuUnM+ff8LKksdK0BZzO8M94MeKuX2zmP2xJVPIawdj27BZmigswXipRtcK56/YUCNAO x8Tt2R0uEhtXcEzAwdGn5qbRxKKhFGXzIQR5o8yNVK/Mn6xtTKJrma3IVPLcxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767697470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv4HxZbvGZ+29kZK3gT6a9WCKom+feYnTNQ0j8FkUko=; b=USzJd2Vbim98tyT2Qz/mDi8sQEk2MofzJTNqHAXT8ltSAesiU12UOc1c+F5aX4P1TYJSUf TYIufoO/vIeCjiDT3LTuyDEDEsFxg8bOKz2nJIYsgEmK8mjO9ffMHQ2DQnyZ2gfQy98OhW tk2af7GxPlAqmUJMahGmgkE6v7GT/GXqpav/0T+h1HdPq3QYAUPMMOjJKDNIi4fC0HLmZ5 PJ2InS06XqfX99Jl1zx/oO5blOuRMuiQHEgmegqWFh3NzmUVPRTLsZY8Gx7NXnYNznjQBB G02rW7I+oYfgqEEfGhxOifS72qs7Kfa4up55BtLudRb0j2a6a1P5abiic8z/xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767697470; a=rsa-sha256; cv=none; b=C1ZOM748jZrXkloi6qd2l+d5ft/smfgFBb10PcNrR58sgeA6t6t98apYXDnQCjWERBY8My eudVZIzbPwQfYSnjJtQbP5ba5xQh0e6nziXFr6vEvnUraPGgpdERSay7ob0rPO/lmRbU+G NqrdU0A0MDI6mzSSs2Q1FbBBPnzLXyrJVuO0B9jbgBM6MEEDNP9U/F+IvwwZQgr2HFk7Yq lQ7mDzpfaADQM6SPJ9a0/Ge8+7yE9KRCZzjEXamQV98y/dBZ9FupE62+rWYMIOcxZkTAP4 YeCLARNfux1f+vieCuHNdLLAPhTwfXBf9d3K+SjdcEeBM7edhGYYKnibNdS4kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlpG63466z13s5 for ; Tue, 06 Jan 2026 11:04:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 306df by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 11:04:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Marian Cingel From: Andrew Turner Subject: git: a9f2f92322f2 - main - arm64: Fix jump to wrong label in case of 0 entries List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a9f2f92322f211921b955b13b088624efe7f901a Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 11:04:30 +0000 Message-Id: <695cec3e.306df.1b01f12c@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f2f92322f211921b955b13b088624efe7f901a commit a9f2f92322f211921b955b13b088624efe7f901a Author: Marian Cingel AuthorDate: 2026-01-03 14:45:27 +0000 Commit: Andrew Turner CommitDate: 2026-01-06 10:36:37 +0000 arm64: Fix jump to wrong label in case of 0 entries Broke qemu-system-aarch6 boot with VIRT kernconf PR: 292156 Fixes: ea8dc498aa8e ("arm64: Create an L3 table to limit permissions") Signed-off-by: Marian Cingel Pull Request: https://github.com/freebsd/freebsd-src/pull/1943 --- sys/arm64/arm64/locore.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index c22d5fe76468..46d3bac576e8 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -997,7 +997,7 @@ LEND(link_l2_pagetable) * VA start (x8) modulo L3C_SIZE must equal PA start (x9) modulo L3C_SIZE. */ LENTRY(build_l3_page_pagetable) - cbz x10, 2f + cbz x10, 4f /* * Build the L3 table entry. */ @@ -1037,7 +1037,7 @@ LENTRY(build_l3_page_pagetable) add x11, x11, #1 add x9, x9, #1 cbnz x10, 1b -2: +4: ret LEND(build_l3_page_pagetable) From nobody Tue Jan 6 11:04:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlpG80Fr2z6NVS4 for ; Tue, 06 Jan 2026 11:04: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlpG74GcQz49cC for ; Tue, 06 Jan 2026 11:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767697471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZHnwN7ekCUzbQDhDaCyJejcS0aeXn4ZTPa4P3/KrdM=; b=mXlU/+rlyiiVrG/rW3nhnsJ0hoVpIVM271YXKT3uVbYM3VdzIg/tN3Oo1lKreWnX/xguky wsait7fLQxI9F7jUw2FEdYDfvVs44wAbCzNFQWJZeB5/lY32OWZ+nJQJbP+FpdvMRBZCMs NU6xbUhzAKojE4J+WsocuwOcFwkzuveRzIizrU6SSxY2nu0YoZde2ylZX2o2oxG9kzeUnx qAdWY9B6bQoDi2ql/gYF+IlyxVk7LFkpZE1UD1NZBBxsBOXt+cBT9+picjmZ0LbzlMmKdd zqy1uFb78A5bfZLFOzTXNV8pI6ahyqfz9Ov8M0QjWsH695BmkcVOKk640Pu87Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767697471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZHnwN7ekCUzbQDhDaCyJejcS0aeXn4ZTPa4P3/KrdM=; b=yh9rABvKVUA15tkCLwauKZO8E8Rk/uvERPVOZ+sE8t8Z5ev+JOSdLiVwIPeas+jOKYFdDe 7QRQ9FskjtL9PGvRs14yQiVuLuhOcVCgd33xBCmQhwEo/QmAFG0em543VcnCrqP8eIJXfI WwI+Hbis7Ukp9U1kZHYk/jG77xDUVHOcSsW4pTr4fjkcgT1YUFmbrxUR2jvdA6hD+YWoux 6aqIF1hzHtSCeaK/LBx2BIe7rCIR0t09mZcI58haCYMprgct07cKnifMPWOUD33Iwd4A1I YgWwSDTXI4HDxV/xx75LAbiNOGERqEOZFFnaMMLlIvij6u1GO49jlBFOQ467mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767697471; a=rsa-sha256; cv=none; b=boEp1361vQk/1UbafmhVURe09rSOHo3ammVeYp6d43Dc/FseAFo0ji46NqfortS4CddFbX j5nM7Pb0X10kqXGKxC1Q3E+XQM7Sjz/zlN9yFYV75j/U4oHbrEqWmZPXwOuKelguNUGAfJ QE6MVlhLsCmGlqhyO7N4wvevcDQ7Th9qLRiC6/wcB7z+fHXYiClwHtsAwd5bgRLZ6PlN8t m5us9DQvgXkayeeLI2uYMoMm7ZeJi38JlLfJNxqivF2UNOR9YwXftswFIYDFn/XJsvJe7p V7GizPbYILml80SuUz16SxVc/j+fHrYM+zchICKTAd0v1nGJceaar1FrBc/4tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlpG73rMlz13nP for ; Tue, 06 Jan 2026 11:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a54 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 11:04:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a9e77eb7016d - main - arm64: Correctly align the SVE signal context List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a9e77eb7016df70723c208fc09fbd01ec23a732d Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 11:04:31 +0000 Message-Id: <695cec3f.31a54.43e19fd1@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a9e77eb7016df70723c208fc09fbd01ec23a732d commit a9e77eb7016df70723c208fc09fbd01ec23a732d Author: Andrew Turner AuthorDate: 2026-01-06 10:35:55 +0000 Commit: Andrew Turner CommitDate: 2026-01-06 10:36:37 +0000 arm64: Correctly align the SVE signal context The SVE signal context needs to be correctly aligned. Fix this by creating a new macro to calculate the needed size to provide this alignment, and use it when setting and checking the saved SVE signal context. Reported by: cperciva Reviewed by: cperciva, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54396 --- sys/arm64/arm64/exec_machdep.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c index 7c50dc93fdb4..207e10ede96c 100644 --- a/sys/arm64/arm64/exec_machdep.c +++ b/sys/arm64/arm64/exec_machdep.c @@ -60,6 +60,10 @@ #include #endif +#define CTX_SIZE_SVE(buf_size) \ + roundup2(sizeof(struct sve_context) + (buf_size), \ + _Alignof(struct sve_context)) + _Static_assert(sizeof(mcontext_t) == 880, "mcontext_t size incorrect"); _Static_assert(sizeof(ucontext_t) == 960, "ucontext_t size incorrect"); _Static_assert(sizeof(siginfo_t) == 80, "siginfo_t size incorrect"); @@ -585,8 +589,7 @@ set_mcontext(struct thread *td, mcontext_t *mcp) buf_size = sve_buf_size(td); /* Check the size is valid */ - if (ctx.ctx_size != - (sizeof(sve_ctx) + buf_size)) + if (ctx.ctx_size != CTX_SIZE_SVE(buf_size)) return (EINVAL); memset(pcb->pcb_svesaved, 0, @@ -729,7 +732,7 @@ sendsig_ctx_sve(struct thread *td, vm_offset_t *addrp) { struct sve_context ctx; struct pcb *pcb; - size_t buf_size; + size_t buf_size, ctx_size; vm_offset_t ctx_addr; pcb = td->td_pcb; @@ -740,14 +743,15 @@ sendsig_ctx_sve(struct thread *td, vm_offset_t *addrp) MPASS(pcb->pcb_svesaved != NULL); buf_size = sve_buf_size(td); + ctx_size = CTX_SIZE_SVE(buf_size); /* Address for the full context */ - *addrp -= sizeof(ctx) + buf_size; + *addrp -= ctx_size; ctx_addr = *addrp; memset(&ctx, 0, sizeof(ctx)); ctx.sve_ctx.ctx_id = ARM64_CTX_SVE; - ctx.sve_ctx.ctx_size = sizeof(ctx) + buf_size; + ctx.sve_ctx.ctx_size = ctx_size; ctx.sve_vector_len = pcb->pcb_sve_len; ctx.sve_flags = 0; From nobody Tue Jan 6 12:04:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlqbW05Nkz6NY6x; Tue, 06 Jan 2026 12:04:39 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int-backup.realworks.nl (smtp-relay-int-backup.realworks.nl [87.255.56.188]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlqbV4nHkz3Hjf; Tue, 06 Jan 2026 12:04:38 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Authentication-Results: mx1.freebsd.org; none Received: from smtp-relay-int-backup.realworks.nl (crmpreview1.colo2.realworks.nl [10.2.52.31]) by mailrelayint1.colo2.realworks.nl (Postfix) with ESMTP id 4dlqbM2W96z1PW; Tue, 6 Jan 2026 13:04:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1767701071; 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=BqvwAh55g7mHUWbivVWNn2lRC58mfrANMqDkNV2oE/8=; b=ZsNeRWEn2mxqnXjC2XTDtJOG1MdlA0YRSJpSY+jzfwEx6InKlszJZM5Scku/FufDHTlLyg 0gzzkGq2s9TsdCpwAg3LOxf7uM8bFKay13a7XDsIQSUJCuzIIftso+9wKKVcWKesYOTFij xCZPsL4ySkzeLJ4PzMdk+6E8mMdu2AQSvo0Qiyk/2/y+XKsT879M72+5dyTW9fgJB35W5O BHDtZTqllgWBtbyZP+oIYFAZQHIoqnXGs7Oab5XyZup8KyHA6sapkn+OmNAMrDY3JsTUyQ wKsFxkKbkgUVqW4HBxj6Km4L739vUFtU0frBN9Kfo5D9uOzsNJKCTvt//xP9xA== Received: from crmpreview1.colo2.realworks.nl (localhost [127.0.0.1]) by crmpreview1.colo2.realworks.nl (Postfix) with ESMTP id 43AC0402D1; Tue, 6 Jan 2026 13:04:31 +0100 (CET) Date: Tue, 6 Jan 2026 13:04:31 +0100 (CET) From: Ronald Klop To: Andrew Turner Cc: dev-commits-src-all@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <64525372.1244.1767701071189@localhost> In-Reply-To: <695cec3f.31a54.43e19fd1@gitrepo.freebsd.org> References: <695cec3f.31a54.43e19fd1@gitrepo.freebsd.org> Subject: Re: git: a9e77eb7016d - main - arm64: Correctly align the SVE signal context List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1243_575415837.1767701070865" X-Mailer: Realworks (778.34) X-Originating-Host: from (83-81-212-149.cable.dynamic.v4.ziggo.nl [83.81.212.149]) by crmpreview1.colo2.realworks.nl [10.2.52.31] with HTTP; Tue, 06 Jan 2026 13:04:31 +0100 Importance: Normal X-Priority: 3 (Normal) X-Originating-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:38930, ipnet:87.255.32.0/19, country:NL] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dlqbV4nHkz3Hjf ------=_Part_1243_575415837.1767701070865 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi. Can this be related to this issue? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292195 "arm64: panic on coredump with sve instructions" Regards, Ronald. Van: Andrew Turner Datum: dinsdag, 6 januari 2026 12:04 Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Onderwerp: git: a9e77eb7016d - main - arm64: Correctly align the SVE signal context > > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a9e77eb7016df70723c208fc09fbd01ec23a732d > > commit a9e77eb7016df70723c208fc09fbd01ec23a732d > Author: Andrew Turner > AuthorDate: 2026-01-06 10:35:55 +0000 > Commit: Andrew Turner > CommitDate: 2026-01-06 10:36:37 +0000 > > arm64: Correctly align the SVE signal context > > The SVE signal context needs to be correctly aligned. Fix this by > creating a new macro to calculate the needed size to provide this > alignment, and use it when setting and checking the saved SVE signal > context. > > Reported by: cperciva > Reviewed by: cperciva, markj > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D54396 > --- > sys/arm64/arm64/exec_machdep.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c > index 7c50dc93fdb4..207e10ede96c 100644 > --- a/sys/arm64/arm64/exec_machdep.c > +++ b/sys/arm64/arm64/exec_machdep.c > @@ -60,6 +60,10 @@ > #include > #endif > > +#define CTX_SIZE_SVE(buf_size) \ > + roundup2(sizeof(struct sve_context) + (buf_size), \ > + _Alignof(struct sve_context)) > + > _Static_assert(sizeof(mcontext_t) == 880, "mcontext_t size incorrect"); > _Static_assert(sizeof(ucontext_t) == 960, "ucontext_t size incorrect"); > _Static_assert(sizeof(siginfo_t) == 80, "siginfo_t size incorrect"); > @@ -585,8 +589,7 @@ set_mcontext(struct thread *td, mcontext_t *mcp) > > buf_size = sve_buf_size(td); > /* Check the size is valid */ > - if (ctx.ctx_size != > - (sizeof(sve_ctx) + buf_size)) > + if (ctx.ctx_size != CTX_SIZE_SVE(buf_size)) > return (EINVAL); > > memset(pcb->pcb_svesaved, 0, > @@ -729,7 +732,7 @@ sendsig_ctx_sve(struct thread *td, vm_offset_t *addrp) > { > struct sve_context ctx; > struct pcb *pcb; > - size_t buf_size; > + size_t buf_size, ctx_size; > vm_offset_t ctx_addr; > > pcb = td->td_pcb; > @@ -740,14 +743,15 @@ sendsig_ctx_sve(struct thread *td, vm_offset_t *addrp) > MPASS(pcb->pcb_svesaved != NULL); > > buf_size = sve_buf_size(td); > + ctx_size = CTX_SIZE_SVE(buf_size); > > /* Address for the full context */ > - *addrp -= sizeof(ctx) + buf_size; > + *addrp -= ctx_size; > ctx_addr = *addrp; > > memset(&ctx, 0, sizeof(ctx)); > ctx.sve_ctx.ctx_id = ARM64_CTX_SVE; > - ctx.sve_ctx.ctx_size = sizeof(ctx) + buf_size; > + ctx.sve_ctx.ctx_size = ctx_size; > ctx.sve_vector_len = pcb->pcb_sve_len; > ctx.sve_flags = 0; > > > > > ------=_Part_1243_575415837.1767701070865 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi.

Can this be related to this issue?

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292195
"arm64: panic on coredump with sve instructions"

Regards,
Ronald.

 

Van: Andrew Turner <andrew@FreeBSD.org>
Datum: dinsdag, 6 januari 2026 12:04
Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Onderwerp: git: a9e77eb7016d - main - arm64: Correctly align the SVE signal context

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=a9e77eb7016df70723c208fc09fbd01ec23a732d

commit a9e77eb7016df70723c208fc09fbd01ec23a732d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2026-01-06 10:35:55 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-01-06 10:36:37 +0000

    arm64: Correctly align the SVE signal context
    
    The SVE signal context needs to be correctly aligned. Fix this by
    creating a new macro to calculate the needed size to provide this
    alignment, and use it when setting and checking the saved SVE signal
    context.
    
    Reported by:    cperciva
    Reviewed by:    cperciva, markj
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D54396
---
 sys/arm64/arm64/exec_machdep.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c
index 7c50dc93fdb4..207e10ede96c 100644
--- a/sys/arm64/arm64/exec_machdep.c
+++ b/sys/arm64/arm64/exec_machdep.c
@@ -60,6 +60,10 @@
 #include <machine/vfp.h>
 #endif
 
+#define    CTX_SIZE_SVE(buf_size)                  \
+    roundup2(sizeof(struct sve_context) + (buf_size),      \
+      _Alignof(struct sve_context))
+
 _Static_assert(sizeof(mcontext_t) == 880, "mcontext_t size incorrect");
 _Static_assert(sizeof(ucontext_t) == 960, "ucontext_t size incorrect");
 _Static_assert(sizeof(siginfo_t) == 80, "siginfo_t size incorrect");
@@ -585,8 +589,7 @@ set_mcontext(struct thread *td, mcontext_t *mcp)
 
                buf_size = sve_buf_size(td);
                /* Check the size is valid */
-               if (ctx.ctx_size !=
-                   (sizeof(sve_ctx) + buf_size))
+               if (ctx.ctx_size != CTX_SIZE_SVE(buf_size))
                    return (EINVAL);
 
                memset(pcb->pcb_svesaved, 0,
@@ -729,7 +732,7 @@ sendsig_ctx_sve(struct thread *td, vm_offset_t *addrp)
 {
    struct sve_context ctx;
    struct pcb *pcb;
-   size_t buf_size;
+   size_t buf_size, ctx_size;
    vm_offset_t ctx_addr;
 
    pcb = td->td_pcb;
@@ -740,14 +743,15 @@ sendsig_ctx_sve(struct thread *td, vm_offset_t *addrp)
    MPASS(pcb->pcb_svesaved != NULL);
 
    buf_size = sve_buf_size(td);
+   ctx_size = CTX_SIZE_SVE(buf_size);
 
    /* Address for the full context */
-   *addrp -= sizeof(ctx) + buf_size;
+   *addrp -= ctx_size;
    ctx_addr = *addrp;
 
    memset(&ctx, 0, sizeof(ctx));
    ctx.sve_ctx.ctx_id = ARM64_CTX_SVE;
-   ctx.sve_ctx.ctx_size = sizeof(ctx) + buf_size;
+   ctx.sve_ctx.ctx_size = ctx_size;
    ctx.sve_vector_len = pcb->pcb_sve_len;
    ctx.sve_flags = 0;
 
 


  ------=_Part_1243_575415837.1767701070865-- From nobody Tue Jan 6 14:37:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dltzY2nZgz6Nj0r; Tue, 06 Jan 2026 14:37:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dltzY28mpz3gZC; Tue, 06 Jan 2026 14:37:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767710233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mjscDEStg6g2hFcSqY+4ObZWkRtFj7lNViW1m0Dtxlk=; b=JVtE/22Ps2CifQOgpHCT4SAbHb7RndRdkf0LQnnqnVLqt3IfTyEQB7QzRsplPcSCgBP/IN NfTpCf/G0GgYtyeckykDeKJfGB28oIsJWmGNwmXxFe/9IyXd95G/3sBdeuagHyBkXbgkO6 0u/rKYiSOsDT2S5he9gD2DYwNccDp6rlf0GXBnVfDglshP7rheVwwdcmxzMbt1p3zi6tuy hRHTUsfJ+wMyYti4HvmeOWbmfMHBGW7w1mCebsFGM3Jh7bFD1P1jWESMJSP7roF/WzC9ip AdIkFb6QILu5ynAyko3xpY6+XsiRBBX/5z2s3et566ETh8+67xpJOwVa3zIP9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767710233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mjscDEStg6g2hFcSqY+4ObZWkRtFj7lNViW1m0Dtxlk=; b=nL0RHLvHPkHJ+j/r3TaRh3CSmFZ/J56+w87YASS2sGkHLFpyuoHO7hAzlmbZ+j6ba31KN6 NudIOOt10qrQska+4EblRhiC+4ZXKmpQhNjXka//g7YzBDPfojVIAdNFLUtqPsnPkEuqfZ ex5yzuEt455nS6etNG16sTeql6H4ZFv5FYQ7Ejfe8OqvIy4G1xHKCC2ea7jT7Bfa47Gc6w a+xcHPVR5acftX2HtsSGj++GeRVZ54t/YXIbnujEt/9OwkEz7dBmqMyOI6+E+bux1CL/M+ 1mN0T8myhcILoVZuEBDvQpD+ARQsQNfsv658ZNdqKhmRJggZICLeKmmkrNNX8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767710233; a=rsa-sha256; cv=none; b=IDQ7Zo3PLIgTYWgLRvIuvKyPxs2AuJtSZLZCtX5zl+Sy1iZAsYo4eg6SO13NOQxBjsJbxj CFrJ/Qydop5EAhvrKI4XvEjUQxHHegjJCgTYOz/Bg5n4eIwmkLe8qI86BHcSplAaRWtPt1 uLa6F1qVvXOzdaBjg5TgVhGHxm44ZZz4AxcQWUmqxpXDyKSU8pONjBWGxK2eS7Z7Uw/ZiG 9ReTpqnowk5Wg+S3eMEddkZ6jUz8xo8szcJ9BXqMH020YTs4etCZSmrJzAq0JTsciDI/Cc fsD4GePtIrirPi8qEesx15gySrtsEhXyE9D0SwtFmRNlF7aO5T0qsPGTXEgh8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [172.20.6.23] (unknown [12.195.162.27]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dltzY0NhHzwDT; Tue, 06 Jan 2026 14:37:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 6 Jan 2026 08:37:12 -0600 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 27894e20f140 - main - libgeom: Fix segfault in 32-on-64 case Content-Language: en-US To: =?UTF-8?Q?Dag-Erling_Sm=C3=B8rg_rav?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6958dd10.b4b9.2aebecda@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <6958dd10.b4b9.2aebecda@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/3/26 04:10, Dag-Erling Smørg rav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=27894e20f140ee2729c14b589035870c8185b87d > > commit 27894e20f140ee2729c14b589035870c8185b87d > Author: Dag-Erling Smørgrav > AuthorDate: 2026-01-03 09:09:51 +0000 > Commit: Dag-Erling Smørgrav > CommitDate: 2026-01-03 09:10:23 +0000 > > libgeom: Fix segfault in 32-on-64 case > > We were using strtoul() to parse object identifiers, which are kernel > pointers. This works fine as long as the kernel and userland match, > but in a 32-bit libgeom on a 64-bit kernel this will return ULONG_MAX > for all objects, resulting in memory corruption when we later pick the > wrong object while resolving consumer-producer references. > > MFC after: 1 week > PR: 292127 > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D54452 > --- > lib/libgeom/geom_xml2tree.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c > index 2d2c43e29e77..161425d9fadf 100644 > --- a/lib/libgeom/geom_xml2tree.c > +++ b/lib/libgeom/geom_xml2tree.c > @@ -76,10 +76,10 @@ StartElement(void *userData, const char *name, const char **attr) > ref = NULL; > for (i = 0; attr[i] != NULL; i += 2) { > if (!strcmp(attr[i], "id")) { > - id = (void *)strtoul(attr[i + 1], NULL, 0); > + id = (void *)strtoumax(attr[i + 1], NULL, 0); > mt->nident++; > } else if (!strcmp(attr[i], "ref")) { > - ref = (void *)strtoul(attr[i + 1], NULL, 0); > + ref = (void *)strtoumax(attr[i + 1], NULL, 0); Should we perhaps not use pointers to hold the cookies? This is going to truncate in the lib32 case which will probably still work in practice as the low 32 bits of kernel object addresses are probably unique, but isn't foolproof. Perhaps the cookie values should be stored as either kvaddr_t values, or uintmax_t? -- John Baldwin From nobody Tue Jan 6 14:40:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlv3H6FPxz6Nhxk; Tue, 06 Jan 2026 14:40:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlv3H5l9xz3h1X; Tue, 06 Jan 2026 14:40:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767710427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=49mrQomRWg0kyRZ/J824/keZ64INa/9HtOPW/AAH9co=; b=t+rdklFh/xzn8SvIzJ5oBWgpxjqDc1QhbhU/hCo5ZcZ0iOKDML0DLWCUQOm/XZnfomTlQ3 MXUSNV3VHjXEuPbjqdUr2viAZAhMopUgEAOPQJbVK+8DsRyQ7rtjYH6vBOFJQlh24nwVCE 3G4YWm3wrm6rjvWEEFfe8+C7kJoTdmNBw25VniDgZ8wv9Uu1GChATmKAWdPsq/yDqurhDz N9ZZeU1uJ+4IXcMWWstUYHaTrMm8bm4gBihDXBOMxg0wt4dVYQPzHzCPpo9M1sQ35WVcP6 Q2xRi6l+OZaKwzn8GPDPhVrK+tW0k6U+55yC10GW0ESfvod02xJyhWGOMoD5gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767710427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=49mrQomRWg0kyRZ/J824/keZ64INa/9HtOPW/AAH9co=; b=rLInQD7NmTYlbmEAQmZLDBth7eX4fC0g/48gMz8k7eYPlCx7o+FkkCiPEWX7PRtEXW7THu EnDkxx2r5ctxKzTcTUqS7EtHXdr8XQCZMST2tlltnmeIUTeTqrgtp+8x8t/nOzf1SAPbq1 lKiIVEoDU5PIgoKsQPhM0uZAr+8HC9FXy4NeFCcjMAKiqyI3oY2qvQ5HFvRCpzNqZr9/JD cgomEDiwV66fSOn5PiCZ3kSw/CGYBiRva+fbvDc5UMbrVbjSmd0SYH0X7SQUxTLEkbaERe iTxLW3LnKpu/fT/EmenVU8rW2ffI5JyYvDMLbrpcAidWdLffBlpc2cmJ5vYatQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767710427; a=rsa-sha256; cv=none; b=SSxW8aeanEofDNWmWnx1wwCr+uN5aGL95fHGn+N3arxmypf6lrFhgV54B0wZdCTzxIg2/r 1ZDlXiQy3cNHVHozyrthS1KZsmaU70DU9z2QrKi3dWN6jmW/eNvbCh+lwDWlO7pt3QKRBQ 1V95u0mZv7s62FN3RO3yOWBdS+pc+C+FPnXagsE7v50G9Nu6yE/WBC9/JflyAGHB6SIdhC 4Ea9c9kNmTAXtJ3F41mSSwalaEkhoSgI2bBdkRRC/OLZBFh41StaZfrvw01yzln/l+hNiy cwzckWoCX7G3+4IMNaFF+EdSF2c5ezoRiuF4e97NBAyh+IXRDhakJwEpB4BUVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [172.20.6.23] (unknown [12.195.162.27]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dlv3H3Zz7zvPf; Tue, 06 Jan 2026 14:40:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <7ab91330-8dab-44d2-b00a-385cf61d479e@FreeBSD.org> Date: Tue, 6 Jan 2026 08:40:27 -0600 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 89c017d06870 - main - Makefile.inc1: Allow safe installkernel with pkgbase Content-Language: en-US To: Lexi Winter , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <695bfbeb.32a44.fb6c48b@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <695bfbeb.32a44.fb6c48b@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/5/26 12:59, Lexi Winter wrote: > The branch main has been updated by ivy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=89c017d068704c2bc3da9cb22f43da17a9ce8c24 > > commit 89c017d068704c2bc3da9cb22f43da17a9ce8c24 > Author: Lexi Winter > AuthorDate: 2026-01-05 17:39:47 +0000 > Commit: Lexi Winter > CommitDate: 2026-01-05 17:39:47 +0000 > > Makefile.inc1: Allow safe installkernel with pkgbase > > Commit 74a6bb524e5b added a check to install{world,kernel} to avoid > people accidentally running this on pkgbase systems and leaving their > system broken. This had two issues: > > (1) The warning was not sufficiently scary, leading people to think > this was safe to do as long as they set DESTDIR=/. > > (2) The installkernel check was too strict, and prevented installing > kernels that don't conflict with packaged kernels. > > Fix (1) by rewording the warning to be scarier, and while here, add > two new variables (ALLOW_PKGBASE_INSTALL{WORLD,KERNEL}) which could > be set in /etc/make.conf for people who want to break their systems > by default. > > Fix (2) by improving the installkernel check to see if the kernel(s) > we're actually installing are packaged. This means a new kernel can > be installed to /boot/kernel as long as there's no packaged kernel > installed there. This check understands INSTKERNNAME, so if there > is a packaged kernel in /boot/kernel, the new kernel can still be > installed using INSTKERNNAME=testkernel (or whatever). > > MFC after: 2 weeks > Reported by: christos, jhb, others > Reviewed by: emaste, christos (previous version) > Sponsored by: https://www.patreon.com/bsdivy > Differential Revision: https://reviews.freebsd.org/D54346 Thanks! -- John Baldwin From nobody Tue Jan 6 14:53:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlvLK0Wl3z6Nk6d for ; Tue, 06 Jan 2026 14:53: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlvLJ5vKDz3jxr for ; Tue, 06 Jan 2026 14:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767711208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M12m6BaN1C1TQeum1d2+8Hj8QN2ehYmDergbDJyAad8=; b=XG8GqpT5P7CkMpM2kokKm9vniXy31xTrjWNH12rBi42EeBPw6rL3avCPiZfGzOYj8oEMrg OUbv4sSzPezkWAJgTmUibVh1RKzumyfJNyq7X0q9Cje0SYG8FfRXpB9zBhRY7TdDQbtGQu du45ENW0coRB7VxQ2GU1pGzln2PP2XsI+1WTwJX5xVJawbuH9woDaceWCC5DWBcdshv+aq lmGB2U5+JteUP6VZIjkMJZKTsljGXIIrXQlShcA1gUwMBXIRpNESiWPTPn659lg9ux9Ots PLoXK9GKt3E/ytQzGztDjmA0Vp6rv3Ww3UOMIrLw6nHMfPoc0t1RyT5K5FZ9PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767711208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M12m6BaN1C1TQeum1d2+8Hj8QN2ehYmDergbDJyAad8=; b=Qz63A3b37v/K816Fx3e3jI98NXE5TIR18Hx1/hP6vi0htZthasAh/huZcq+IzeEzhI0xOs BMJJwvyyBZmbd19HQu+Uxlm2duyeygEANLXt5d3PApsb+RyQaS/KEnvlSkpUHztsv6aUjy UCWQ4GCIwMZnDOSBBJdq4APIsD8ppD7j0DxWZ3R/dxqqVunFvtaEab4eqQaP/MKegGpb2e RdXDqHxNwKNk5g34KSJRntKFr1bPcx/ZnfZmu/Ku3L/XDXCMxCgKBqSFhalPL5/+cJ/4Vk Z+X5NUdEsvlgfV3X1XKHQmAwsnWtxH/rw2DwD1To/C4YbSLHM9/Q/SGqvearkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767711208; a=rsa-sha256; cv=none; b=BYyC2JMPBYP7a4L554mepQVtQgCmECDAVzGIYPlhXERcyXzQrFQ0tNrXcQMcowpYY7PsPa WAMTLEDy3apFfCpbdA8C+UWp0QRRpRQt8KQXgVOGE+uuqbGDGXajDikwZ2jYU2ZbZv3bGW elOhcRBMMcv7+Mlsqp9dTq+WSJOOYtia3KZY79qQbN6BfNYWhpK3z2B1J2r36IrLweh7G2 ZiGyqUyDu6YRwPrmApgslNi0Sztik7+JXhDCXtNsgL+IAvCQa5dS2j7hbxv4qD65ZB0cf/ Lg2Guf0V2bvTfQTJx2iekkSbJKeuOyJXVE98rcJP6V6xa4+DuPuJHu167ae03g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlvLJ4mflz19V2 for ; Tue, 06 Jan 2026 14:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id efb8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 14:53:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 03e1605cdf17 - main - cxgbe.4: Update for recent HARDWARE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03e1605cdf17c48d5e0d6d42a9f15b78b3b7adb0 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 14:53:28 +0000 Message-Id: <695d21e8.efb8.32a463e2@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=03e1605cdf17c48d5e0d6d42a9f15b78b3b7adb0 commit 03e1605cdf17c48d5e0d6d42a9f15b78b3b7adb0 Author: Alexander Ziaee AuthorDate: 2026-01-06 14:52:42 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-06 14:52:50 +0000 cxgbe.4: Update for recent HARDWARE Adjust document description, description section, and hardware section to include Chelsio T7. Since this driver now supports many generations, order reverse chronologically. Compare language to ice.4 and bnxt.4, the other terabit ethernet drivers. This list of HARDWARE is obtained from the Chelsio prouduct selector. MFC after: 3 days (T7 support shipped with 15.0) Discussed with: jhb, np Differential Revision: https://reviews.freebsd.org/D54276 --- share/man/man4/cxgbe.4 | 58 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index 77465a3ae590..c401deea9577 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -29,12 +29,12 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd September 29, 2025 +.Dd December 17, 2025 .Dt CXGBE 4 .Os .Sh NAME .Nm cxgbe -.Nd "Chelsio T4-, T5-, and T6-based 100Gb, 40Gb, 25Gb, 10Gb, and 1Gb Ethernet adapter driver" +.Nd Chelsio T7, T6, T5, and T4 based 1Gb to 400Gb Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -47,20 +47,22 @@ To load the driver as a module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent -t4fw_cfg_load="YES" -t5fw_cfg_load="YES" +t7fw_cfg_load="YES" t6fw_cfg_load="YES" +t5fw_cfg_load="YES" +t4fw_cfg_load="YES" if_cxgbe_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for PCI Express Ethernet adapters based on -the Chelsio Terminator 4, Terminator 5, and Terminator 6 ASICs (T4, T5, and T6). +the Chelsio Terminator 7, Terminator 6, Terminator 5, and Terminator 4 +ASICs (T7, T6, T5, and T4). The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, VXLAN checksum -offload, VXLAN TSO, and Receive Side Steering (RSS). +tag insertion/extraction, VLAN checksum offload, VLAN TSO, +VXLAN checksum offload, VXLAN TSO, and Receive Side Steering (RSS). For further hardware information and questions related to hardware requirements, see .Pa http://www.chelsio.com/ . @@ -70,10 +72,10 @@ The driver uses different names for devices based on the associated ASIC: .Bl -column -offset indent "ASIC" "Port Name" "Parent Device" .It Sy ASIC Ta Sy Port Name Ta Sy Parent Device Ta Sy Virtual Interface -.It T4 Ta cxgbe Ta t4nex Ta vcxgbe -.It T5 Ta cxl Ta t5nex Ta vcxl -.It T6 Ta cc Ta t6nex Ta vcc .It T7 Ta che Ta chnex Ta vche +.It T6 Ta cc Ta t6nex Ta vcc +.It T5 Ta cxl Ta t5nex Ta vcxl +.It T4 Ta cxgbe Ta t4nex Ta vcxgbe .El .Pp Loader tunables with the hw.cxgbe prefix apply to all cards. @@ -89,6 +91,42 @@ For more information on configuring this device, see .Sh HARDWARE The .Nm +driver supports +400Gb, 200Gb, 50Gb, and 10Gb Ethernet adapters based on the T7 ASIC: +.Pp +.Bl -bullet -compact +.It +Chelsio S71400 +.It +Chelsio S72200 +.It +Chelsio S72200-OCP +.It +Chelsio T72200 +.It +Chelsio T72200-DPU +.It +Chelsio T72200-FH +.It +Chelsio T72200-FH-DPU +.It +Chelsio T72200-OCP +.It +Chelsio S7450-DPU +.It +Chelsio S7450-OCP +.It +Chelsio T71200-iNIC +.It +Chelsio T7250 +.It +Chelsio T7210-BT +.It +Chelsio T7410-BT-OCP +.El +.Pp +The +.Nm driver supports 100Gb and 25Gb Ethernet adapters based on the T6 ASIC: .Pp .Bl -bullet -compact From nobody Tue Jan 6 16:08:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlx1H0qVHz6MKTJ for ; Tue, 06 Jan 2026 16:08: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlx1G6RyHz3vC0 for ; Tue, 06 Jan 2026 16:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bZo9/nr7GwamInV34QtupuDIlXSfrqLhFa69W6ldtO4=; b=a4BkL/YDQR1kkxIh3FWe6Uj59xhwbOwxljWw08gePxdMMA/FrvoBrhoLt0BJvRuSvFJ0TO b81KLGxgxrWtLumfVp84wj3Ar9RgeIgCQgEoP8CyTCoNBxOBX4z5CZMs4RZMbircoKlQXV +LzF9NqZpulTKq2XXwppCGczHFGbeMGDHhRg1iy0PEdOfa3KXEx/LXEMDSJrZCay0bQGty XGEx93uAMpP98squUTDOLSCih0LX4zBYEH6JsQDFZ2n8Eyxb62dDclH8ezv4Hx84BxTLHx TO+uRTlyT9nq6joC6DhNSlsKV1xwmy0wtu17dUyNF7oNElFzqun23CNo63oLzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bZo9/nr7GwamInV34QtupuDIlXSfrqLhFa69W6ldtO4=; b=a488QeA9HKunL7UNs8JQExRGGiSvZJqFtHSNlvXvRdtpFtRxJo0pOJLxR0zACe9ycelOIX 7ZOgHYgocXyGw5F+O/YoS56PahXH7ipXAyXon717G4N+3wvH9/D913QWnhkxd4eHPFblTP Vqzq8TkK2VyGmcIoV0Nja+wPKQN16LI758uTsT+nMMd41nb8DA+cxMtYqeQc0abf5+oqHj C9P8Xx0Wr93Gi8JMrwx5zN3SJ0dzK2SwEZldAj4itvGnd1fzRAWQpa7mVL0Yi9ONJAsMJf hXUfXbSqvrgwfkGTZorHATpdXzR3x0xwMM7gvVSPRbV7GY5SWVcBB6uCUmTWmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767715731; a=rsa-sha256; cv=none; b=hQ/ofTvJMgXN8kknuXuGgolFqxBem9vp23dZIV/qRqnHm08EbMmWfnOcHmH4LIeKac/6bp s4kuNa3MLwufWWN2907KDbFFNg/72czXEXDDRoyCe2sutyq+uiY4VJcjzljz9udgqUNZXP zkw/cSDY+AKzE9pb+LKOB2d39Xz4E07X2RiNz8LsvO0QPPk+JtGpE+kKIZjouDn9YNaw6G vVWT/wehftqtul410uv7H5BfXJCJU6PpXgtflf7BbZNCF7OU3FO+RrbweXXSi0qQnUzN+H 2Oivobmqeg0LeC8NqrYRbzhqKg2MojvraRQPr3nTV7CuGKGbuAwFeX/4i6S1bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlx1G60Z3z1Cv6 for ; Tue, 06 Jan 2026 16:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 266de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 16:08:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 75866d71e8d9 - main - manuals: Correct some sysctl markup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75866d71e8d93fe1a1ff469b8a9c6c6c9908a6c8 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 16:08:45 +0000 Message-Id: <695d338d.266de.1642a022@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=75866d71e8d93fe1a1ff469b8a9c6c6c9908a6c8 commit 75866d71e8d93fe1a1ff469b8a9c6c6c9908a6c8 Author: Alexander Ziaee AuthorDate: 2026-01-06 16:02:24 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-06 16:08:21 +0000 manuals: Correct some sysctl markup This enables additional searching the manual by sysctl variable. This syntax is standardized in style.mdoc(5). Reported by: bapt MFC after: 3 days --- lib/libsys/chroot.2 | 6 ++--- lib/libsys/ptrace.2 | 10 ++++---- share/man/man7/security.7 | 58 +++++++++++++++++++++++------------------------ usr.sbin/chroot/chroot.8 | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/libsys/chroot.2 b/lib/libsys/chroot.2 index 3347df5cceee..809dbaad2f65 100644 --- a/lib/libsys/chroot.2 +++ b/lib/libsys/chroot.2 @@ -62,7 +62,7 @@ It should be noted that has no effect on the process's current directory. .Pp This call is restricted to the super-user, unless the -.Ql security.bsd.unprivileged_chroot +.Ql Va security.bsd.unprivileged_chroot sysctl variable is set to 1 and the process has enabled the .Dv PROC_NO_NEW_PRIVS_CTL @@ -118,7 +118,7 @@ will fail and the root directory will be unchanged if: .Bl -tag -width Er .It Bq Er EPERM The effective user ID is not the super-user and the -.Ql security.bsd.unprivileged_chroot +.Ql Va security.bsd.unprivileged_chroot sysctl is 0. .It Bq Er EPERM The effective user ID is not the super-user and the @@ -127,7 +127,7 @@ process has not enabled the .Xr procctl 2 . .It Bq Er EPERM One or more filedescriptors are open directories and the -.Ql kern.chroot_allow_open_directories +.Ql Va kern.chroot_allow_open_directories sysctl is not set to permit this. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libsys/ptrace.2 b/lib/libsys/ptrace.2 index 7aa24a3f820b..a6798bb22b27 100644 --- a/lib/libsys/ptrace.2 +++ b/lib/libsys/ptrace.2 @@ -148,31 +148,31 @@ Sometimes it may be desirable to disallow it either completely, or limit its scope. The following controls are provided for this: .Bl -tag -width security.bsd.unprivileged_proc_debug -.It Dv security.bsd.allow_ptrace +.It Va security.bsd.allow_ptrace Setting this sysctl to zero makes .Nm return .Er ENOSYS always as if the syscall is not implemented by the kernel. -.It Dv security.bsd.unprivileged_proc_debug +.It Va security.bsd.unprivileged_proc_debug Setting this sysctl to zero disallows the use of .Fn ptrace by unprivileged processes. -.It Dv security.bsd.see_other_uids +.It Va security.bsd.see_other_uids Setting this sysctl to zero prevents .Fn ptrace requests from targeting processes with a real user identifier different from the caller's. These requests will fail with error .Er ESRCH . -.It Dv security.bsd.see_other_gids +.It Va security.bsd.see_other_gids Setting this sysctl to zero disallows .Fn ptrace requests from processes that have no groups in common with the target process, considering their sets of real and supplementary groups. These requests will fail with error .Er ESRCH . -.It Dv security.bsd.see_jail_proc +.It Va security.bsd.see_jail_proc Setting this sysctl to zero disallows .Fn ptrace requests from processes belonging to a different jail than that of the target diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index f1035fd093d5..0685da5db437 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -955,7 +955,7 @@ briefly listed there, together with controls which enable some mitigations of the hardware state leaks. .Pp Hardware mitigation sysctl knobs described below have been moved under -.Pa machdep.mitigations , +.Va machdep.mitigations , with backwards-compatibility shims to accept the existing names. A future change will rationalize the sense of the individual sysctls (so that enabled / true always indicates that the mitigation is active). @@ -965,20 +965,20 @@ Backwards compatibility shims for the interim sysctls under .Pa machdep.mitigations will not be added. .Bl -tag -width security.bsd.unprivileged_proc_debug -.It Dv security.bsd.see_other_uids +.It Va security.bsd.see_other_uids Controls visibility and reachability of subjects (e.g., processes) and objects (e.g., sockets) owned by a different uid. The knob directly affects the -.Dv kern.proc +.Va kern.proc sysctls filtering of data, which results in restricted output from utilities like .Xr ps 1 . -.It Dv security.bsd.see_other_gids +.It Va security.bsd.see_other_gids Same, for subjects and objects owned by a different gid. -.It Dv security.bsd.see_jail_proc +.It Va security.bsd.see_jail_proc Same, for subjects and objects belonging to a different jail, including sub-jails. -.It Dv security.bsd.conservative_signals +.It Va security.bsd.conservative_signals When enabled, unprivileged users are only allowed to send job control and usual termination signals like .Dv SIGKILL , @@ -986,13 +986,13 @@ and usual termination signals like and .Dv SIGTERM , to the processes executing programs with changed uids. -.It Dv security.bsd.unprivileged_proc_debug +.It Va security.bsd.unprivileged_proc_debug Controls availability of the process debugging facilities to non-root users. See also .Xr proccontrol 1 mode .Dv trace . -.It Dv vm.pmap.pti +.It Va vm.pmap.pti Tunable, amd64-only. Enables mode of operation of virtual memory system where usermode page tables are sanitized to prevent so-called Meltdown information leak on @@ -1003,25 +1003,25 @@ See also .Xr proccontrol 1 mode .Dv kpti . -.It Dv machdep.mitigations.flush_rsb_ctxsw +.It Va machdep.mitigations.flush_rsb_ctxsw amd64. Controls Return Stack Buffer flush on context switch, to prevent cross-process ret2spec attacks. Only needed, and only enabled by default, if the machine supports SMEP, otherwise IBRS would do necessary flushing on kernel entry anyway. -.It Dv hw.mds_disable +.It Va hw.mds_disable amd64 and i386. Controls Microarchitectural Data Sampling hardware information leak mitigation. -.It Dv hw.spec_store_bypass_disable +.It Va hw.spec_store_bypass_disable amd64 and i386. Controls Speculative Store Bypass hardware information leak mitigation. -.It Dv hw.ibrs_disable +.It Va hw.ibrs_disable amd64 and i386. Controls Indirect Branch Restricted Speculation hardware information leak mitigation. -.It Dv machdep.syscall_ret_flush_l1d +.It Va machdep.syscall_ret_flush_l1d amd64. Controls force-flush of L1D cache on return from syscalls which report errors other than @@ -1036,62 +1036,62 @@ This is mostly a paranoid setting added to prevent hypothetical exploitation of unknown gadgets for unknown hardware issues. The error codes exclusion list is composed of the most common errors which typically occurs on normal system operation. -.It Dv machdep.nmi_flush_l1d_sw +.It Va machdep.nmi_flush_l1d_sw amd64. Controls force-flush of L1D cache on NMI; this provides software assist for bhyve mitigation of L1 terminal fault hardware information leak. -.It Dv hw.vmm.vmx.l1d_flush +.It Va hw.vmm.vmx.l1d_flush amd64. Controls the mitigation of L1 Terminal Fault in bhyve hypervisor. -.It Dv vm.pmap.allow_2m_x_ept +.It Va vm.pmap.allow_2m_x_ept amd64. Allows the use of superpages for executable mappings under the EPT page table format used by hypervisors on Intel CPUs to map the guest physical address space to machine physical memory. May be disabled to work around a CPU Erratum called Machine Check Error Avoidance on Page Size Change. -.It Dv machdep.mitigations.rngds.enable +.It Va machdep.mitigations.rngds.enable amd64 and i386. Controls mitigation of Special Register Buffer Data Sampling versus optimization of the MCU access. When set to zero, the mitigation is disabled, and the RDSEED and RDRAND instructions do not incur serialization overhead for shared buffer accesses, and do not serialize off-core memory accesses. -.It Dv kern.elf32.aslr.enable +.It Va kern.elf32.aslr.enable Controls system-global Address Space Layout Randomization (ASLR) for normal non-PIE (Position Independent Executable) 32-bit ELF binaries. See also the .Xr proccontrol 1 .Dv aslr mode, also affected by the per-image control note flag. -.It Dv kern.elf32.aslr.pie_enable +.It Va kern.elf32.aslr.pie_enable Controls system-global Address Space Layout Randomization for position-independent (PIE) 32-bit binaries. -.It Dv kern.elf32.aslr.honor_sbrk +.It Va kern.elf32.aslr.honor_sbrk Makes ASLR less aggressive and more compatible with old binaries relying on the sbrk area. -.It Dv kern.elf32.aslr.stack +.It Va kern.elf32.aslr.stack Enable randomization of the stack for 32-bit binaries. Otherwise, the stack is mapped at a fixed location determined by the process ABI. -.It Dv kern.elf64.aslr.enable +.It Va kern.elf64.aslr.enable ASLR control for 64-bit ELF binaries. -.It Dv kern.elf64.aslr.pie_enable +.It Va kern.elf64.aslr.pie_enable ASLR control for 64-bit ELF PIEs. -.It Dv kern.elf64.aslr.honor_sbrk +.It Va kern.elf64.aslr.honor_sbrk ASLR sbrk compatibility control for 64-bit binaries. -.It Dv kern.elf64.aslr.stack +.It Va kern.elf64.aslr.stack Controls stack address randomization for 64-bit binaries. -.It Dv kern.elf32.nxstack +.It Va kern.elf32.nxstack Enables non-executable stack for 32-bit processes. Enabled by default if supported by hardware and corresponding binary. -.It Dv kern.elf64.nxstack +.It Va kern.elf64.nxstack Enables non-executable stack for 64-bit processes. -.It Dv kern.elf32.allow_wx +.It Va kern.elf32.allow_wx Enables mapping of simultaneously writable and executable pages for 32-bit processes. -.It Dv kern.elf64.allow_wx +.It Va kern.elf64.allow_wx Enables mapping of simultaneously writable and executable pages for 64-bit processes. .El diff --git a/usr.sbin/chroot/chroot.8 b/usr.sbin/chroot/chroot.8 index 4a1a5a396631..58d5ec8f1a5b 100644 --- a/usr.sbin/chroot/chroot.8 +++ b/usr.sbin/chroot/chroot.8 @@ -68,7 +68,7 @@ Use the command before chrooting, effectively disabling SUID/SGID bits for the calling process and its descendants. If -.Dv security.bsd.unprivileged_chroot +.Va security.bsd.unprivileged_chroot sysctl is set to 1, it will make it possible to chroot without superuser privileges. .El From nobody Tue Jan 6 16:40:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlxkK3VRlz6MLy7 for ; Tue, 06 Jan 2026 16:40: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlxkK2XHMz3xWl for ; Tue, 06 Jan 2026 16:40:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767717657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWL2cUFKvxtc6QhqQGlZHBWoX4oiZw3fkXStQ2vDNTQ=; b=yTPs4Qk1kw+yBl8ozgqohToE1z3+xtt8mjtDtP42lBN0Q8zFQH2/Adz/n8cXg58cdW9KIE LB1Nq87lcM8w5nOekCZ17jBMPb8v1hSWcb7WIPkfhkXzQO5qfTb8g2WtLQP4Fe6jJmunu7 Xe3mMAkhkPOpE+QK4KOlUmEeznnK0rtGD/4rSjUAWosWJzsU7zJ0rlbfdnb+1o0bgqxbfF GRqFFeCVLlnSYkC3UKk1snNaOO34Z2HHmoyA5lpLGEF9Kt0pT6Uv6fktN8vApyIioVKM57 yKgNAR/up8aS6KiFWP9r+Zs+RbfLZOKdZi4dgZyIOwhzeEDHWYNWAsVuj+YtiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767717657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWL2cUFKvxtc6QhqQGlZHBWoX4oiZw3fkXStQ2vDNTQ=; b=DaI74VZUEtgoeBHoAbQ0Hyuh3fdZg9ahxQXBHj6+NB+ils134O/EkFnGf+jKQxqR+AMCp9 T364wESP9e9dQuIYgzVm2VKCN2G9i3SHhZRHRYRmLNuINRTRVWPJIY7Y+9hy2aU2BWeiX/ pbTnma4J9YzaIQO67ZokYiv/aIfWny0imxIH6SYotjg6/eq0F3mTz06o2JYSH5n8q16ZoI TXv5gg7Sg/++S12ndqBqkM35t45EUE2zu91hl7B+rda5/eAKXw6v2hW4b5zxPxKGoTT8ve Fx+WDV3CULNk5CbsIoIXSyRiA65x0pCBl7zOPDJVaSvPS1soyQf2I1sml+jTbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767717657; a=rsa-sha256; cv=none; b=vrIpYkRqsvjFy6+CB8jRpjJn7LzUfoDxyT6F5N8hW4Va1jx6EfPERwqT5KV9ZBgxnVQATj or2hGxHGhpMOCUCNplxuNOqoqr9z3cTo0hwq44ZCPTL+tsiBI6N+zaDjtPRkKmOc+GdQHA 54rzUQ4tyktW5fTRiQpGbaJrgXzIDey9xNZYsRbnusYg02/kiozKrkHFGF9c6bgw8XTxPe KzsWmCscf6FnuSq179dTLWTHhRjomrcw2NWnYNHVMVx8eI2C9U/FSIirS1LEQGj6TVDcwT bKctOrybLugB4pM83/xN0vYoqETk8kwLkuGNHOHKSWdesY+ogLHpPfMd2BMZnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlxkK25LSzZq for ; Tue, 06 Jan 2026 16:40:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3242d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 16:40:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Frank Hilgendorf From: Ahmad Khalifa Subject: git: be6ba97aaee7 - main - loader.efi: add stride & offset for MacBookPro3,1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be6ba97aaee762c2e5300834f1916ae5dfd5a0b9 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 16:40:57 +0000 Message-Id: <695d3b19.3242d.c7f0515@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=be6ba97aaee762c2e5300834f1916ae5dfd5a0b9 commit be6ba97aaee762c2e5300834f1916ae5dfd5a0b9 Author: Frank Hilgendorf AuthorDate: 2025-01-27 21:18:39 +0000 Commit: Ahmad Khalifa CommitDate: 2026-01-06 16:29:01 +0000 loader.efi: add stride & offset for MacBookPro3,1 Note that there are three variants of this MacBook. We only have the stride and offset values for the 17" 1680x1050 model. Reviewed by: vexeduxr Pull Request: https://github.com/freebsd/freebsd-src/pull/1584 --- stand/efi/loader/framebuffer.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index dc0047de1116..632377613f58 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -392,6 +392,23 @@ efifb_from_uga(struct efi_fb *efifb) /* These are the missing bits. */ offset = 0x0; stride = 2048; + } else if (ev != NULL && !strcmp(ev, "MacBookPro3,1")) { + /* + * Valid for MacBookPro 17" with standard resolution. + * Other Models are: + * MacBookPro 15" with horiz=1440 + * MacBookPro 17" with horiz=1920 + */ + + /* These are the expected values we should have. */ + if (horiz == 1680) { + vert = 1050; + fbaddr = 0xc0000000; + /* These are the missing bits. */ + stride = 2048; + /* 24 scan lines down */ + offset = stride * 4 * 24; + } } } From nobody Tue Jan 6 17:26:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlykz23PRz6MQ9x; Tue, 06 Jan 2026 17:26:35 +0000 (UTC) (envelope-from des@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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlykz1HqMz43pP; Tue, 06 Jan 2026 17:26:35 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767720395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7pI1XooX5sT16hwyrUKgXfxdb45opRBM8JkZ64QgklY=; b=GSj6H4VSjMwHn66jonfeUjbH9A+etZQ5E4R/6q30njkuxGclOhfadp9/+uAistZXuZF/pl 8z4PluF3Gjj1TqgsTjDuGm/Iu5IwJ4e6Rg6LfnQgUmmjG6MXgTM4k4W+JEIQ7gOGGeiaPD g57iDgc/YTV1QlGLznPVHssl0AsabLoXEJH9sRD1WrxlZhlbJeGWuBDmEZT7lO6HbClCT/ julGJGYLJiY/N3uDN4yPpphRwS7UM/QNtcLM/Zn+HsUyhdGWW1xTRoxJYt8LR/fgXPtMRP 1amq2k/u8Ca0HBuyWDW5xmhXGrHm1ZrMlTW/wFqyKOjP+9B7h5osN6rMyhjJyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767720395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7pI1XooX5sT16hwyrUKgXfxdb45opRBM8JkZ64QgklY=; b=F3yV6o5ERBpQnIrwEjJBJSGy/bIUzVypNA0yCy89Jz+Eb3XW2Onr62UgBqY0o0b+nAAcOy y6lRplYNr2UmccX7fxPXh1akcIpJYJyimNRGNF686LYhrg9/3fZGvn86JczLFMc7FdL+H5 QTCSinqGWHFeYo0mjTHdsWNTWcp3+3JDP2w5BfyTTtpYqctbu/xOH9ODCi8BD3sqQNtkK/ Sgo7wJ7P8SwC7T9fCFYp3YE07gkpJUHqQ3YV4dDbumTOpqlS4SQExGK17NcHgKw6G9n2zu D1iQ2q3RYb9nikAUvR7m5aTyqmLguyta+PSXgST2fihL93yGV778uwSyB1KZ2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767720395; a=rsa-sha256; cv=none; b=qK9s+8kEGHjBw9mn8hM5IXpKlgISO18e0ZaFU+Ej7wREF/vX5UaAG1h/HLWfdhM+hOTh/o gjCJ6J1jNUzCsz36qxJQFF3i2Xv6lwqpH92QlxCOljwMABWeDiaSm+XLizUMijnPEpCmGv 9wygOIze96DJVYUNI5GHT1ZIAFpw8r/kpa7bogBqDqDMQTequw/YGHphCcgMF18dROuzl6 VODbomDc1dDSRRDRJjDSI8ZxRLn+/kpYIZLQjzvIuLZcT6yaN3fW/xoVqQok4aR4kE7HH8 QnLo9UapkqfLmFGXg01XSiQmVR96XajjnWu7mqR4f21saSvvIZK8fOG/hW9vMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (2a01cb0585090500922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8509:500:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dlyky6wFhz10dJ; Tue, 06 Jan 2026 17:26:34 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 21A2D187DF; Tue, 06 Jan 2026 18:26:33 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 27894e20f140 - main - libgeom: Fix segfault in 32-on-64 case In-Reply-To: (John Baldwin's message of "Tue, 6 Jan 2026 08:37:12 -0600") References: <6958dd10.b4b9.2aebecda@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 06 Jan 2026 18:26:33 +0100 Message-ID: <86eco2hcty.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable John Baldwin writes: > Should we perhaps not use pointers to hold the cookies? This is going to= truncate > in the lib32 case which will probably still work in practice as the low 3= 2 bits of > kernel object addresses are probably unique, but isn't foolproof. Perhap= s the cookie > values should be stored as either kvaddr_t values, or uintmax_t? Unfortunately this is effectively part of the KBI, these values get cross-referenced against pointers in struct devstat returned by kern.devstat.all. I'm working on fixing that as well. Also, the way the code works, the =E2=80=9Ccookies=E2=80=9D get stored in p= ointer members and then later resolved to the actual pointers to the corresponding struct, so no, we can't easily not use pointers. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Tue Jan 6 17:32:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlysz3HQSz6MQCR for ; Tue, 06 Jan 2026 17:32: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlysz2RXMz453x for ; Tue, 06 Jan 2026 17:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767720759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BO49oYDzpCd2cAT6gPzdolncPz4JgRH4Ygmql8jVws=; b=qQsJRYPmJNDoorgjGlGN9exJMxFWFmjRM1Lvir+5Qv8z3o3lhnOAWgG9zwx83Eor1jsz9q G1BiLllKfiakKUX91ejigmCj6TBXTOMi1Ru3fhfIThqIkQeadomDj/4JEJA5k83w61VsoQ uJgOzG5IsjvSl/gLweXKlfL7U5l799j65M69i7vfTfUyekHUsGUzb8OrdzVtx0udVj9f97 9QI2GAAhudDVAMhqcXeDBhkMv2TO3ZurhU2EuaLWZkhfJ8dgc4Az8mLTmV5v/aEzTDMyOi CiCDXvW8rod6lLiozEhHMhN1TrCgK/3RH2ozTJNhyyffeU9M2mJ3OpR/01HvIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767720759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BO49oYDzpCd2cAT6gPzdolncPz4JgRH4Ygmql8jVws=; b=AD+DzUVXMV2rEf9JfikCYuGmNa/18V+gHKFBsijXOy4z8PJ37nPPit2/eCGeBRUryG+/5O EtcWs+dihNjcsQPHzCYrQfIf8GgqNb7oUUkEfEhcLJ+Rfv+gYzyCBTsmEJ1YyNuEivoaUc aludhlz1/qOzqzF6NISoQcw2HkM3FH1sdj03SUX7ZWsZGgUAzvzPwcmF9UqkuSfUWTCiI2 SdfRkn2QsV4ljyCy8rdvXHHtbmxWlGdd6NNyAM2mxiNFKLwK4didAcNwn0/bPJXQx3t++P +znR4nVNfUqiCPorrAJQfC5rM0EjfFXJGH2HbcrQp9umrCDz5l1DfzDAQV10lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767720759; a=rsa-sha256; cv=none; b=P9clCXyDPgXbNJk1XASVZ51yMJxymbj5/6QtVvBKJFLxjy1P1JFXlnJvDBRY5Xye40Uoel OLrVeCCneLYhlSRiUmhuJEXLFUv7xzJdmDUOByc7ntUfBmsxVf8FhhPL2wRdHk87Hjo3Yb gUJaHx//uNkvE5/gzxpFlpblJbOxk2peyYsVShN8OidthKNWxmNjOqtz82zihd9to9LV+T PaiJT1fUC1Uuekd9SVtQA2LVgCGrMmNBDFdE1FSm6zhiUfZA8+r/BA8xYIRztVmBfon8Uo xPdNOMw0B3jCuIJcVQyGaHcDMJSsyomh9u+zcpBaybF1OTL+GJ8AJLzGKq0z/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlysz1mCcz1pR for ; Tue, 06 Jan 2026 17:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 380b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 17:32:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 2962dc768775 - main - sh.1: Restore missing builtin commands List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2962dc76877538508944a441fd1570322e969380 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 17:32:39 +0000 Message-Id: <695d4737.380b7.25e5419@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=2962dc76877538508944a441fd1570322e969380 commit 2962dc76877538508944a441fd1570322e969380 Author: Alexander Ziaee AuthorDate: 2026-01-06 17:25:26 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-06 17:31:32 +0000 sh.1: Restore missing builtin commands PR: 292221 Fixes: 2980318b2747 (sh.1: extend the section about getopts) MFC after: 3 days --- bin/sh/sh.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index affb653cd3ae..b37e4785c871 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -2373,7 +2373,7 @@ is not specified by .Va optstring or if it is missing a required argument, the option is considered invalid and: -.Bl -offset indent +.Bl -enum .It If the first character of .Va optstring From nobody Tue Jan 6 17:57:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlzQ92jPTz6MRx2 for ; Tue, 06 Jan 2026 17:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlzQ92Dfvz47sW for ; Tue, 06 Jan 2026 17:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767722225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hnh4Erwx8eKWfkWMVCk6le1Eb11Cek/Xbskm4d0u9r8=; b=vCR+bvT4j87Kg4H6zjdz/O8ra52WUbccY2uqxHw+mf5VB+NvBe1rksX4kgCUlalAPhFvwg oeTomWRqEPnTJZOsUu1a2G56PagIctMrkpTCZvb72ungqeZ4qpBfKuxxqpFj/MLP41/O+m 013P3IgIPcymCIWwi8h5c3BuPgM0kzSnaiJqXY3Pcl68Kw3xQL81UJ3WpfRF9xU9GWnPNF wUkbbB8UeBprdabR6G75CfbJz93VVl28i54zRI/Myz+SjwqCohUhbEDrp6lHgB4SUYr1I6 81vR1tDTDmFgmrq0rMQdbRRKCDz2ScFzF77hufkirMhxAarfq3WclKiJgs3bIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767722225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hnh4Erwx8eKWfkWMVCk6le1Eb11Cek/Xbskm4d0u9r8=; b=gBog0WWzevT324N1v1f9o4RA8DhcfheZW84TEbhh13l0KZWxmCV9Jsy8FYo6lk8kUCrR/t DoxbScfNKoNrnSpBUMdebKqY88rab9uWtIYfjGpECNqC+ARKWASI8JA36DEn+w0OSgOYGU Nmx7aclrH8oUe9pSKL9+FiUYK7I2pFkLi6cUqelE4mph7OQb58HKoCQxycpEyySXnMJAI2 sXMIRmj8ev0lEjk4WmiUiMe0KFV/k10FRWhd6HrBlRG20X6m3qyp0aL0btDqayQbyeuLta 7PYAMdxQs3VVrIJcx3A2WvTMhjSSpfA4YSJZqhkXTYmPkMny1RxzoF4t7XajVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767722225; a=rsa-sha256; cv=none; b=E6/ypYQVwUpZlCEm5bkQqziIHq9bbp6Ay7Q8WERTaaCwpVu6GseKaPvQTiedE5ZGkZSJNl KC39S3iXTTvTb1dkXu4/v//FVGbtAHc+wYzT0pqQaxgxDqSuU0QoebPjhI8uzl+JirZX6V +fJMW/Ec1dyDQOLVN177nZCaN1edDINttUWTd5m9/J/MVgacHfUJqZJE557O9L1GrywSI/ Ha1bjZcM+e8Q8RBeWTKQsTvHxarjCApytA2a1b3C5VPcMbw0/cvn6KVRVFMJCqgfIZow4H Mi1IRgKjTcHmmzRCbKLpUUHedlU3Z5nTM6daibv958vWekwWZ8GUI2WLN3R4Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlzQ91lbpz252 for ; Tue, 06 Jan 2026 17:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 391ff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 17:57:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: 6c6e00b7f16f - main - mips: remove mips leftovers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c6e00b7f16f3bda1b56da6a57d65ff6e26ae3e7 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 17:57:05 +0000 Message-Id: <695d4cf1.391ff.3e590545@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6c6e00b7f16f3bda1b56da6a57d65ff6e26ae3e7 commit 6c6e00b7f16f3bda1b56da6a57d65ff6e26ae3e7 Author: Minsoo Choo AuthorDate: 2025-12-01 02:48:05 +0000 Commit: Ed Maste CommitDate: 2026-01-06 17:56:50 +0000 mips: remove mips leftovers Signed-off-by: Minsoo Choo Pull-request: https://github.com/freebsd/freebsd-src/pull/1909 --- lib/libkldelf/Makefile | 1 - lib/libkldelf/ef_mips.c | 116 --------------------- .../opensolaris/uts/mips/dtrace/fasttrap_isa.c | 30 ------ .../opensolaris/uts/mips/sys/fasttrap_isa.h | 48 --------- usr.sbin/kldxref/Makefile | 1 - 5 files changed, 196 deletions(-) diff --git a/lib/libkldelf/Makefile b/lib/libkldelf/Makefile index 0d1716f17fca..9b0a08352633 100644 --- a/lib/libkldelf/Makefile +++ b/lib/libkldelf/Makefile @@ -11,7 +11,6 @@ SRCS= ef.c \ ef_arm.c \ ef_amd64.c \ ef_i386.c \ - ef_mips.c \ ef_powerpc.c \ ef_riscv.c WARNS?= 2 diff --git a/lib/libkldelf/ef_mips.c b/lib/libkldelf/ef_mips.c deleted file mode 100644 index 99790e11a9c3..000000000000 --- a/lib/libkldelf/ef_mips.c +++ /dev/null @@ -1,116 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2019 John Baldwin - * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory (Department of Computer Science and - * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the - * DARPA SSITH research programme. - * - * 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 - -#include -#include -#include - -#include "kldelf.h" - -/* - * Apply relocations to the values obtained from the file. `relbase' is the - * target relocation address of the section, and `dataoff/len' is the region - * that is to be relocated, and has been copied to *dest - */ -static int -ef_mips_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, - GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) -{ - char *where; - GElf_Addr addr, addend; - GElf_Size rtype, symidx; - const GElf_Rel *rel; - const GElf_Rela *rela; - - switch (reltype) { - case ELF_T_REL: - rel = (const GElf_Rel *)reldata; - where = (char *)dest + (relbase + rel->r_offset - dataoff); - addend = 0; - rtype = GELF_R_TYPE(rel->r_info); - symidx = GELF_R_SYM(rel->r_info); - break; - case ELF_T_RELA: - rela = (const GElf_Rela *)reldata; - where = (char *)dest + (relbase + rela->r_offset - dataoff); - addend = rela->r_addend; - rtype = GELF_R_TYPE(rela->r_info); - symidx = GELF_R_SYM(rela->r_info); - break; - default: - return (EINVAL); - } - - if (where < (char *)dest || where >= (char *)dest + len) - return (0); - - if (reltype == ELF_T_REL) { - if (elf_class(ef) == ELFCLASS64) { - if (elf_encoding(ef) == ELFDATA2LSB) - addend = le64dec(where); - else - addend = be64dec(where); - } else { - if (elf_encoding(ef) == ELFDATA2LSB) - addend = le32dec(where); - else - addend = be32dec(where); - } - } - - switch (rtype) { - case R_MIPS_64: /* S + A */ - addr = EF_SYMADDR(ef, symidx) + addend; - if (elf_encoding(ef) == ELFDATA2LSB) - le64enc(where, addr); - else - be64enc(where, addr); - break; - case R_MIPS_32: /* S + A */ - addr = EF_SYMADDR(ef, symidx) + addend; - if (elf_encoding(ef) == ELFDATA2LSB) - le32enc(where, addr); - else - be32enc(where, addr); - break; - default: - warnx("unhandled relocation type %d", (int)rtype); - } - return (0); -} - -ELF_RELOC(ELFCLASS32, ELFDATA2LSB, EM_MIPS, ef_mips_reloc); -ELF_RELOC(ELFCLASS32, ELFDATA2MSB, EM_MIPS, ef_mips_reloc); -ELF_RELOC(ELFCLASS64, ELFDATA2LSB, EM_MIPS, ef_mips_reloc); -ELF_RELOC(ELFCLASS64, ELFDATA2MSB, EM_MIPS, ef_mips_reloc); diff --git a/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c deleted file mode 100644 index a31eac8cf0b8..000000000000 --- a/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - - -/* - * XXX: Placeholder for MIPS fasttrap code - */ diff --git a/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h b/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h deleted file mode 100644 index eb99752ce415..000000000000 --- a/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _FASTTRAP_ISA_H -#define _FASTTRAP_ISA_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include - -#ifdef __cplusplus -extern "C" { -#endif -/* - * XXXDTRACE: placehodler for MIPS fasttrap stuff - */ - -typedef uint32_t fasttrap_instr_t; -#define FASTTRAP_SUNWDTRACE_SIZE 64 - -#ifdef __cplusplus -} -#endif - -#endif /* _FASTTRAP_ISA_H */ diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index ab7b373a45cc..0a409ec20265 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -21,7 +21,6 @@ KLDELF_SRCS= ef.c \ ef_arm.c \ ef_amd64.c \ ef_i386.c \ - ef_mips.c \ ef_powerpc.c \ ef_riscv.c SRCS+= ${KLDELF_SRCS} From nobody Tue Jan 6 19:11:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm14G1QV8z6MY3L for ; Tue, 06 Jan 2026 19:11: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm14G0fCvz4Px3 for ; Tue, 06 Jan 2026 19:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BwES3HLkw7d6T5Al/fE+qG+OaI8uGdRLyyuBiREP8pc=; b=nxR1otXx9raZdD6MSkQbm1hpitA/9hHV20u604gskkwB4M1shB6O1LW2GKngot+AXwta8y GNckVwJtsxcDR90/WtTnBKXw658vKclI7YvlaKKLFZQg39cCn2xmJ5gE/RwagdHA1ZaZGw zbEzdTUd6oWS4/zOOczoyrPI6UOFZG5hz518NfYtamT/ouQuA06Ez2SP2naudvGOBPoRXn GT0j4bHdMiEY/pfEu9RnZ6l3t3V456o8Btgj/GSTuUUVqrMZ1oEId0qdIEwd+MKWZggrrO nxEHEtW71q/8QcfB89uc7Y0gEOGeCpZwacc7WGch/pe/3UZcSiFMURASxByXkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BwES3HLkw7d6T5Al/fE+qG+OaI8uGdRLyyuBiREP8pc=; b=SxLT2d4p7HoyregI6JAZMrgTbnsORGcVHSE6prI5jgP9Wj2nBwdmIrVU3IOby9b/6nGKlr VcAJoIvM+xNrBWXspvTIlssq/bjMMWMl8KoxYoLiqwdhJ23u9yavtNECgMuU1ubY2+aIuO KqSL5lJ4RC4D04CtA2zsB0lbxh8PBb+zQjYFzRGtIML3MXQSCLzKCjq9d9aoARV6sIdKLE hfsA9bfFn3Lt5Kcg19+Bf8lvbO8IZlbBNkNVseLNeBoxKmvvuhr7+Y/b7rv09QqG7Ewyaw uw9/jnPFBQLWFPQOBKZGFakK/JX9jc09b5TbQCJ6fa+TqVs/J1+GbjMGQnFGFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767726702; a=rsa-sha256; cv=none; b=OnxjPklUw3wnSKgEt3OInqZGFRNmhHoirOY4Wccag+9DB2/9d1DgpxZm8IcKgBgLznJJjp Nuv17Spir2nTJ2D8VBV+FJ+jQJRda4oEGHu22DIVoN7GaTGEjapnEkrJ2wGUx/W0HAqx5S B4lssbpuqvHjRWTUMGdW122CaHRVgTBBgt1vGhr1CiOaO3YZp2asGQ6AgKm1x/Ne9vbAtw KWzUDRqhQQdhSDv/FaVQxfCuSbcCV4wOXMBVMzi8Nk+q65eKIge5qq6BjsMpPQAGkLTDdy rdUobawSEYV3dAJnp8aqjeX2Ug3e3AlZBlAlxlvo8yU5f6SpXSZ485xcIW/CsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm14G09fTz41d for ; Tue, 06 Jan 2026 19:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f174 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 19:11:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 8b210276cde2 - main - mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b210276cde207ca3dc1f7f46d5a6d32e0a1c51d Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 19:11:42 +0000 Message-Id: <695d5e6e.3f174.d6596d8@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=8b210276cde207ca3dc1f7f46d5a6d32e0a1c51d commit 8b210276cde207ca3dc1f7f46d5a6d32e0a1c51d Author: Michael Osipov AuthorDate: 2025-12-21 15:53:27 +0000 Commit: Michael Osipov CommitDate: 2026-01-06 19:10:46 +0000 mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. This chip is also recognized by mrsas(4) under the generic name for the controller chip. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54520 --- share/man/man4/mfi.4 | 2 ++ sys/dev/mfi/mfi_pci.c | 1 + 2 files changed, 3 insertions(+) diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4 index 4a55467d81f2..6b660c4cd744 100644 --- a/share/man/man4/mfi.4 +++ b/share/man/man4/mfi.4 @@ -109,6 +109,8 @@ Dell PERC5 .It Dell PERC6 .It +Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) +.It IBM ServeRAID M1015 SAS/SATA .It IBM ServeRAID M1115 SAS/SATA diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c index 65e8e30bf994..b150138452db 100644 --- a/sys/dev/mfi/mfi_pci.c +++ b/sys/dev/mfi/mfi_pci.c @@ -131,6 +131,7 @@ struct mfi_ident { {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Adapter"}, {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (blades)"}, {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (monolithics)"}, + {0x1000, 0x005b, 0x1734, 0x11d3, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116)"}, {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25DB080"}, {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25NB008"}, {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "ThunderBolt"}, From nobody Tue Jan 6 20:54:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm3Lh5BpZz6Mhfk for ; Tue, 06 Jan 2026 20:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm3Lh38SCz3R0J for ; Tue, 06 Jan 2026 20:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767732860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7pvUNIIs4iaFwn1R73BuszyFlWYnzJPI54wlDwsA9E8=; b=MbaLVIcloX3g5fHW3JKCDTZ2mMBQt4L2w9VXrjZsMJ5RxuvGNqmbGxhq0bWJobjGY9vDuH eosRxPMaSeOjee7Gll3ohzHML/e9VdGjv6igeEyLRFvscx9AkRkY45eWbj7mzNnV3pdMoF yh8fhf3/dvsbtduzHkv1c//JLaBJCMgqCkGRKsiowmIrDUXKQM+H+nWpEelGflv9gXs541 R8wiuV/LFdhkJgwqV8gglvKEjx05+Nb3JmeDaZ1eJH9VZN/WE3G8JCdKeJmjiBEOul+UCO mZqBtoL+ltCY9xqK9WCFSrtysFWaT2AcpIQkajQJBAbcC1nP9qm505JJM+a6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767732860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7pvUNIIs4iaFwn1R73BuszyFlWYnzJPI54wlDwsA9E8=; b=j97Nmmei54byP+kCUdiJ54hG94j2CwcrtaOVjdwACPJxle17HlS24azG+wHbWISrPI8iOB r2F5AiimAkDkcztGLCV8zRXDiU7W3hMqEtxKNXZ0+Hg7n8Ce8dpn++/+ca+oLpgQRRM7Hx Zk++k7WxpDgaSEgekZ8YQuy36kRlF+e8NsKd6Jkw34R495tMDRrGLHdpzbJ5SH2lmU0jiI 1Qh639jaROgwLaCx6uQxse+1NdhmK6TevwNuI7q4FC1v1xbHiQpVcMdefPXWaqlNOcALLK g/HOrerSX3F2o8wYuWCnbJXjE9FXd9RqatTkqAsR43QGA/7fsDI6s+CfRPkiqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767732860; a=rsa-sha256; cv=none; b=yl7OVdtQevQGyCrYsNu443REfdFRVJcmX1NgP1j8E8hUX8PQJod2zEi+fb9ycItYB2tRFo mjS3K1DNUj/3zXxCsuPHsNnXc39G0S6Jzis6AORQ1MsG3odT0nofeqZYr8YdZ/w0F8LsnI uCNRyc57OD12Doh1MWnFGtKjBThm6TGSinijSD4qHvz9YPc3oiIZtDH+GoutQz3Csj57hh Ks71hwm9L6FE4CG52WZgkQ6kA2q91LsKPcrewBF4AjecP2p49z6cwOvd/3f2OaeKv2AGoy VSEYgcdgmBTF8eN7xRuATiyYLp8UQn0pKvm5iPl/V5EYfagplk+RrbfDHsSZjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm3Lh20Mbz7FC for ; Tue, 06 Jan 2026 20:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9759 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 20:54:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 203e5a1eeec1 - main - linker: Reset DMAP protections in link_elf_unload_file() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 203e5a1eeec1153b0bcb230ccfb90531fa8cbeb5 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 20:54:20 +0000 Message-Id: <695d767c.9759.66d1664d@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=203e5a1eeec1153b0bcb230ccfb90531fa8cbeb5 commit 203e5a1eeec1153b0bcb230ccfb90531fa8cbeb5 Author: Mark Johnston AuthorDate: 2026-01-06 16:48:54 +0000 Commit: Mark Johnston CommitDate: 2026-01-06 20:54:10 +0000 linker: Reset DMAP protections in link_elf_unload_file() On x86, when a preloaded kernel module is unloaded, we free the backing (physically contiguous) pages. The ET_REL linker will have adjusted protections on segments of the preloaded file, which updates the direct map, so the original protections must be restored when unloading the module. Previously this was handled in kmem_bootstrap_free(), but there is no apparent reason not to handle this within the kernel linker. Moreover, we were not resetting permissions in the kernel map on arm64. Reviewed by: alc, kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D54438 --- sys/kern/link_elf.c | 46 +++++++++++++++++++++++++++++++++------------- sys/kern/link_elf_obj.c | 14 ++++++++++++++ sys/vm/vm_kern.c | 8 -------- 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index ebd203858b66..45edd186e6ce 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -155,7 +155,7 @@ static int link_elf_search_symbol(linker_file_t, caddr_t, c_linker_sym_t *, long *); static void link_elf_unload_file(linker_file_t); -static void link_elf_unload_preload(linker_file_t); +static void link_elf_unload_preload(elf_file_t); static int link_elf_lookup_set(linker_file_t, const char *, void ***, void ***, int *); static int link_elf_each_function_name(linker_file_t, @@ -799,10 +799,10 @@ parse_vnet(elf_file_t ef) /* * Apply the specified protection to the loadable segments of a preloaded linker - * file. + * file. If "reset" is not set, the original segment protections are ORed in. */ static int -preload_protect(elf_file_t ef, vm_prot_t prot) +preload_protect1(elf_file_t ef, vm_prot_t prot, bool reset) { #if defined(__aarch64__) || defined(__amd64__) Elf_Ehdr *hdr; @@ -818,13 +818,16 @@ preload_protect(elf_file_t ef, vm_prot_t prot) if (phdr->p_type != PT_LOAD) continue; - nprot = prot | VM_PROT_READ; - if ((phdr->p_flags & PF_W) != 0) - nprot |= VM_PROT_WRITE; - if ((phdr->p_flags & PF_X) != 0) - nprot |= VM_PROT_EXECUTE; + nprot = VM_PROT_NONE; + if (!reset) { + nprot = VM_PROT_READ; + if ((phdr->p_flags & PF_W) != 0) + nprot |= VM_PROT_WRITE; + if ((phdr->p_flags & PF_X) != 0) + nprot |= VM_PROT_EXECUTE; + } error = pmap_change_prot((vm_offset_t)ef->address + - phdr->p_vaddr, round_page(phdr->p_memsz), nprot); + phdr->p_vaddr, round_page(phdr->p_memsz), prot | nprot); if (error != 0) break; } @@ -834,6 +837,18 @@ preload_protect(elf_file_t ef, vm_prot_t prot) #endif } +static int +preload_protect(elf_file_t ef, vm_prot_t prot) +{ + return (preload_protect1(ef, prot, false)); +} + +static int +preload_protect_reset(elf_file_t ef, vm_prot_t prot) +{ + return (preload_protect1(ef, prot, true)); +} + #ifdef __arm__ /* * Locate the ARM exception/unwind table info for DDB and stack(9) use by @@ -1396,7 +1411,7 @@ link_elf_unload_file(linker_file_t file) elf_cpu_unload_file(file); if (ef->preloaded) { - link_elf_unload_preload(file); + link_elf_unload_preload(ef); return; } @@ -1417,11 +1432,16 @@ link_elf_unload_file(linker_file_t file) } static void -link_elf_unload_preload(linker_file_t file) +link_elf_unload_preload(elf_file_t ef) { + /* + * Reset mapping protections to their original state. This affects the + * direct map alias of the module mapping as well. + */ + preload_protect_reset(ef, VM_PROT_RW); - if (file->pathname != NULL) - preload_delete_name(file->pathname); + if (ef->lf.pathname != NULL) + preload_delete_name(ef->lf.pathname); } static const char * diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index a3a53a39bfd6..4128baa5a909 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1305,6 +1305,20 @@ link_elf_unload_file(linker_file_t file) vnet_data_free(ef->progtab[i].addr, ef->progtab[i].size); #endif + else if (ef->preloaded) { + vm_offset_t start, end; + + start = (vm_offset_t)ef->progtab[i].addr; + end = start + ef->progtab[i].size; + + /* + * Reset mapping protections to their original + * state. This affects the direct map alias of + * the module mapping as well. + */ + link_elf_protect_range(ef, trunc_page(start), + round_page(end), VM_PROT_RW); + } } } if (ef->preloaded) { diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index ac327aa37b72..626632b74add 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -953,14 +953,6 @@ kmem_bootstrap_free(vm_offset_t start, vm_size_t size) end = trunc_page(start + size); start = round_page(start); -#ifdef __amd64__ - /* - * Preloaded files do not have execute permissions by default on amd64. - * Restore the default permissions to ensure that the direct map alias - * is updated. - */ - pmap_change_prot(start, end - start, VM_PROT_RW); -#endif for (va = start; va < end; va += PAGE_SIZE) { pa = pmap_kextract(va); m = PHYS_TO_VM_PAGE(pa); From nobody Tue Jan 6 21:32:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm4C83dshz6MlHs for ; Tue, 06 Jan 2026 21:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm4C82pHvz3Vl4 for ; Tue, 06 Jan 2026 21:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767735172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ErEYhc2XtTcNh/AbTM5IT99+qpEuZC+l8Z/6vsm8t+Y=; b=YMK4mTMuG5BPQx14U3rJf4cig64uWPMa6uxFHQ4jvE96Qazy5GObhZXUIf3rAYF9kcnRQb 38Xp9VwCSHX3Xg3H51kR0/4yAl9LcaOjG3PuJotKMyc6nk1jqv0ktIi7q+5cyQrMlaBq7G yDLjzhK6iXcavd/bEL0xKhnJ+wn6DQ/cw9lg7yN9LiDbrD3g2XeAbeGCcR8a+EyzV8pc/4 u4S6i19RmMLfcPRfYGVGu3JHdyZQp8sHfTGUPiFDWU97eRRwBbhd/Typ7yAom0Mn876ZLe cC6dU5olsV76FxnCoXFPaxvLmbHM7tT03iWaoHFJPaVL04QjRi+1JPQNZV39Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767735172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ErEYhc2XtTcNh/AbTM5IT99+qpEuZC+l8Z/6vsm8t+Y=; b=rrPaSB9NF7WUKE2eUEHxvvluuJCeuEqxWfvtqCriGxJk678/5zFB0id/6kAbegbyeKtJXM oR7nLjkAwcabaiL7e8MGI4LbIU41x9bfs5xQyJ56lqkJywUVcR2QmZ7ThzUJOSEeiuqArS g2Gv3/Bhx9Vj+CdsdgQDI40xdU5mFSMT9gDnxgTIcFyC2u/uwBVntchR2sLrKYYWFW0Gdz gZMfkjGDVCZdTna+OOTnzZwfTSEDen/UHzNlQoprrQIxF/YP1qbU/cjh5VwWeNh2U9fH8Z ZH2Eo2nOlhmV6UCLlJI9/KK8KEJ3edche2hW+gNt08jk13h/pXNc3Xvib981lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767735172; a=rsa-sha256; cv=none; b=XWx6H5U1ZCqz3UoImf62QBWyFIbsdFBofQ8GU0KNhfMjemEZyyMCiluV1yjkuONiTNAKtb EBNYKVqQ1uKDSHvhi0B023zgFSR9xZ7/Yz/lfPoroLolrgJY/7028FXu3EP6NkmBn9U6WJ HICNLBM/v/6C7a4RalvF4Uh7h0oNLQxkw/P+3UL/2TqyuHrtTGRgIBlp2G+xGJDNGrWIJb iSShMq+xa9G1VYVATqW3tF6wpb1iAvh79K/nIr5Oo2bmf6/xEVO3uiE/J9GGQT6NeLbib6 CUIi5NaSzKOQH/HsLo/KfveovZ0Yaze6Xd0UBAHFyRL9cy7UdIap44npjZuiRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm4C82Gyfz8Mf for ; Tue, 06 Jan 2026 21:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c962 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 21:32:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: ccec94bf63de - main - mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccec94bf63de8ee067b03b981a283d9f968c3667 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 21:32:52 +0000 Message-Id: <695d7f84.c962.7001b4bb@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=ccec94bf63de8ee067b03b981a283d9f968c3667 commit ccec94bf63de8ee067b03b981a283d9f968c3667 Author: Michael Osipov AuthorDate: 2026-01-06 20:31:24 +0000 Commit: Michael Osipov CommitDate: 2026-01-06 21:32:26 +0000 mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54566 --- share/man/man4/mrsas.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 5f7a0e6e45ea..c128717600c0 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -35,7 +35,7 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd August 22, 2025 +.Dd January 6, 2026 .Dt MRSAS 4 .Os .Sh NAME @@ -151,6 +151,7 @@ driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s .It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s .It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s +.It Fujitsu D3116 Ta Thunderbolt Ta 6Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific From nobody Tue Jan 6 22:46:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm5qw5Hhvz6MqDN for ; Tue, 06 Jan 2026 22:46: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm5qw4cD3z3mF2 for ; Tue, 06 Jan 2026 22:46:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767739580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7s+GxGrno2CPogzdfcMgjt4AVX7O/f3qccwuxnOD1wk=; b=OY5dIX7FHycLFtk0vinWXvqn29rN1s0ahyNjgdf0BCfnEuvqGpshK4JYUek275vxkSLFKk ykwzJVuUxaTihuk+suRjdIgofa6ox3gdhFpME+WeGKRUbL1a6LlwFEwqo4z+br1ZNHnU9x mUqpRJkcLk5bj2Cgj/KhUgKUt3rWTML4NQ/aFz9BwmH5pbCwH6crgkrPijMfzK6I8+pUJG xUGcCr7QOHv2KKzZij+vYhq2gOUo3uOlYv4skbAIJ80w5zWBKL+/v/AfCgt4hRah7mwaZI RTThzY1w2HK4j1nflG/ZVh8iqU1keChmUXZmXulkhHkYQlSTgniDLcu77b9T9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767739580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7s+GxGrno2CPogzdfcMgjt4AVX7O/f3qccwuxnOD1wk=; b=u2BLMbDF0kRA4csCOQGWs1oDZcW0pI+6VnwtWVuGleTklLGPCFIByaniVwjSQjEymLfvkT fRnHbbgqh1mMIo6Yygdp6LW9leGJ2/w7V0obgSwDAvoCStKfmExPJmjbB8LZ6mMDJZNW8g lz1OU4N69FiRhJDfjZGMVemYUFXm3TLHBanlxU0qzD1ThdPrnkWXLv5341N1iTIZj8wUGJ lRME/LjAKF9xaHS5zpajwJD/fSGsYXuhTgveYJhZPbEk7q201LUFzgrhwAukkwDZgt96iY 5v424WtCsrkd9pY55ujCRxXOILizEMpvhhUA28xxsxyRWcXWgxaQqcVaNRxAEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767739580; a=rsa-sha256; cv=none; b=xoLpYgcy5vLCb7rCJQtMU3IGHUG8gJoBFeKzSwa9yl93tm5SwDz/MKZudG0U5BgFBsjrOb vtWtlvMGakAEbCOq3VUXiadKnZUjq+lSymnspahtnnlx3NLEJ4eo/WXfm/0B8ETmQPHu9j PO/foNuacZasy5y414KRv2CpMd1G62tGv/JG7NvIIY7/NivnNMDNXRjsU9Oa9yLFm7awcx MJb3aVpfIksk+Ba0CDM94nYLA4KsZ+vtS/zKLr8UuPd8leVk7orbwOBAlL6TCJDK6ifeXj v+NKcG/g02cBakj71C1WiXhfUX0tsK9n1L7jXvBA+5+gV84gORa6QNBNgNuDVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm5qw3fyQzBKT for ; Tue, 06 Jan 2026 22:46:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2585d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 22:46:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 83e6f0d7807b - main - iflib: document new sysctls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83e6f0d7807b4ebc74bc58e6f03adde56db942bf Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 22:46:20 +0000 Message-Id: <695d90bc.2585d.122d546b@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=83e6f0d7807b4ebc74bc58e6f03adde56db942bf commit 83e6f0d7807b4ebc74bc58e6f03adde56db942bf Author: Andrew Gallatin AuthorDate: 2026-01-06 22:43:24 +0000 Commit: Andrew Gallatin CommitDate: 2026-01-06 22:46:12 +0000 iflib: document new sysctls Document the new tx related sysctls I've added to iflib in the last few months: tx_reclaim_ticks & tx_reclaim_thresh Sponsored by: Netflix Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D54564 MFC after: 3 days --- share/man/man4/iflib.4 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4 index 2040698f0087..66395bfe5dfc 100644 --- a/share/man/man4/iflib.4 +++ b/share/man/man4/iflib.4 @@ -94,6 +94,16 @@ If set to a non-zero value, task returns immediately and the transmit ring is serviced by a different task. This returns control to the caller faster and under high receive load, may result in fewer dropped RX frames. +.It Va tx_reclaim_thresh +Controls the threshold in packets before iflib will ask the driver +how many transmitted packets can be reclaimed. +Determining how many many packets can be reclaimed can be expensive +on some drivers. +.It Va tx_reclaim_ticks +Controls the time in ticks before iflib will ask the driver +how many transmitted packets can be reclaimed. +Determining how many many packets can be reclaimed can be expensive +on some drivers. .It Va rx_budget Sets the maximum number of frames to be received at a time. Zero (the default) indicates the default (currently 16) should be used. From nobody Tue Jan 6 22:49:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm5vF6bCFz6MqYN for ; Tue, 06 Jan 2026 22:49: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm5vF620Qz3mb3 for ; Tue, 06 Jan 2026 22:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767739753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3kdF1S/sJl4GRTIksM0pjV+gmobwKdVJFdcmgbTOiV8=; b=xODcEJulnvl1D4ur+zwrqAKYS9Xlq866RCdSwObk7+fNG530s9J4oD0m6aQcKz2RwCD5Ky 1vqnOOAZ6SPdmnMJZTytkVQmBOzF5fmWtuOrfNQQpJBvtS6tKTiLetaeilEWQRlKPzhbAu B8BseEoE3KwhqzxCC+Uv4f4AHVKmIm4tB0Yk9R/l6e64I6T9TL4YgAFhVmCWWiv4DYiYG2 nxUziRUJuMovhaPtNDnOCWx5cNC7rT7yhmPNTif2GAVdTSemMR0CwLAI/Cg7SnutC7TQFz 2ULq3bA6oYpHHrYUGOMduRazsqhKWAU3ZN50C11WkUjPwhWnwG+fJl4+PALoWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767739753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3kdF1S/sJl4GRTIksM0pjV+gmobwKdVJFdcmgbTOiV8=; b=CXwteCJ3v2UKZ6K8oW0CZOoQniUOgiiZ2pkuNdZYFfU8nx1N0Ekkxc19uKVzV5bftdTnMJ j65RjdytM1ztQOZZliIsTnWTImD3XZ8u7VTP9SqCqZK1ePpCQ2odb+9jCaY2pYj6tWpLEp 2+EgUQsH2jFm1ky5iA+rx4n98uDtsesmAU4uVL03530s9BCtpWfBhYxLP8cmtjXmlHEOos qDz9qbTOXy/txHv73J8qC8LrcvdJfkPSPpY4UNCY/6hdvNqbbaG8G9CRMjLFXVasZ4jhgu aqwArwYk0c3jpRmKLEFFnCPIO3kyXWzZ0LHXVM1fu/2e6qb+mqwStkiXaalYJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767739753; a=rsa-sha256; cv=none; b=iAxj6vS2nk+hrA5Lk0dgbwgQXm5dOHpuVrIQR5LmfyRzSZenq5cJxmwN2jgrFmAfpEE6b1 s5z7JL5xN+sZc1OZ+E+bSZJSvDW3Qmbt8y28jQyahvoOPwFkSOyjCcvY0sCrTy4/28eLxF pBgKLPvRRKXT+e3DClGFWPlmmilxSPmwd+PMbEzn+4WPM7xLJ+2UUbK3YT8eQSyttwxugN RwJBm0pPum5jIh+/Sr4THf+ADpCOUuwEuJjrEeb0FjlGLoFDzU8B5Ezaaw+Di1lw7Y6APt r/xB8nxUeJD6Ctgg7u33yVz5xxh41CUJm+p3BCgPXRqmCLtYTs/ysjnPdx7cZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm5vF56bPzBMs for ; Tue, 06 Jan 2026 22:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25e7c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 22:49:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 1961785e3548 - main - pxeboot.8: Fix mdoc typo for emails, tag spdx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1961785e35484a89e49672c5ac7f9da6a7f56b3c Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 22:49:13 +0000 Message-Id: <695d9169.25e7c.5ece20b4@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=1961785e35484a89e49672c5ac7f9da6a7f56b3c commit 1961785e35484a89e49672c5ac7f9da6a7f56b3c Author: Alexander Ziaee AuthorDate: 2026-01-06 22:45:42 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-06 22:47:54 +0000 pxeboot.8: Fix mdoc typo for emails, tag spdx Fixes: a37825313f62 (Fix mdoc typos for emails, tag spdx) MFC after: 3 days --- stand/i386/pxeldr/pxeboot.8 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stand/i386/pxeldr/pxeboot.8 b/stand/i386/pxeldr/pxeboot.8 index e10e570edf54..496b244cf00f 100644 --- a/stand/i386/pxeldr/pxeboot.8 +++ b/stand/i386/pxeldr/pxeboot.8 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 Doug White .\" All rights reserved. .\" @@ -142,8 +145,8 @@ bootloader first appeared in The .Nm bootloader was written by -.An John Baldwin Aq jhb@FreeBSD.org +.An John Baldwin Aq Mt jhb@FreeBSD.org and -.An Paul Saab Aq ps@FreeBSD.org . +.An Paul Saab Aq Mt ps@FreeBSD.org . This manual page was written by -.An Doug White Aq dwhite@FreeBSD.org . +.An Doug White Aq Mt dwhite@FreeBSD.org . From nobody Wed Jan 7 01:27:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm9PZ5jBNz6N1lH for ; Wed, 07 Jan 2026 01:27: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm9PZ2zGXz3DbD for ; Wed, 07 Jan 2026 01:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767749234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0G7J3uTr1uFBVUkeTLo/+rX5Z+Zvu7Nbw11ScJV+AMg=; b=dqTv7ydMeMy27AV06YrsZjc2RvCEwtEs4/pf9RJSi7tCNTWR0Zx9T8zvAy0mbLt3rmoH7j BIF2AYKNjxJfqumF+3ZYmnYmlFeJzZwipJ+Jwod4Gm7bTi216fyo9fTgE/EcaXg5EZuIBy 3vDDorOxDRhYL6JRCWkdYlikRVxlllxshBDClrPQ3ZvDnreaUGKcQUFHFh0LcFcCGKbaGF NDd6sJdvl+/nMhTuK+gri6ZoHTUt4L5HER2RLWXHQsE8vyRjjVywlw5V2e+ez1cjcoLZGY w8YY0mzAR/R4798lVE6qQFUzdiOiJzgykKTyDjVVefVRa16kogS+m9FyZMd7/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767749234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0G7J3uTr1uFBVUkeTLo/+rX5Z+Zvu7Nbw11ScJV+AMg=; b=WM6oCmZJAx/oS9MoA+z2p3aTiBF9XXw6katedDg55M9VYYAkRuQJQHfS5SWawFIvMtKKhU DBP0EVLGPGkO+UAhpc8IfGQ50c1WA3dc40+widNSDWdn/EmaAIzKcsRQo4pP17d5JgO6uW XZsCq7GOLYi4WF5gRmpmpiNBkl535Rjg1AzY6Aab40GblNs4UvJ/GvPrVyW8asIAuSLKXu 0+vsSmGmGVdAJKb9ilQscRkbVhDpIyimd5F12YJfpxMB//2tm0OrEfXysupjf8Z1kypWue FIkFpWNLaqK05tGtD708guYxPsjUfda5TmRVkmhZS+BApGk2x1zFCIfK65TxxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767749234; a=rsa-sha256; cv=none; b=D7I0THc3qwIG6Va8z8GPS6dhlpNDoqZ3Rm/CNOFnbNXl7VIADIUzT+hxQFwdrva5S9Lpgd JZBormmbeH7j/TfngT8Q7v2rXL3XTB8BN5gOEvLmhBr/eIPGhEvNjhUS0mhxuAwD6NjQmo 4lzjg1AVyUqKOWQGygIpeoJP9i+ZalnERDLVkbClwwuHI0atuW4C2PFyLcH40JUL9wES4C kmuQV/VgOJo0GHcewPo3IMKtjOSx90F2R3D5X8btaLJbqOr0xlZi6B/bWEGe6zm5Aoep9T 4z9csBmgO+r0eQ22it4P97Max5HHdF/00WjNXZp5P9YRlip7DxKxIIDQtxe9Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm9PZ1gqNzXML for ; Wed, 07 Jan 2026 01:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cb30 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 01:27:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: f441a225c4eb - main - stdbool.h: Update for C23 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f441a225c4eb56deff1edc2402fe85a0ae263ebd Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 01:27:14 +0000 Message-Id: <695db672.3cb30.335611b2@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f441a225c4eb56deff1edc2402fe85a0ae263ebd commit f441a225c4eb56deff1edc2402fe85a0ae263ebd Author: Minsoo Choo AuthorDate: 2026-01-06 19:57:27 +0000 Commit: Ed Maste CommitDate: 2026-01-07 01:26:59 +0000 stdbool.h: Update for C23 When a compiler with C23 or higher is detected, builtin bool, true, and false are used to conform the C23 standard. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44664 --- include/stdbool.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/stdbool.h b/include/stdbool.h index a03835ca6962..968967a4cfa6 100644 --- a/include/stdbool.h +++ b/include/stdbool.h @@ -26,15 +26,19 @@ * SUCH DAMAGE. */ +#ifndef __STDC_VERSION_STDBOOL_H__ +#define __STDC_VERSION_STDBOOL_H__ 202311L + #ifndef __bool_true_false_are_defined #define __bool_true_false_are_defined 1 -#ifndef __cplusplus +#if (__STDC_VERSION__ < 202311L) && !defined(__cplusplus) #define false 0 #define true 1 #define bool _Bool -#endif /* !__cplusplus */ +#endif /* (__STDC_VERSION__ < 202311L) && !defined(__cplusplus) */ #endif /* __bool_true_false_are_defined */ +#endif /* __STDC_VERSION_STDBOOL_H__ */ From nobody Wed Jan 7 02:27:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmBlM0M7xz6N5PN for ; Wed, 07 Jan 2026 02:27: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmBlL4nm3z3M7q for ; Wed, 07 Jan 2026 02:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767752862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bsdxubGzY2ZeQrNeLkKp2YG/E9P109i8GPOpMqDxSa8=; b=i83OsLbN9k+C9HnEgBmwzgZ7oJlSyN3IwlTG4TLki9/x2Iv5w3HPRyItMISo9U95+n5xlf f7GbUOThx9fV69aopMz28giTAwdxFscs9UiX5sECzKCwt4r3xHXi0FZwVZ7/GSYPQcrm9I bZs1OYqIfAuCSv0Ywi2HCXjviYvEkqXMeyzxzT+I9/aO7tWm72Hc3hH+wcjETB4Pw2MC3y slCp0DyVCkD/pRPVZdSjQRFB7zrW9jVDqvopaI9RZYpv8UywY0NF4dCTEQ4gfbRrwS/4an hMjmUmkq1JfrRxZovr4r82uzvcojXKR95RSccA5ZJjj4Vc84TCQTqPnxu2m4Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767752862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bsdxubGzY2ZeQrNeLkKp2YG/E9P109i8GPOpMqDxSa8=; b=M/xIZTvlNeItau8X8eDSP+jRb5sVSyuWL03q8JHxyA20e7Oqv+w9aqi/RuqR1zpqYiqUiq 02zjDCs+xr/kQaGxLepB07jqIVEb1+Ty61oXOF22LmEDBV7OKrfNjPtOJKOSBmdok4KiTc gOPJLv7Rb1eycVyxo0fwA99KoLehV7lhB/Kg1/OInRyPEmzT558jab2dlP1tE//euRQKn9 nidA9C8iDBNkTdAVq9z0osln0Jj4pbvUJciF2Zxf3NnzA8U0S2OKZ1z+IFx2ZqL6TyAW8Y IRhzj+cMNVb9y4RgwAOISgN4f1ov3WZIr8BQAZwwRRCyd9WJw5bfW80KHLWd4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767752862; a=rsa-sha256; cv=none; b=DHSK1mVyPM3rTI+lyeGV+wnIp0mtSLgUllIrXpFnODPFomgURuUIjRHjv3lyQFUZmentMX PWJcPPbOjUMaBjFdtWw0ci6X61+4rI2nIvnuFVu0yCMU5B0MNlOGPzcHn3pchsGQf8EB1o 903dPORAIsRbokK5upkwEsc+nv69NkkbsR81TPJq/2sFYZnwD8c0FGmyWbMqSit0FCGfVG Gqb7bwg3iMDS4VMLBuJhymM4fdQx8mPg0W8YAjugTsKJuSoKoGt3UATDmFFVgAlJKoTw0y o5K8m9aJy4UBZQ0zA/cBB+xqfHOwvxEepEm2q+J7q9wkMbK2rDp7gOSaCMJgKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmBlL3w6mzZNj for ; Wed, 07 Jan 2026 02:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id bce3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 02:27:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Brad Smith From: Adrian Chadd Subject: git: 5d73fca1f4b2 - main - if_rge: sync with up to date OpenBSD code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d73fca1f4b2bac8833e2b9233fa496059dab745 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 02:27:42 +0000 Message-Id: <695dc49e.bce3.2bfd309f@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=5d73fca1f4b2bac8833e2b9233fa496059dab745 commit 5d73fca1f4b2bac8833e2b9233fa496059dab745 Author: Brad Smith AuthorDate: 2026-01-07 02:24:12 +0000 Commit: Adrian Chadd CommitDate: 2026-01-07 02:27:09 +0000 if_rge: sync with up to date OpenBSD code a0b4d9e5bd63984bc3ad25b7f2881741e0d73980 Add support for RTL8126 chip revision 0x64a00000 from Carl Henriksson. While here, update and add microcode for the RTL8126 chipset variant. 46810ff569a9416642fc5f8e86501028008a2e95 For RTL8125, there's no need to check whether RGE_CMD_STOPREQ has been completed. As with other chip variants, RGE_CMD_STOPREQ never acknowledges completion. 5729fb17b5eeba56781da0b5c0525c198c5c2cd8 remove duplicate RGE_PHYSTAT_5000MBPS test Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54517 Obtained from: OpenBSD --- sys/dev/rge/if_rge.c | 31 +- sys/dev/rge/if_rge_hw.c | 297 +- sys/dev/rge/if_rge_microcode.h | 10791 +++++++++++++-------------------------- sys/dev/rge/if_rgereg.h | 6 +- sys/dev/rge/if_rgevar.h | 3 +- 5 files changed, 3779 insertions(+), 7349 deletions(-) diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c index 41a39f5bfb60..fde8e9df31fe 100644 --- a/sys/dev/rge/if_rge.c +++ b/sys/dev/rge/if_rge.c @@ -415,8 +415,12 @@ rge_attach(device_t dev) // device_printf(dev, "RTL8125B\n"); break; case 0x64900000: - sc->rge_type = MAC_R26; -// device_printf(dev, "RTL8126\n"); + sc->rge_type = MAC_R26_1; +// device_printf(dev, "RTL8126_1\n"); + break; + case 0x64a00000: + sc->rge_type = MAC_R26_2; +// device_printf(dev, "RTL8126_2\n"); break; case 0x68800000: sc->rge_type = MAC_R25D; @@ -1165,7 +1169,7 @@ rge_init_locked(struct rge_softc *sc) val = rge_read_csi(sc, 0x70c) & ~0x3f000000; rge_write_csi(sc, 0x70c, val | 0x27000000); - if (sc->rge_type == MAC_R26 || sc->rge_type == MAC_R27) { + if (RGE_TYPE_R26(sc) || sc->rge_type == MAC_R27) { /* Disable L1 timeout. */ val = rge_read_csi(sc, 0x890) & ~0x00000001; rge_write_csi(sc, 0x890, val); @@ -1184,7 +1188,7 @@ rge_init_locked(struct rge_softc *sc) RGE_MAC_SETBIT(sc, 0xeb58, 0x0001); - if (sc->rge_type == MAC_R26 || sc->rge_type == MAC_R27) { + if (RGE_TYPE_R26(sc) || sc->rge_type == MAC_R27) { RGE_CLRBIT_1(sc, 0xd8, 0x02); if (sc->rge_type == MAC_R27) { RGE_CLRBIT_1(sc, 0x20e4, 0x04); @@ -1199,7 +1203,7 @@ rge_init_locked(struct rge_softc *sc) rge_write_mac_ocp(sc, 0xe614, val | 0x0300); else if (sc->rge_type == MAC_R25B) rge_write_mac_ocp(sc, 0xe614, val | 0x0200); - else if (sc->rge_type == MAC_R26) + else if (RGE_TYPE_R26(sc)) rge_write_mac_ocp(sc, 0xe614, val | 0x0300); else rge_write_mac_ocp(sc, 0xe614, val | 0x0f00); @@ -1252,7 +1256,7 @@ rge_init_locked(struct rge_softc *sc) RGE_MAC_CLRBIT(sc, 0xe080, 0x0002); } - if (sc->rge_type == MAC_R26 || sc->rge_type == MAC_R27) + if (RGE_TYPE_R26(sc) || sc->rge_type == MAC_R27) RGE_MAC_CLRBIT(sc, 0xea1c, 0x0304); else RGE_MAC_CLRBIT(sc, 0xea1c, 0x0004); @@ -1282,12 +1286,12 @@ rge_init_locked(struct rge_softc *sc) RGE_WRITE_4(sc, RGE_TIMERINT3, 0); num_miti = - (sc->rge_type == MAC_R25B || sc->rge_type == MAC_R26) ? 32 : 64; + (sc->rge_type == MAC_R25B || RGE_TYPE_R26(sc)) ? 32 : 64; /* Clear interrupt moderation timer. */ for (i = 0; i < num_miti; i++) RGE_WRITE_4(sc, RGE_INTMITI(i), 0); - if (sc->rge_type == MAC_R26) { + if (RGE_TYPE_R26(sc)) { RGE_CLRBIT_1(sc, RGE_INT_CFG0, RGE_INT_CFG0_TIMEOUT_BYPASS | RGE_INT_CFG0_RDU_BYPASS_8126 | RGE_INT_CFG0_MITIGATION_BYPASS); @@ -1439,7 +1443,7 @@ rge_ifmedia_upd(if_t ifp) /* Disable Gigabit Lite. */ RGE_PHY_CLRBIT(sc, 0xa428, 0x0200); RGE_PHY_CLRBIT(sc, 0xa5ea, 0x0001); - if (sc->rge_type == MAC_R26 || sc->rge_type == MAC_R27) + if (RGE_TYPE_R26(sc) || sc->rge_type == MAC_R27) RGE_PHY_CLRBIT(sc, 0xa5ea, 0x0007); val = rge_read_phy_ocp(sc, 0xa5d4); @@ -1447,7 +1451,8 @@ rge_ifmedia_upd(if_t ifp) case MAC_R27: val &= ~RGE_ADV_10000TFDX; /* fallthrough */ - case MAC_R26: + case MAC_R26_1: + case MAC_R26_2: val &= ~RGE_ADV_5000TFDX; /* fallthrough */ default: @@ -1461,7 +1466,7 @@ rge_ifmedia_upd(if_t ifp) switch (IFM_SUBTYPE(ifm->ifm_media)) { case IFM_AUTO: val |= RGE_ADV_2500TFDX; - if (sc->rge_type == MAC_R26) + if (RGE_TYPE_R26(sc)) val |= RGE_ADV_5000TFDX; else if (sc->rge_type == MAC_R27) val |= RGE_ADV_5000TFDX | RGE_ADV_10000TFDX; @@ -1543,8 +1548,6 @@ rge_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) ifmr->ifm_active |= IFM_2500_T; else if (status & RGE_PHYSTAT_5000MBPS) ifmr->ifm_active |= IFM_5000_T; - else if (status & RGE_PHYSTAT_5000MBPS) - ifmr->ifm_active |= IFM_5000_T; else if (status & RGE_PHYSTAT_10000MBPS) ifmr->ifm_active |= IFM_10G_T; } @@ -2453,7 +2456,7 @@ rge_add_media_types(struct rge_softc *sc) ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_2500_T, 0, NULL); ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_2500_T | IFM_FDX, 0, NULL); - if (sc->rge_type == MAC_R26) { + if (RGE_TYPE_R26(sc)) { ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_5000_T, 0, NULL); ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_5000_T | IFM_FDX, 0, NULL); diff --git a/sys/dev/rge/if_rge_hw.c b/sys/dev/rge/if_rge_hw.c index 17edad950f72..ccd6580b2cfc 100644 --- a/sys/dev/rge/if_rge_hw.c +++ b/sys/dev/rge/if_rge_hw.c @@ -67,13 +67,15 @@ static int rge_reset(struct rge_softc *sc); static void rge_set_phy_power(struct rge_softc *sc, int on); -static uint64_t rge_mcu_get_bin_version(uint16_t entries); +static void rge_mac_config_ext_mcu(struct rge_softc *, enum rge_mac_type); +static uint64_t rge_mcu_get_bin_version(const uint16_t *, uint16_t); static void rge_mcu_set_version(struct rge_softc *sc, uint64_t mcodever); static void rge_ephy_config_mac_r25(struct rge_softc *sc); static void rge_ephy_config_mac_r25b(struct rge_softc *sc); static void rge_ephy_config_mac_r27(struct rge_softc *sc); static void rge_phy_config_mac_r27(struct rge_softc *sc); -static void rge_phy_config_mac_r26(struct rge_softc *sc); +static void rge_phy_config_mac_r26_1(struct rge_softc *sc); +static void rge_phy_config_mac_r26_2(struct rge_softc *sc); static void rge_phy_config_mac_r25(struct rge_softc *sc); static void rge_phy_config_mac_r25b(struct rge_softc *sc); static void rge_phy_config_mac_r25d(struct rge_softc *sc); @@ -104,18 +106,7 @@ rge_reset(struct rge_softc *sc) RGE_SETBIT_1(sc, RGE_PPSW, 0x08); RGE_SETBIT_1(sc, RGE_CMD, RGE_CMD_STOPREQ); - if (sc->rge_type == MAC_R25) { - for (i = 0; i < 20; i++) { - DELAY(10); - if (!(RGE_READ_1(sc, RGE_CMD) & RGE_CMD_STOPREQ)) - break; - } - if (i == 20) { - RGE_PRINT_ERROR(sc, "failed to stop all requests\n"); - return ETIMEDOUT; - } - } else - DELAY(200); + DELAY(200); for (i = 0; i < 3000; i++) { DELAY(50); @@ -197,7 +188,6 @@ rge_set_phy_power(struct rge_softc *sc, int on) void rge_mac_config_mcu(struct rge_softc *sc, enum rge_mac_type type) { - uint64_t mcodever; uint16_t reg; int i, npages; @@ -278,19 +268,82 @@ rge_mac_config_mcu(struct rge_softc *sc, enum rge_mac_type type) rge_write_mac_ocp(sc, 0xfc26, 0x8000); rge_write_mac_ocp(sc, 0xfc28, 0x14a2); rge_write_mac_ocp(sc, 0xfc48, 0x0001); + } +} + +void +rge_mac_config_ext_mcu(struct rge_softc *sc, enum rge_mac_type type) +{ + const struct rge_mac_bps *bps; + uint64_t mcodever = 0; + int i; + + /* Read microcode version. */ + rge_switch_mcu_ram_page(sc, 2); + sc->rge_mcodever = 0; + for (i = 0; i < 8; i += 2) { + sc->rge_mcodever <<= 16; + sc->rge_mcodever |= rge_read_mac_ocp(sc, 0xf9f8 + i); + } + rge_switch_mcu_ram_page(sc, 0); + + if (type == MAC_R26_1) { + bps = &rtl8126_1_mac_bps; + mcodever = + rge_mcu_get_bin_version(rtl8126_1_mac_bps_vals, bps->count); + if (sc->rge_mcodever != mcodever) { + /* Switch to page 0. */ + rge_switch_mcu_ram_page(sc, 0); + for (i = 0; i < bps->count; i++) + rge_write_mac_ocp(sc, bps->regs[i], + bps->vals[i]); + } + rge_write_mac_ocp(sc, 0xfc26, 0x8000); + rge_write_mac_ocp(sc, 0xfc2c, 0x2360); + rge_write_mac_ocp(sc, 0xfc2E, 0x14a4); + rge_write_mac_ocp(sc, 0xfc30, 0x415e); + rge_write_mac_ocp(sc, 0xfc32, 0x41e4); + rge_write_mac_ocp(sc, 0xfc34, 0x4280); + rge_write_mac_ocp(sc, 0xfc36, 0x234a); + rge_write_mac_ocp(sc, 0xfc48, 0x00fc); + } else if (type == MAC_R26_2) { + bps = &rtl8126_2_mac_bps; + mcodever = + rge_mcu_get_bin_version(rtl8126_2_mac_bps_vals, bps->count); + if (sc->rge_mcodever != mcodever) { + /* Switch to page 0. */ + rge_switch_mcu_ram_page(sc, 0); + for (i = 0; i < 256; i++) + rge_write_mac_ocp(sc, bps->regs[i], + bps->vals[i]); + /* Switch to page 1. */ + rge_switch_mcu_ram_page(sc, 1); + for (; i < bps->count; i++) + rge_write_mac_ocp(sc, bps->regs[i], + bps->vals[i]); + } + rge_write_mac_ocp(sc, 0xfc26, 0x8000); + rge_write_mac_ocp(sc, 0xfc2c, 0x14a4); + rge_write_mac_ocp(sc, 0xfc2e, 0x4176); + rge_write_mac_ocp(sc, 0xfc30, 0x41fc); + rge_write_mac_ocp(sc, 0xfc32, 0x4298); + rge_write_mac_ocp(sc, 0xfc3a, 0x234a); + rge_write_mac_ocp(sc, 0xfc48, 0x023c); } else if (type == MAC_R27) { - mcodever = rge_mcu_get_bin_version(nitems(rtl8127_mac_bps)); + bps = &rtl8127_mac_bps; + mcodever = + rge_mcu_get_bin_version(rtl8127_mac_bps_vals, bps->count); if (sc->rge_mcodever != mcodever) { /* Switch to page 0. */ rge_switch_mcu_ram_page(sc, 0); for (i = 0; i < 256; i++) - rge_write_mac_ocp(sc, rtl8127_mac_bps[i].reg, - rtl8127_mac_bps[i].val); + rge_write_mac_ocp(sc, bps->regs[i], + bps->vals[i]); /* Switch to page 1. */ rge_switch_mcu_ram_page(sc, 1); - for (; i < nitems(rtl8127_mac_bps); i++) - rge_write_mac_ocp(sc, rtl8127_mac_bps[i].reg, - rtl8127_mac_bps[i].val); + for (; i < bps->count; i++) + rge_write_mac_ocp(sc, bps->regs[i], + bps->vals[i]); } rge_write_mac_ocp(sc, 0xfc26, 0x8000); rge_write_mac_ocp(sc, 0xfc28, 0x1520); @@ -302,21 +355,21 @@ rge_mac_config_mcu(struct rge_softc *sc, enum rge_mac_type type) rge_write_mac_ocp(sc, 0xfc34, 0x1a6a); rge_write_mac_ocp(sc, 0xfc36, 0x1a2c); rge_write_mac_ocp(sc, 0xfc48, 0x00ff); - - /* Write microcode version. */ - rge_mcu_set_version(sc, mcodever); } -} + + /* Write microcode version. */ + rge_mcu_set_version(sc, mcodever); +}; static uint64_t -rge_mcu_get_bin_version(uint16_t entries) +rge_mcu_get_bin_version(const uint16_t *mac_bps, uint16_t entries) { uint64_t binver = 0; int i; for (i = 0; i < 4; i++) { binver <<= 16; - binver |= rtl8127_mac_bps[entries - 4 + i].val; + binver |= mac_bps[entries - 4 + i]; } return binver; @@ -423,7 +476,8 @@ rge_phy_config(struct rge_softc *sc) case MAC_R27: val |= RGE_ADV_10000TFDX; /* fallthrough */ - case MAC_R26: + case MAC_R26_1: + case MAC_R26_2: val |= RGE_ADV_5000TFDX; /* fallthrough */ default: @@ -457,8 +511,11 @@ rge_phy_config(struct rge_softc *sc) case MAC_R25D: rge_phy_config_mac_r25d(sc); break; - case MAC_R26: - rge_phy_config_mac_r26(sc); + case MAC_R26_1: + rge_phy_config_mac_r26_1(sc); + break; + case MAC_R26_2: + rge_phy_config_mac_r26_2(sc); break; case MAC_R27: rge_phy_config_mac_r27(sc); @@ -479,7 +536,7 @@ rge_phy_config(struct rge_softc *sc) RGE_PHY_CLRBIT(sc, 0xa5d0, (sc->rge_type == MAC_R27) ? 0x000e : 0x0006); RGE_PHY_CLRBIT(sc, 0xa6d4, 0x0001); - if (sc->rge_type == MAC_R26 || sc->rge_type == MAC_R27) + if (RGE_TYPE_R26(sc) || sc->rge_type == MAC_R27) RGE_PHY_CLRBIT(sc, 0xa6d4, 0x0002); RGE_PHY_CLRBIT(sc, 0xa6d8, 0x0010); RGE_PHY_CLRBIT(sc, 0xa428, 0x0080); @@ -764,7 +821,7 @@ rge_phy_config_mac_r27(struct rge_softc *sc) } static void -rge_phy_config_mac_r26(struct rge_softc *sc) +rge_phy_config_mac_r26_1(struct rge_softc *sc) { uint16_t val; int i; @@ -781,7 +838,7 @@ rge_phy_config_mac_r26(struct rge_softc *sc) 0x0054, 0x0322, 0x00dd, 0x03ab, 0x03dc, 0x0027, 0x000e, 0x03e5, 0x03f9, 0x0012, 0x0001, 0x03f1 }; - rge_phy_config_mcu(sc, RGE_MAC_R26_RCODE_VER); + rge_phy_config_mcu(sc, RGE_MAC_R26_1_RCODE_VER); RGE_PHY_SETBIT(sc, 0xa442, 0x0800); rge_write_phy_ocp(sc, 0xa436, 0x80bf); @@ -1043,6 +1100,147 @@ rge_phy_config_mac_r26(struct rge_softc *sc) rge_write_phy_ocp(sc, 0xb54c, val | 0x3700); } +static void +rge_phy_config_mac_r26_2(struct rge_softc *sc) +{ + uint16_t val; + int i; + static const uint16_t mac_cfg3_b87e_value[] = + { 0x03ed, 0x03ff, 0x0009, 0x03fe, 0x000b, 0x0021, 0x03f7, + 0x03b8, 0x03e0, 0x0049, 0x0049, 0x03e0, 0x03b8, 0x03f7, + 0x0021, 0x000b, 0x03fe, 0x0009, 0x03ff, 0x03ed, 0x82a0, + 0x000e, 0x03fe, 0x03ed, 0x0006, 0x001a, 0x03f1, 0x03d8, + 0x0023, 0x0054, 0x0322, 0x00dd, 0x03ab, 0x03dc, 0x0027, + 0x000e, 0x03e5, 0x03f9, 0x0012, 0x0001, 0x03f1 }; + + rge_phy_config_mcu(sc, RGE_MAC_R26_2_RCODE_VER); + + RGE_PHY_SETBIT(sc, 0xa442, 0x0800); + rge_write_phy_ocp(sc, 0xa436, 0x8183); + val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00; + rge_write_phy_ocp(sc, 0xa438, val | 0x5900); + RGE_PHY_SETBIT(sc, 0xa654, 0x0800); + RGE_PHY_SETBIT(sc, 0xb648, 0x4000); + RGE_PHY_SETBIT(sc, 0xad2c, 0x8000); + RGE_PHY_SETBIT(sc, 0xad94, 0x0020); + RGE_PHY_SETBIT(sc, 0xada0, 0x0002); + val = rge_read_phy_ocp(sc, 0xae06) & ~0xfc00; + rge_write_phy_ocp(sc, 0xae06, val | 0x7c00); + rge_write_phy_ocp(sc, 0xb87c, 0x8647); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0xe600); + rge_write_phy_ocp(sc, 0xb87c, 0x8036); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x3000); + rge_write_phy_ocp(sc, 0xb87c, 0x8078); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x3000); + rge_write_phy_ocp(sc, 0xb87c, 0x89e9); + RGE_PHY_SETBIT(sc, 0xb87e, 0xff00); + rge_write_phy_ocp(sc, 0xb87c, 0x8ffd); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0100); + rge_write_phy_ocp(sc, 0xb87c, 0x8ffe); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0200); + rge_write_phy_ocp(sc, 0xb87c, 0x8fff); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0400); + rge_write_phy_ocp(sc, 0xa436, 0x8018); + val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00; + rge_write_phy_ocp(sc, 0xa438, val | 0x7700); + rge_write_phy_ocp(sc, 0xa436, 0x8f9c); + rge_write_phy_ocp(sc, 0xa438, 0x0005); + rge_write_phy_ocp(sc, 0xa438, 0x0000); + rge_write_phy_ocp(sc, 0xa438, 0x00ed); + rge_write_phy_ocp(sc, 0xa438, 0x0502); + rge_write_phy_ocp(sc, 0xa438, 0x0b00); + rge_write_phy_ocp(sc, 0xa438, 0xd401); + rge_write_phy_ocp(sc, 0xa436, 0x8fa8); + val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00; + rge_write_phy_ocp(sc, 0xa438, val | 0x2900); + rge_write_phy_ocp(sc, 0xb87c, 0x814b); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x1100); + rge_write_phy_ocp(sc, 0xb87c, 0x814d); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x1100); + rge_write_phy_ocp(sc, 0xb87c, 0x814f); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0b00); + rge_write_phy_ocp(sc, 0xb87c, 0x8142); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0100); + rge_write_phy_ocp(sc, 0xb87c, 0x8144); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0100); + rge_write_phy_ocp(sc, 0xb87c, 0x8150); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0100); + rge_write_phy_ocp(sc, 0xb87c, 0x8118); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0700); + rge_write_phy_ocp(sc, 0xb87c, 0x811a); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0700); + rge_write_phy_ocp(sc, 0xb87c, 0x811c); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0500); + rge_write_phy_ocp(sc, 0xb87c, 0x810f); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0100); + rge_write_phy_ocp(sc, 0xb87c, 0x8111); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0100); + rge_write_phy_ocp(sc, 0xb87c, 0x811d); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0100); + RGE_PHY_SETBIT(sc, 0xad1c, 0x0100); + val = rge_read_phy_ocp(sc, 0xade8) & ~0xffc0; + rge_write_phy_ocp(sc, 0xade8, val | 0x1400); + rge_write_phy_ocp(sc, 0xb87c, 0x864b); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x9d00); + rge_write_phy_ocp(sc, 0xb87c, 0x862c); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x1200); + rge_write_phy_ocp(sc, 0xa436, 0x8566); + rge_write_phy_ocp(sc, 0xa438, 0x003f); + rge_write_phy_ocp(sc, 0xa438, 0x3f02); + rge_write_phy_ocp(sc, 0xa438, 0x023c); + rge_write_phy_ocp(sc, 0xa438, 0x3b0a); + rge_write_phy_ocp(sc, 0xa438, 0x1c00); + rge_write_phy_ocp(sc, 0xa438, 0x0000); + rge_write_phy_ocp(sc, 0xa438, 0x0000); + rge_write_phy_ocp(sc, 0xa438, 0x0000); + rge_write_phy_ocp(sc, 0xa438, 0x0000); + RGE_PHY_SETBIT(sc, 0xad9c, 0x0020); + rge_write_phy_ocp(sc, 0xb87c, 0x8122); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0c00); + rge_write_phy_ocp(sc, 0xb87c, 0x82c8); + for (i = 0; i < 20; i++) + rge_write_phy_ocp(sc, 0xb87e, mac_cfg3_b87e_value[i]); + rge_write_phy_ocp(sc, 0xb87c, 0x80ef); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x0c00); + for (; i < nitems(mac_cfg3_b87e_value); i++) + rge_write_phy_ocp(sc, 0xb87e, mac_cfg3_b87e_value[i]); + RGE_PHY_SETBIT(sc, 0xa430, 0x0003); + val = rge_read_phy_ocp(sc, 0xb54c) & ~0xffc0; + rge_write_phy_ocp(sc, 0xb54c, val | 0x3700); + RGE_PHY_SETBIT(sc, 0xb648, 0x0040); + rge_write_phy_ocp(sc, 0xb87c, 0x8082); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x5d00); + rge_write_phy_ocp(sc, 0xb87c, 0x807c); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x5000); + rge_write_phy_ocp(sc, 0xb87c, 0x809d); + val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00; + rge_write_phy_ocp(sc, 0xb87e, val | 0x5000); +} + static void rge_phy_config_mac_r25(struct rge_softc *sc) { @@ -1404,10 +1602,20 @@ rge_phy_config_mcu(struct rge_softc *sc, uint16_t rcodever) for (; i < nitems(mac_r25d_mcu); i++) rge_write_phy_ocp(sc, mac_r25d_mcu[i].reg, mac_r25d_mcu[i].val); - } else if (sc->rge_type == MAC_R26) { - for (i = 0; i < nitems(mac_r26_mcu); i++) + } else if (sc->rge_type == MAC_R26_1) { + for (i = 0; i < 6989; i++) + rge_write_phy_ocp(sc, + mac_r26_1_mcu[i].reg, mac_r26_1_mcu[i].val); + rge_patch_phy_mcu(sc, 0); + + rge_patch_phy_mcu(sc, 1); + for (; i < nitems(mac_r26_1_mcu); i++) rge_write_phy_ocp(sc, - mac_r26_mcu[i].reg, mac_r26_mcu[i].val); + mac_r26_1_mcu[i].reg, mac_r26_1_mcu[i].val); + } else if (sc->rge_type == MAC_R26_2) { + for (i = 0; i < nitems(mac_r26_2_mcu); i++) + rge_write_phy_ocp(sc, + mac_r26_2_mcu[i].reg, mac_r26_2_mcu[i].val); } else if (sc->rge_type == MAC_R27) { for (i = 0; i < 1887; i++) rge_write_phy_ocp(sc, @@ -1472,7 +1680,6 @@ static void rge_hw_init(struct rge_softc *sc) { uint16_t reg; - int i; RGE_ASSERT_LOCKED(sc); @@ -1490,16 +1697,10 @@ rge_hw_init(struct rge_softc *sc) DELAY(3000); rge_write_mac_ocp(sc, 0xfc26, 0); - /* Read microcode version. */ - rge_switch_mcu_ram_page(sc, 2); - sc->rge_mcodever = 0; - for (i = 0; i < 8; i += 2) { - sc->rge_mcodever <<= 16; - sc->rge_mcodever |= rge_read_mac_ocp(sc, 0xf9f8 + i); - } - rge_switch_mcu_ram_page(sc, 0); - - rge_mac_config_mcu(sc, sc->rge_type); + if (RGE_TYPE_R26(sc) || sc->rge_type == MAC_R27) + rge_mac_config_ext_mcu(sc, sc->rge_type); + else + rge_mac_config_mcu(sc, sc->rge_type); /* Disable PHY power saving. */ if (sc->rge_type == MAC_R25) @@ -1588,7 +1789,7 @@ rge_disable_aspm_clkreq(struct rge_softc *sc) if (unlock) RGE_SETBIT_1(sc, RGE_EECMD, RGE_EECMD_WRITECFG); - if (sc->rge_type == MAC_R26 || sc->rge_type == MAC_R27) + if (RGE_TYPE_R26(sc) || sc->rge_type == MAC_R27) RGE_CLRBIT_1(sc, RGE_INT_CFG0, 0x08); else RGE_CLRBIT_1(sc, RGE_CFG2, RGE_CFG2_CLKREQ_EN); diff --git a/sys/dev/rge/if_rge_microcode.h b/sys/dev/rge/if_rge_microcode.h index e81dc8b96a35..f2803b869e3f 100644 --- a/sys/dev/rge/if_rge_microcode.h +++ b/sys/dev/rge/if_rge_microcode.h @@ -166,114 +166,298 @@ static const struct rge_hw_regaddr_array rtl8125b_mac_bps[] = { { 0xfc30, 0x4a20 }, { 0xfc32, 0x47a0 }, { 0xfc48, 0x003f } }; -static const struct rge_hw_regaddr_array rtl8127_mac_bps[] = { - { 0xf800, 0xe010 }, { 0xf802, 0xe023 }, { 0xf804, 0xe036 }, - { 0xf806, 0xe049 }, { 0xf808, 0xe05c }, { 0xf80a, 0xe075 }, - { 0xf80c, 0xe0b1 }, { 0xf80e, 0xe117 }, { 0xf810, 0xe11b }, - { 0xf812, 0xe11d }, { 0xf814, 0xe11f }, { 0xf816, 0xe121 }, - { 0xf818, 0xe123 }, { 0xf81a, 0xe125 }, { 0xf81c, 0xe127 }, - { 0xf81e, 0xe129 }, { 0xf820, 0x7020 }, { 0xf822, 0xb405 }, - { 0xf824, 0xb404 }, { 0xf826, 0xc50f }, { 0xf828, 0x74a0 }, - { 0xf82a, 0xc50e }, { 0xf82c, 0x4025 }, { 0xf82e, 0xf005 }, - { 0xf830, 0x4850 }, { 0xf832, 0x4025 }, { 0xf834, 0xf002 }, - { 0xf836, 0xe002 }, { 0xf838, 0x4809 }, { 0xf83a, 0xb004 }, - { 0xf83c, 0xb005 }, { 0xf83e, 0xc502 }, { 0xf840, 0xbd00 }, - { 0xf842, 0x1522 }, { 0xf844, 0xd006 }, { 0xf846, 0x0004 }, - { 0xf848, 0x7760 }, { 0xf84a, 0xb405 }, { 0xf84c, 0xb404 }, - { 0xf84e, 0xc50f }, { 0xf850, 0x74a0 }, { 0xf852, 0xc50e }, - { 0xf854, 0x4025 }, { 0xf856, 0xf005 }, { 0xf858, 0x4850 }, - { 0xf85a, 0x4025 }, { 0xf85c, 0xf002 }, { 0xf85e, 0xe002 }, - { 0xf860, 0x4879 }, { 0xf862, 0xb004 }, { 0xf864, 0xb005 }, - { 0xf866, 0xc002 }, { 0xf868, 0xb800 }, { 0xf86a, 0x41e2 }, - { 0xf86c, 0xd006 }, { 0xf86e, 0x0004 }, { 0xf870, 0x7160 }, - { 0xf872, 0xb405 }, { 0xf874, 0xb404 }, { 0xf876, 0xc50f }, - { 0xf878, 0x74a0 }, { 0xf87a, 0xc50e }, { 0xf87c, 0x4025 }, - { 0xf87e, 0xf005 }, { 0xf880, 0x4850 }, { 0xf882, 0x4025 }, - { 0xf884, 0xf002 }, { 0xf886, 0xe002 }, { 0xf888, 0x4819 }, - { 0xf88a, 0xb004 }, { 0xf88c, 0xb005 }, { 0xf88e, 0xc302 }, - { 0xf890, 0xbb00 }, { 0xf892, 0x508e }, { 0xf894, 0xd006 }, - { 0xf896, 0x0004 }, { 0xf898, 0x7720 }, { 0xf89a, 0xb405 }, - { 0xf89c, 0xb404 }, { 0xf89e, 0xc50f }, { 0xf8a0, 0x74a0 }, - { 0xf8a2, 0xc50e }, { 0xf8a4, 0x4025 }, { 0xf8a6, 0xf005 }, - { 0xf8a8, 0x4850 }, { 0xf8aa, 0x4025 }, { 0xf8ac, 0xf002 }, - { 0xf8ae, 0xe002 }, { 0xf8b0, 0x4879 }, { 0xf8b2, 0xb004 }, - { 0xf8b4, 0xb005 }, { 0xf8b6, 0xc102 }, { 0xf8b8, 0xb900 }, - { 0xf8ba, 0x50f8 }, { 0xf8bc, 0xd006 }, { 0xf8be, 0x0004 }, - { 0xf8c0, 0x61a9 }, { 0xf8c2, 0xb403 }, { 0xf8c4, 0xb404 }, - { 0xf8c6, 0xc313 }, { 0xf8c8, 0x7460 }, { 0xf8ca, 0xc312 }, - { 0xf8cc, 0x4023 }, { 0xf8ce, 0xf005 }, { 0xf8d0, 0x4830 }, - { 0xf8d2, 0x4023 }, { 0xf8d4, 0xf002 }, { 0xf8d6, 0xe003 }, - { 0xf8d8, 0x4997 }, { 0xf8da, 0xf003 }, { 0xf8dc, 0xc00a }, - { 0xf8de, 0xe002 }, { 0xf8e0, 0xc009 }, { 0xf8e2, 0xb004 }, - { 0xf8e4, 0xb003 }, { 0xf8e6, 0xc102 }, { 0xf8e8, 0xb900 }, - { 0xf8ea, 0x34fc }, { 0xf8ec, 0xd006 }, { 0xf8ee, 0x0004 }, - { 0xf8f0, 0x02af }, { 0xf8f2, 0x041f }, { 0xf8f4, 0xb407 }, - { 0xf8f6, 0xb406 }, { 0xf8f8, 0xb405 }, { 0xf8fa, 0xb404 }, - { 0xf8fc, 0xb403 }, { 0xf8fe, 0xb402 }, { 0xf900, 0xb401 }, - { 0xf902, 0xb400 }, { 0xf904, 0x49d2 }, { 0xf906, 0xf116 }, - { 0xf908, 0xc62f }, { 0xf90a, 0x77c0 }, { 0xf90c, 0x49f9 }, - { 0xf90e, 0xf020 }, { 0xf910, 0x49fa }, { 0xf912, 0xf11e }, - { 0xf914, 0x49f2 }, { 0xf916, 0xf102 }, { 0xf918, 0xe01b }, - { 0xf91a, 0x48f2 }, { 0xf91c, 0x9fc0 }, { 0xf91e, 0xc625 }, - { 0xf920, 0x75c2 }, { 0xf922, 0x4852 }, { 0xf924, 0x9dc2 }, - { 0xf926, 0xc122 }, { 0xf928, 0x7020 }, { 0xf92a, 0x4801 }, - { 0xf92c, 0x4802 }, { 0xf92e, 0x9820 }, { 0xf930, 0xe00f }, - { 0xf932, 0xc61a }, { 0xf934, 0x77c0 }, { 0xf936, 0x49f2 }, - { 0xf938, 0xf10b }, { 0xf93a, 0xc618 }, { 0xf93c, 0x77c0 }, - { 0xf93e, 0x49f2 }, { 0xf940, 0xf007 }, { 0xf942, 0x48f2 }, - { 0xf944, 0x9fc0 }, { 0xf946, 0xc611 }, { 0xf948, 0x75c2 }, - { 0xf94a, 0x48d2 }, { 0xf94c, 0x9dc2 }, { 0xf94e, 0xb000 }, - { 0xf950, 0xb001 }, { 0xf952, 0xb002 }, { 0xf954, 0xb003 }, - { 0xf956, 0xb004 }, { 0xf958, 0xb005 }, { 0xf95a, 0xb006 }, - { 0xf95c, 0xb007 }, { 0xf95e, 0x9d6c }, { 0xf960, 0xc502 }, - { 0xf962, 0xbd00 }, { 0xf964, 0x0168 }, { 0xf966, 0xe024 }, - { 0xf968, 0xc010 }, { 0xf96a, 0xd410 }, { 0xf96c, 0xd460 }, - { 0xf96e, 0xb407 }, { 0xf970, 0xb406 }, { 0xf972, 0xb405 }, - { 0xf974, 0xb404 }, { 0xf976, 0xb403 }, { 0xf978, 0xb402 }, - { 0xf97a, 0xb401 }, { 0xf97c, 0xb400 }, { 0xf97e, 0xc152 }, - { 0xf980, 0x7020 }, { 0xf982, 0x4981 }, { 0xf984, 0xf043 }, - { 0xf986, 0xc050 }, { 0xf988, 0x7100 }, { 0xf98a, 0xb401 }, - { 0xf98c, 0xc14c }, { 0xf98e, 0x489e }, { 0xf990, 0x481d }, - { 0xf992, 0x9900 }, { 0xf994, 0xc24a }, { 0xf996, 0x7340 }, - { 0xf998, 0x49b7 }, { 0xf99a, 0xf135 }, { 0xf99c, 0xc144 }, - { 0xf99e, 0x9900 }, { 0xf9a0, 0xc245 }, { 0xf9a2, 0x7340 }, - { 0xf9a4, 0xc447 }, { 0xf9a6, 0x401c }, { 0xf9a8, 0xf109 }, - { 0xf9aa, 0x734c }, { 0xf9ac, 0x1301 }, { 0xf9ae, 0xf12b }, - { 0xf9b0, 0xc343 }, { 0xf9b2, 0x9b40 }, { 0xf9b4, 0xc33e }, - { 0xf9b6, 0x9b40 }, { 0xf9b8, 0xe022 }, { 0xf9ba, 0xc63a }, - { 0xf9bc, 0x77c0 }, { 0xf9be, 0x48f4 }, { 0xf9c0, 0x48f5 }, - { 0xf9c2, 0x48f9 }, { 0xf9c4, 0x48fa }, { 0xf9c6, 0x9fc0 }, - { 0xf9c8, 0xc231 }, { 0xf9ca, 0x7344 }, { 0xf9cc, 0x48b4 }, - { 0xf9ce, 0x9b44 }, { 0xf9d0, 0xc22e }, { 0xf9d2, 0x7340 }, - { 0xf9d4, 0x4830 }, { 0xf9d6, 0x48b1 }, { 0xf9d8, 0x4832 }, - { 0xf9da, 0x483c }, { 0xf9dc, 0x48bd }, { 0xf9de, 0x48be }, - { 0xf9e0, 0x48bf }, { 0xf9e2, 0x9b40 }, { 0xf9e4, 0xc223 }, - { 0xf9e6, 0xc32a }, { 0xf9e8, 0x9b48 }, { 0xf9ea, 0xc327 }, - { 0xf9ec, 0x9b46 }, { 0xf9ee, 0xc324 }, { 0xf9f0, 0x9b40 }, - { 0xf9f2, 0xc321 }, { 0xf9f4, 0x9b42 }, { 0xf9f6, 0xc31e }, - { 0xf9f8, 0x9b40 }, { 0xf9fa, 0xe005 }, { 0xf9fc, 0xc113 }, - { 0xf9fe, 0x7020 }, { 0xf800, 0x4881 }, { 0xf802, 0x9820 }, - { 0xf804, 0xb001 }, { 0xf806, 0xc010 }, { 0xf808, 0x9900 }, - { 0xf80a, 0xb000 }, { 0xf80c, 0xb001 }, { 0xf80e, 0xb002 }, - { 0xf810, 0xb003 }, { 0xf812, 0xb004 }, { 0xf814, 0xb005 }, - { 0xf816, 0xb006 }, { 0xf818, 0xb007 }, { 0xf81a, 0x2125 }, - { 0xf81c, 0xc102 }, { 0xf81e, 0xb900 }, { 0xf820, 0x1a6c }, - { 0xf822, 0xd410 }, { 0xf824, 0xc000 }, { 0xf826, 0xe86c }, - { 0xf828, 0xb600 }, { 0xf82a, 0xb800 }, { 0xf82c, 0xb40a }, - { 0xf82e, 0xe024 }, { 0xf830, 0x5a00 }, { 0xf832, 0x5a81 }, - { 0xf834, 0x0073 }, { 0xf836, 0x5a80 }, { 0xf838, 0x0042 }, - { 0xf83a, 0x0001 }, { 0xf83c, 0xc104 }, { 0xf83e, 0xc202 }, - { 0xf840, 0xba00 }, { 0xf842, 0x1a2e }, { 0xf844, 0xc896 }, - { 0xf846, 0xc302 }, { 0xf848, 0xbb00 }, { 0xf84a, 0x0000 }, - { 0xf84c, 0xc002 }, { 0xf84e, 0xb800 }, { 0xf850, 0x0000 }, - { 0xf852, 0xc002 }, { 0xf854, 0xb800 }, { 0xf856, 0x0000 }, - { 0xf858, 0xc502 }, { 0xf85a, 0xbd00 }, { 0xf85c, 0x0000 }, - { 0xf85e, 0xc102 }, { 0xf860, 0xb900 }, { 0xf862, 0x0000 }, - { 0xf864, 0xc102 }, { 0xf866, 0xb900 }, { 0xf868, 0x0000 }, - { 0xf86a, 0xc602 }, { 0xf86c, 0xbe00 }, { 0xf86e, 0x0000 }, - { 0xf870, 0xc602 }, { 0xf872, 0xbe00 }, { 0xf874, 0x0000 }, - { 0xf876, 0x6961 }, { 0xf878, 0x0019 }, { 0xf87a, 0x050c }, - { 0xf87c, 0x140c } +struct rge_mac_bps { + int count; + const uint16_t *regs; + const uint16_t *vals; +}; + +static const uint16_t rtl8126_1_mac_bps_regs[] = { + 0xf800, 0xf802, 0xf804, 0xf806, 0xf808, 0xf80a, 0xf80c, + 0xf80e, 0xf810, 0xf812, 0xf814, 0xf816, 0xf818, 0xf81a, + 0xf81c, 0xf81e, 0xf820, 0xf822, 0xf824, 0xf826, 0xf828, + 0xf82a, 0xf82c, 0xf82e, 0xf830, 0xf832, 0xf834, 0xf836, + 0xf838, 0xf83a, 0xf83c, 0xf83e, 0xf840, 0xf842, 0xf844, + 0xf846, 0xf848, 0xf84a, 0xf84c, 0xf84e, 0xf850, 0xf852, + 0xf854, 0xf856, 0xf858, 0xf85a, 0xf85c, 0xf85e, 0xf860, + 0xf862, 0xf864, 0xf866, 0xf868, 0xf86a, 0xf86c, 0xf86e, + 0xf870, 0xf872, 0xf874, 0xf876, 0xf878, 0xf87a, 0xf87c, + 0xf87e, 0xf880, 0xf882, 0xf884, 0xf886, 0xf888, 0xf88a, + 0xf88c, 0xf88e, 0xf890, 0xf892, 0xf894, 0xf896, 0xf898, + 0xf89a, 0xf89c, 0xf89e, 0xf8a0, 0xf8a2, 0xf8a4, 0xf8a6, + 0xf8a8, 0xf8aa, 0xf8ac, 0xf8ae, 0xf8b0, 0xf8b2, 0xf8b4, + 0xf8b6, 0xf8b8, 0xf8ba, 0xf8bc, 0xf8be, 0xf8c0, 0xf8c2, + 0xf8c4, 0xf8c6, 0xf8c8, 0xf8ca, 0xf8cc, 0xf8ce, 0xf8d0, + 0xf8d2, 0xf8d4, 0xf8d6, 0xf8d8, 0xf8da, 0xf8dc, 0xf8de, + 0xf8e0, 0xf8e2, 0xf8e4, 0xf8e6, 0xf8e8, 0xf8ea, 0xf8ec, + 0xf8ee, 0xf8f0, 0xf8f2, 0xf8f4, 0xf8f6, 0xf8f8, 0xf8fa, + 0xf8fc, 0xf8fe, 0xf900, 0xf902, 0xf904, 0xf906, 0xf908, + 0xf90a, 0xf90c, 0xf90e, 0xf910, 0xf912, 0xf914, 0xf916, + 0xf918, 0xf91a, 0xf91c, 0xf91e, 0xf920, 0xf922, 0xf924, + 0xf926, 0xf928, 0xf92a, 0xf92c, 0xf92e, 0xf930, 0xf932, + 0xf934, 0xf936, 0xf938, 0xf93a, 0xf93c, 0xf93e, 0xf940, + 0xf942, 0xf944, 0xf946, 0xf948, 0xf94a, 0xf94c, 0xf94e, + 0xf950, 0xf952, 0xf954, 0xf956, 0xf958, 0xf95a, 0xf95c, + 0xf95e, 0xf960, 0xf962, 0xf964, 0xf966, 0xf968, 0xf96a, + 0xf96c, 0xf96e, 0xf970, 0xf972, 0xf974, 0xf976, 0xf978, + 0xf97a, 0xf97c, 0xf97e, 0xf980, 0xf982, 0xf984, 0xf986, + 0xf988, 0xf98a, 0xf98c, 0xf98e, 0xf990, 0xf992, 0xf994, + 0xf996, 0xf998, 0xf99a, 0xf99c, 0xf99e, 0xf9a0, 0xf9a2, + 0xf9a4, 0xf9a6, 0xf9a8, 0xf9aa, 0xf9ac, 0xf9ae, 0xf9b0 +}; + +static const uint16_t rtl8126_1_mac_bps_vals[] = { + 0xe010, 0xe02c, 0xe04e, 0xe0a4, 0xe0a8, 0xe0ab, 0xe0ae, + 0xe0b1, 0xe0b5, 0xe0b7, 0xe0b9, 0xe0bb, 0xe0bd, 0xe0bf, + 0xe0c1, 0xe0c3, 0xc716, 0xc616, 0x9ee0, 0xc616, 0x65c0, + 0x1500, 0xf009, 0xc714, 0x66e0, 0x41b5, 0x8ee0, 0xc611, + 0x75c0, 0x4858, 0x9dc0, 0xc707, 0xc608, 0x9ee0, 0xc608, + 0xc502, 0xbd00, 0x0100, 0xe86c, 0xe000, 0xa000, 0xb404, + 0xb430, 0xc070, 0xe926, 0xc2fe, 0x400a, 0xf11a, 0x63a4, + 0x1a00, 0x49b0, 0xf002, 0x4820, 0x49b1, 0xf002, 0x4821, + 0x49b2, 0xf002, 0x4822, 0x49b3, 0xf002, 0x4823, 0xc411, + 0x6380, 0x48b0, 0x8b80, 0x6320, 0x41da, 0x8b20, 0x6380, + 0x4830, 0x8b80, 0xe003, 0x73a4, 0x9b20, 0xc302, 0xbb00, + 0x4a18, 0xc070, 0xe022, 0xc054, 0x7102, 0x4992, 0xf149, + 0x4893, 0x9902, 0x1b1f, 0xc74e, 0x72e0, 0x2521, 0x48a5, + 0x0b01, 0x1c4f, 0x9c00, 0x2121, 0x1d01, 0x41aa, 0x2521, + 0x9de0, 0x4856, 0x9de0, 0x1ccf, 0xe839, 0x48d6, 0x9de0, + 0x7102, 0x4996, 0xf1fe, 0x4814, 0x9902, 0x1cff, 0x0c01, + 0x1400, 0xf00c, 0x7102, 0x4996, 0xf0fb, 0x7102, 0x4990, + 0xf0fe, 0x1c1f, 0xe826, 0x7102, 0x4992, 0xf004, 0x4813, + 0x9902, 0xe01d, 0x1300, 0xf104, 0x4817, 0x9902, 0xe018, + 0x4894, 0x9902, 0x4995, 0xf00b, 0x121f, 0xf0f3, 0x131e, + 0xf003, 0x4998, 0xf0ef, 0x0201, 0x4818, 0x9902, 0xe7c9, + 0x1200, 0xf0e9, 0x4998, 0xf002, 0x1b01, 0x0a01, 0x4898, + 0x9902, 0xe7c0, 0xc00a, 0xc606, 0xbe00, 0x0c01, 0x1400, + 0xf1fe, 0xff80, 0x2362, 0xd456, 0xd404, 0xe400, 0x4166, + 0x9cf6, 0xc002, 0xb800, 0x14a6, 0x49d1, 0xc602, 0xbe00, + 0x4160, 0x49d1, 0xc602, 0xbe00, 0x41e6, 0x49d1, 0xc602, + 0xbe00, 0x4282, 0xc104, 0xc202, 0xba00, 0x234c, 0xd116, + 0xc602, 0xbe00, 0x0000, 0xc602, 0xbe00, 0x0000, 0xc602, + 0xbe00, 0x0000, 0xc602, 0xbe00, 0x0000, 0xc602, 0xbe00, + 0x0000, 0xc602, 0xbe00, 0x0000, 0xc602, 0xbe00, 0x0000, + 0xc602, 0xbe00, 0x0000, 0x6847, 0x0019, 0x041c, 0x1322 +}; + +static const struct rge_mac_bps rtl8126_1_mac_bps = { + nitems(rtl8126_1_mac_bps_regs), + rtl8126_1_mac_bps_regs, + rtl8126_1_mac_bps_vals +}; + +static const uint16_t rtl8126_2_mac_bps_regs[] = { + 0xf800, 0xf802, 0xf804, 0xf806, 0xf808, 0xf80a, 0xf80c, + 0xf80e, 0xf810, 0xf812, 0xf814, 0xf816, 0xf818, 0xf81a, + 0xf81c, 0xf81e, 0xf820, 0xf822, 0xf824, 0xf826, 0xf828, + 0xf82a, 0xf82c, 0xf82e, 0xf830, 0xf832, 0xf834, 0xf836, + 0xf838, 0xf83a, 0xf83c, 0xf83e, 0xf840, 0xf842, 0xf844, + 0xf846, 0xf848, 0xf84a, 0xf84c, 0xf84e, 0xf850, 0xf852, + 0xf854, 0xf856, 0xf858, 0xf85a, 0xf85c, 0xf85e, 0xf860, + 0xf862, 0xf864, 0xf866, 0xf868, 0xf86a, 0xf86c, 0xf86e, + 0xf870, 0xf872, 0xf874, 0xf876, 0xf878, 0xf87a, 0xf87c, + 0xf87e, 0xf880, 0xf882, 0xf884, 0xf886, 0xf888, 0xf88a, + 0xf88c, 0xf88e, 0xf890, 0xf892, 0xf894, 0xf896, 0xf898, + 0xf89a, 0xf89c, 0xf89e, 0xf8a0, 0xf8a2, 0xf8a4, 0xf8a6, + 0xf8a8, 0xf8aa, 0xf8ac, 0xf8ae, 0xf8b0, 0xf8b2, 0xf8b4, + 0xf8b6, 0xf8b8, 0xf8ba, 0xf8bc, 0xf8be, 0xf8c0, 0xf8c2, + 0xf8c4, 0xf8c6, 0xf8c8, 0xf8ca, 0xf8cc, 0xf8ce, 0xf8d0, + 0xf8d2, 0xf8d4, 0xf8d6, 0xf8d8, 0xf8da, 0xf8dc, 0xf8de, + 0xf8e0, 0xf8e2, 0xf8e4, 0xf8e6, 0xf8e8, 0xf8ea, 0xf8ec, + 0xf8ee, 0xf8f0, 0xf8f2, 0xf8f4, 0xf8f6, 0xf8f8, 0xf8fa, + 0xf8fc, 0xf8fe, 0xf900, 0xf902, 0xf904, 0xf906, 0xf908, + 0xf90a, 0xf90c, 0xf90e, 0xf910, 0xf912, 0xf914, 0xf916, + 0xf918, 0xf91a, 0xf91c, 0xf91e, 0xf920, 0xf922, 0xf924, + 0xf926, 0xf928, 0xf92a, 0xf92c, 0xf92e, 0xf930, 0xf932, + 0xf934, 0xf936, 0xf938, 0xf93a, 0xf93c, 0xf93e, 0xf940, + 0xf942, 0xf944, 0xf946, 0xf948, 0xf94a, 0xf94c, 0xf94e, + 0xf950, 0xf952, 0xf954, 0xf956, 0xf958, 0xf95a, 0xf95c, + 0xf95e, 0xf960, 0xf962, 0xf964, 0xf966, 0xf968, 0xf96a, + 0xf96c, 0xf96e, 0xf970, 0xf972, 0xf974, 0xf976, 0xf978, + 0xf97a, 0xf97c, 0xf97e, 0xf980, 0xf982, 0xf984, 0xf986, + 0xf988, 0xf98a, 0xf98c, 0xf98e, 0xf990, 0xf992, 0xf994, + 0xf996, 0xf998, 0xf99a, 0xf99c, 0xf99e, 0xf9a0, 0xf9a2, + 0xf9a4, 0xf9a6, 0xf9a8, 0xf9aa, 0xf9ac, 0xf9ae, 0xf9b0, + 0xf9b2, 0xf9b4, 0xf9b6, 0xf9b8, 0xf9ba, 0xf9bc, 0xf9be, + 0xf9c0, 0xf9c2, 0xf9c4, 0xf9c6, 0xf9c8, 0xf9ca, 0xf9cc, + 0xf9ce, 0xf9d0, 0xf9d2, 0xf9d4, 0xf9d6, 0xf9d8, 0xf9da, + 0xf9dc, 0xf9de, 0xf9e0, 0xf9e2, 0xf9e4, 0xf9e6, 0xf9e8, + 0xf9ea, 0xf9ec, 0xf9ee, 0xf9f0, 0xf9f2, 0xf9f4, 0xf9f6, + 0xf9f8, 0xf9fa, 0xf9fc, 0xf9fe, 0xf800, 0xf802, 0xf804, + 0xf806, 0xf808, 0xf80a, 0xf80c, 0xf80e, 0xf810, 0xf812, + 0xf814, 0xf816, 0xf818, 0xf81a, 0xf81c, 0xf81e, 0xf820, + 0xf822, 0xf824, 0xf826, 0xf828, 0xf82a, 0xf82c, 0xf82e, + 0xf830, 0xf832, 0xf834, 0xf836, 0xf838, 0xf83a, 0xf83c, + 0xf83e, 0xf840, 0xf842, 0xf844, 0xf846, 0xf848, 0xf84a, + 0xf84c, 0xf84e, 0xf850, 0xf852, 0xf854, 0xf856, 0xf858, + 0xf85a, 0xf85c, 0xf85e, 0xf860, 0xf862, 0xf864, 0xf866, + 0xf868, 0xf86a, 0xf86c, 0xf86e, 0xf870, 0xf872, 0xf874, + 0xf876, 0xf878, 0xf87a, 0xf87c, 0xf87e, 0xf880, 0xf882, + 0xf884, 0xf886, 0xf888, 0xf88a, 0xf88c, 0xf88e, 0xf890, + 0xf892, 0xf894, 0xf896, 0xf898, 0xf89a, 0xf89c, 0xf89e, + 0xf8a0, 0xf8a2, 0xf8a4 +}; + +static const uint16_t rtl8126_2_mac_bps_vals[] = { + 0xe00a, 0xe026, 0xe048, 0xe04c, 0xe04f, 0xe052, 0xe055, + 0xe0ab, 0xe0f8, 0xe141, 0xc716, 0xc616, 0x9ee0, 0xc616, + 0x65c0, 0x1500, 0xf009, 0xc714, 0x66e0, 0x41b5, 0x8ee0, + 0xc611, 0x75c0, 0x4858, 0x9dc0, 0xc707, 0xc608, 0x9ee0, + 0xc608, 0xc502, 0xbd00, 0x0100, 0xe86c, 0xe000, 0xa000, + 0xb404, 0xb430, 0xc070, 0xe926, 0xc2fe, 0x400a, 0xf11a, + 0x63a4, 0x1a00, 0x49b0, 0xf002, 0x4820, 0x49b1, 0xf002, + 0x4821, 0x49b2, 0xf002, 0x4822, 0x49b3, 0xf002, 0x4823, + 0xc411, 0x6380, 0x48b0, 0x8b80, 0x6320, 0x41da, 0x8b20, + 0x6380, 0x4830, 0x8b80, 0xe003, 0x73a4, 0x9b20, 0xc302, + 0xbb00, 0x55e2, 0xc070, 0xe022, 0x4166, 0x9cf6, 0xc602, + 0xbe00, 0x14a6, 0x49d1, 0xc602, 0xbe00, 0x4178, 0x49d1, + 0xc602, 0xbe00, 0x41fe, 0x49d1, 0xc602, 0xbe00, 0x429a, + 0xc74b, 0x76e2, 0xc54a, 0x402e, 0xf034, 0x76e0, 0x402e, + 0xf006, 0xc503, 0xc403, 0xbc00, 0xc0bc, 0x0aae, 0x76f0, + 0x1601, 0xf023, 0xc741, 0x1e04, 0x9ee0, 0x1e40, 0x9ee4, + 0xc63d, 0x9ee8, 0xc73d, 0x76e0, 0x4863, 0x9ee0, 0xc73a, + 0x76e0, 0x48ea, 0x48eb, 0x9ee0, 0xc736, 0x1e01, 0x9ee2, + 0xc72d, 0x76e0, 0x486f, 0x9ee0, 0xc72d, 0x76e0, 0x48e3, + 0x9ee0, 0xc728, 0x1e0e, 0x9ee0, 0xc71d, 0x1e01, 0x9ee4, + 0xe00d, 0x1e00, 0x9ef0, 0x1e05, 0xc715, 0x9ee0, 0xe00a, + 0x1e00, 0x9ee2, 0xc614, 0x75cc, 0x48d2, 0x9dcc, 0x1e04, + 0xc70b, 0x9ee0, 0xb000, 0xb001, 0xb002, 0xb003, 0xb004, + 0xb005, 0xb006, 0xb007, 0xffc0, 0xe428, 0xd3c0, 0xbeef, + 0x5b4a, 0xdc46, 0xe0cc, 0xe84e, 0xc0a2, 0x0100, 0xc010, + 0xe85a, 0xe812, 0xc0b4, 0xc5f4, 0x74a0, 0xc6f3, 0x4026, + 0xf107, 0x74a2, 0xc6ef, 0x4026, 0xf107, 0xc6ed, 0xbe00, + 0x753a, 0xc602, 0xbe00, 0x5a3a, 0x7520, 0x49de, 0xf102, + 0xe7f9, 0xc6a1, 0x67c6, 0x7520, 0x22d2, 0x26dd, 0x1500, + 0xf002, 0xe7f1, 0x7532, 0x26d5, 0x0530, 0x0d6c, 0xc42d, + 0x308d, 0x7540, 0x4025, 0xf11e, 0x7542, 0x4025, 0xf11b, + 0x7544, 0x4025, 0xf118, 0xc423, 0x7546, 0x4025, 0xf114, + 0x7548, 0x4025, 0xf111, 0x754a, 0x4025, 0xf10e, 0xc5c0, + 0xc4c0, 0x9ca2, 0xc6c0, 0x75cc, 0x4852, 0x9dcc, 0xc6b8, + 0x1d7d, 0x9dc2, 0x1d01, 0x9dc0, 0xe7c9, 0xc40b, 0x7546, + 0x4025, 0xf1fc, 0x7548, 0x4025, 0xf1f9, 0x754a, 0x4025, + 0xf1f6, 0xe7c0, 0xffff, 0xeeee, 0xc2a6, 0x7340, 0xc2a5, + 0x4013, 0xf013, 0xc2ac, 0x7340, 0x4835, 0x9b40, 0xc240, + 0x7358, 0x48b7, 0x48b2, 0x9b58, 0x7346, 0x48b7, 0x48b2, + 0x9b46, 0x7340, 0x48b7, 0x48b2, 0x9b40, 0xe012, 0xc29a, + 0x7340, 0x48b5, 0x9b40, 0xc22e, 0x7358, 0x4837, 0x4832, + 0x9b58, 0x7346, 0x4837, 0x4832, 0x9b46, 0x7340, 0x4837, + 0x4832, 0x9b40, 0xc283, 0x7340, 0x49bf, 0xf010, 0xc21b, + 0x7344, 0x1300, 0xf104, 0x1b00, 0xc217, 0x9b40, 0x1b01, + 0xc213, 0x9b44, 0xc213, 0x734c, 0x48b7, 0x9b4c, 0xe008, + 0xc20c, 0x1b00, 0x9b44, 0xc20b, 0x734c, 0x4837, 0x9b4c, + 0xc204, 0xc302, 0xbb00, 0x2384, 0xe092, 0xd3c0, 0xe428, + 0xdc46, 0xc104, 0xc202, 0xba00, 0x234c, 0xd116, 0x6847, + 0x0119, 0x041c, 0x1134 +}; + +static const struct rge_mac_bps rtl8126_2_mac_bps = { + nitems(rtl8126_2_mac_bps_regs), + rtl8126_2_mac_bps_regs, + rtl8126_2_mac_bps_vals +}; + +static const uint16_t rtl8127_mac_bps_regs[] = { + 0xf800, 0xf802, 0xf804, 0xf806, 0xf808, 0xf80a, 0xf80c, + 0xf80e, 0xf810, 0xf812, 0xf814, 0xf816, 0xf818, 0xf81a, + 0xf81c, 0xf81e, 0xf820, 0xf822, 0xf824, 0xf826, 0xf828, + 0xf82a, 0xf82c, 0xf82e, 0xf830, 0xf832, 0xf834, 0xf836, + 0xf838, 0xf83a, 0xf83c, 0xf83e, 0xf840, 0xf842, 0xf844, + 0xf846, 0xf848, 0xf84a, 0xf84c, 0xf84e, 0xf850, 0xf852, + 0xf854, 0xf856, 0xf858, 0xf85a, 0xf85c, 0xf85e, 0xf860, + 0xf862, 0xf864, 0xf866, 0xf868, 0xf86a, 0xf86c, 0xf86e, + 0xf870, 0xf872, 0xf874, 0xf876, 0xf878, 0xf87a, 0xf87c, + 0xf87e, 0xf880, 0xf882, 0xf884, 0xf886, 0xf888, 0xf88a, + 0xf88c, 0xf88e, 0xf890, 0xf892, 0xf894, 0xf896, 0xf898, + 0xf89a, 0xf89c, 0xf89e, 0xf8a0, 0xf8a2, 0xf8a4, 0xf8a6, + 0xf8a8, 0xf8aa, 0xf8ac, 0xf8ae, 0xf8b0, 0xf8b2, 0xf8b4, + 0xf8b6, 0xf8b8, 0xf8ba, 0xf8bc, 0xf8be, 0xf8c0, 0xf8c2, + 0xf8c4, 0xf8c6, 0xf8c8, 0xf8ca, 0xf8cc, 0xf8ce, 0xf8d0, + 0xf8d2, 0xf8d4, 0xf8d6, 0xf8d8, 0xf8da, 0xf8dc, 0xf8de, + 0xf8e0, 0xf8e2, 0xf8e4, 0xf8e6, 0xf8e8, 0xf8ea, 0xf8ec, + 0xf8ee, 0xf8f0, 0xf8f2, 0xf8f4, 0xf8f6, 0xf8f8, 0xf8fa, + 0xf8fc, 0xf8fe, 0xf900, 0xf902, 0xf904, 0xf906, 0xf908, + 0xf90a, 0xf90c, 0xf90e, 0xf910, 0xf912, 0xf914, 0xf916, + 0xf918, 0xf91a, 0xf91c, 0xf91e, 0xf920, 0xf922, 0xf924, + 0xf926, 0xf928, 0xf92a, 0xf92c, 0xf92e, 0xf930, 0xf932, + 0xf934, 0xf936, 0xf938, 0xf93a, 0xf93c, 0xf93e, 0xf940, + 0xf942, 0xf944, 0xf946, 0xf948, 0xf94a, 0xf94c, 0xf94e, + 0xf950, 0xf952, 0xf954, 0xf956, 0xf958, 0xf95a, 0xf95c, + 0xf95e, 0xf960, 0xf962, 0xf964, 0xf966, 0xf968, 0xf96a, + 0xf96c, 0xf96e, 0xf970, 0xf972, 0xf974, 0xf976, 0xf978, + 0xf97a, 0xf97c, 0xf97e, 0xf980, 0xf982, 0xf984, 0xf986, + 0xf988, 0xf98a, 0xf98c, 0xf98e, 0xf990, 0xf992, 0xf994, + 0xf996, 0xf998, 0xf99a, 0xf99c, 0xf99e, 0xf9a0, 0xf9a2, + 0xf9a4, 0xf9a6, 0xf9a8, 0xf9aa, 0xf9ac, 0xf9ae, 0xf9b0, + 0xf9b2, 0xf9b4, 0xf9b6, 0xf9b8, 0xf9ba, 0xf9bc, 0xf9be, + 0xf9c0, 0xf9c2, 0xf9c4, 0xf9c6, 0xf9c8, 0xf9ca, 0xf9cc, + 0xf9ce, 0xf9d0, 0xf9d2, 0xf9d4, 0xf9d6, 0xf9d8, 0xf9da, + 0xf9dc, 0xf9de, 0xf9e0, 0xf9e2, 0xf9e4, 0xf9e6, 0xf9e8, + 0xf9ea, 0xf9ec, 0xf9ee, 0xf9f0, 0xf9f2, 0xf9f4, 0xf9f6, + 0xf9f8, 0xf9fa, 0xf9fc, 0xf9fe, 0xf800, 0xf802, 0xf804, + 0xf806, 0xf808, 0xf80a, 0xf80c, 0xf80e, 0xf810, 0xf812, + 0xf814, 0xf816, 0xf818, 0xf81a, 0xf81c, 0xf81e, 0xf820, + 0xf822, 0xf824, 0xf826, 0xf828, 0xf82a, 0xf82c, 0xf82e, + 0xf830, 0xf832, 0xf834, 0xf836, 0xf838, 0xf83a, 0xf83c, + 0xf83e, 0xf840, 0xf842, 0xf844, 0xf846, 0xf848, 0xf84a, + 0xf84c, 0xf84e, 0xf850, 0xf852, 0xf854, 0xf856, 0xf858, + 0xf85a, 0xf85c, 0xf85e, 0xf860, 0xf862, 0xf864, 0xf866, + 0xf868, 0xf86a, 0xf86c, 0xf86e, 0xf870, 0xf872, 0xf874, + 0xf876, 0xf878, 0xf87a, 0xf87c +}; + +static const uint16_t rtl8127_mac_bps_vals[] = { + 0xe010, 0xe023, 0xe036, 0xe049, 0xe05c, 0xe075, 0xe0b1, + 0xe117, 0xe11b, 0xe11d, 0xe11f, 0xe121, 0xe123, 0xe125, + 0xe127, 0xe129, 0x7020, 0xb405, 0xb404, 0xc50f, 0x74a0, + 0xc50e, 0x4025, 0xf005, 0x4850, 0x4025, 0xf002, 0xe002, + 0x4809, 0xb004, 0xb005, 0xc502, 0xbd00, 0x1522, 0xd006, + 0x0004, 0x7760, 0xb405, 0xb404, 0xc50f, 0x74a0, 0xc50e, + 0x4025, 0xf005, 0x4850, 0x4025, 0xf002, 0xe002, 0x4879, + 0xb004, 0xb005, 0xc002, 0xb800, 0x41e2, 0xd006, 0x0004, + 0x7160, 0xb405, 0xb404, 0xc50f, 0x74a0, 0xc50e, 0x4025, + 0xf005, 0x4850, 0x4025, 0xf002, 0xe002, 0x4819, 0xb004, + 0xb005, 0xc302, 0xbb00, 0x508e, 0xd006, 0x0004, 0x7720, + 0xb405, 0xb404, 0xc50f, 0x74a0, 0xc50e, 0x4025, 0xf005, + 0x4850, 0x4025, 0xf002, 0xe002, 0x4879, 0xb004, 0xb005, + 0xc102, 0xb900, 0x50f8, 0xd006, 0x0004, 0x61a9, 0xb403, + 0xb404, 0xc313, 0x7460, 0xc312, 0x4023, 0xf005, 0x4830, + 0x4023, 0xf002, 0xe003, 0x4997, 0xf003, 0xc00a, 0xe002, + 0xc009, 0xb004, 0xb003, 0xc102, 0xb900, 0x34fc, 0xd006, + 0x0004, 0x02af, 0x041f, 0xb407, 0xb406, 0xb405, 0xb404, + 0xb403, 0xb402, 0xb401, 0xb400, 0x49d2, 0xf116, 0xc62f, + 0x77c0, 0x49f9, 0xf020, 0x49fa, 0xf11e, 0x49f2, 0xf102, + 0xe01b, 0x48f2, 0x9fc0, 0xc625, 0x75c2, 0x4852, 0x9dc2, + 0xc122, 0x7020, 0x4801, 0x4802, 0x9820, 0xe00f, 0xc61a, + 0x77c0, 0x49f2, 0xf10b, 0xc618, 0x77c0, 0x49f2, 0xf007, + 0x48f2, 0x9fc0, 0xc611, 0x75c2, 0x48d2, 0x9dc2, 0xb000, + 0xb001, 0xb002, 0xb003, 0xb004, 0xb005, 0xb006, 0xb007, + 0x9d6c, 0xc502, 0xbd00, 0x0168, 0xe024, 0xc010, 0xd410, + 0xd460, 0xb407, 0xb406, 0xb405, 0xb404, 0xb403, 0xb402, + 0xb401, 0xb400, 0xc152, 0x7020, 0x4981, 0xf043, 0xc050, + 0x7100, 0xb401, 0xc14c, 0x489e, 0x481d, 0x9900, 0xc24a, + 0x7340, 0x49b7, 0xf135, 0xc144, 0x9900, 0xc245, 0x7340, + 0xc447, 0x401c, 0xf109, 0x734c, 0x1301, 0xf12b, 0xc343, + 0x9b40, 0xc33e, 0x9b40, 0xe022, 0xc63a, 0x77c0, 0x48f4, + 0x48f5, 0x48f9, 0x48fa, 0x9fc0, 0xc231, 0x7344, 0x48b4, + 0x9b44, 0xc22e, 0x7340, 0x4830, 0x48b1, 0x4832, 0x483c, + 0x48bd, 0x48be, 0x48bf, 0x9b40, 0xc223, 0xc32a, 0x9b48, + 0xc327, 0x9b46, 0xc324, 0x9b40, 0xc321, 0x9b42, 0xc31e, + 0x9b40, 0xe005, 0xc113, 0x7020, 0x4881, 0x9820, 0xb001, + 0xc010, 0x9900, 0xb000, 0xb001, 0xb002, 0xb003, 0xb004, + 0xb005, 0xb006, 0xb007, 0x2125, 0xc102, 0xb900, 0x1a6c, + 0xd410, 0xc000, 0xe86c, 0xb600, 0xb800, 0xb40a, 0xe024, + 0x5a00, 0x5a81, 0x0073, 0x5a80, 0x0042, 0x0001, 0xc104, + 0xc202, 0xba00, 0x1a2e, 0xc896, 0xc302, 0xbb00, 0x0000, + 0xc002, 0xb800, 0x0000, 0xc002, 0xb800, 0x0000, 0xc502, + 0xbd00, 0x0000, 0xc102, 0xb900, 0x0000, 0xc102, 0xb900, + 0x0000, 0xc602, 0xbe00, 0x0000, 0xc602, 0xbe00, 0x0000, + 0x6961, 0x0019, 0x050c, 0x140c +}; + +static const struct rge_mac_bps rtl8127_mac_bps = { + nitems(rtl8127_mac_bps_regs), + rtl8127_mac_bps_regs, *** 10451 LINES SKIPPED *** From nobody Wed Jan 7 03:13:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmCmm5t0Jz6N7pX for ; Wed, 07 Jan 2026 03:14:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmCml1bJxz3Qf6 for ; Wed, 07 Jan 2026 03:13:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of adrian.chadd@gmail.com designates 209.85.160.173 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-4ed7024c8c5so12672521cf.3 for ; Tue, 06 Jan 2026 19:13:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767755638; x=1768360438; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AsBVUzITvbu1RoZ8cInq95jHNeJLmaMnxl5VitQVt54=; b=AOuivNftUP8qZPHomZWdHW9LegFJ/lG0Mso5kTGxSU1Mb187VQtMl8NDIO/yxw59ED BqzJFlj8vtLdMeSYDdF6mtZG8EWwNB77ojPhGUCve3r+Yw+x8y7yLXm702QZHUOL40Xj UN8AhLKiO24gIf6zy8edyho1tJiAX6YbLIcvhhi0C0k+dPEasDgPKp6rqYh/N73QFIyE 7RLegA0rUyx8R1gRD98GCqwLYVngd47T2TbLfNVZcOYF8YY7i0wsSnZosCtiqsdaS0L4 2yMMaMLreEA94GWbNk7jAn7bzbkHMApN93voahcecgF3q8o319HrTbwA7xeGrcd/Mi0V mILQ== X-Forwarded-Encrypted: i=1; AJvYcCW47uhQaheEKAShwI7sl0tXuKroHegJ9DyqVj+WsBYEvF0AndyqZ+hnUtlMGdqSGATLFUWwNSQOAn6GhYJ+VZ1jasonEw==@freebsd.org X-Gm-Message-State: AOJu0Yx7XM/xZz/ahnC0fmGQJ1pd/1IRzhkYjYDXxPFtm+1Omv5fs8pf HVZJzyqXignCDZXQ1aSsGgNm5X0qYsu5krTaUcj2tYVlD7tteWYUq+UN++zPD0P4IyzGxbHotlH WebLoc0EZQ4CmSn9EgSZryOexx0aw4UORX2g1 X-Gm-Gg: AY/fxX6+IdCawx4S8+WD4X6zktPe7jzWKPIZHY3RFJvUougzZpyGWC24TwpyJKtgTcY 3nMbfhf1qAmO9CjHAzMkeXGvYc1jq98+ty34dhCliuNtjByq30l+x2ghjOdWX4lAClFavt9Hxi2 qVvDIv5IeNqQylv8qaQ01/u5npdw8liMECtIeoTDygibWI3ZX39ARHVVoGb6gF5aH+t1EMHKUiz PN/atOUXtgR7/NC66e6cNyBmJI1l1GMsz7AUdZJuOAgeLqOcyyjCXwbolQooOq+23emqjsz9WJ6 r2cWqJbFV7t1j0usrRKrggA2dfDVqg== X-Google-Smtp-Source: AGHT+IG8+A7KpZDB6ESruac6njnsxQ51jP3fX87GWJUUK4iifk6jWY9K2YWS7KPTMGqqna1FH4CsTrLcdwfwekLvPYs= X-Received: by 2002:a05:622a:8c8:b0:4ed:66bd:95ea with SMTP id d75a77b69052e-4ffb4931a71mr17581851cf.29.1767755637793; Tue, 06 Jan 2026 19:13:57 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <695c1a7c.859c.12adca29@gitrepo.freebsd.org> In-Reply-To: <695c1a7c.859c.12adca29@gitrepo.freebsd.org> From: Adrian Chadd Date: Tue, 6 Jan 2026 19:13:46 -0800 X-Gm-Features: AQt7F2pS5En4AcWmZ4TmunN6OdkMX0KztKBRD2cFUPIAdmrNxi0NTSyFkNrC4hc Message-ID: Subject: Re: git: d448578b445d - main - linuxkpi: Add To: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.85 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; NEURAL_HAM_LONG(-0.97)[-0.972]; NEURAL_HAM_SHORT(-0.89)[-0.887]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.160.173:from]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.173:from]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; TAGGED_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4dmCml1bJxz3Qf6 Hi! This looks like it's at least failing on armv7: https://ci.freebsd.org/job/FreeBSD-main-armv7-build/26773/ 02:56:27 --- all_subdir_linuxkpi --- 02:56:27 --- linux_siphash.o --- 02:56:27 /usr/src/sys/compat/linuxkpi/common/src/linux_siphash.c:425:3: error: call =3D 02:56:27 to undeclared function 'rol32'; ISO C99 and later do not support implicit f=3D 02:56:27 unction declarations [-Werror,-Wimplicit-function-declaration] 02:56:27 425 | HSIPROUND; 02:56:27 | ^ -adrian On Mon, 5 Jan 2026 at 12:11, Jean-S=C3=A9bastien P=C3=A9dron wrote: > > The branch main has been updated by dumbbell: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd448578b445da95806ef9af996= a0db9754daadeb > > commit d448578b445da95806ef9af996a0db9754daadeb > Author: Jean-S=C3=A9bastien P=C3=A9dron > AuthorDate: 2025-09-07 13:43:11 +0000 > Commit: Jean-S=C3=A9bastien P=C3=A9dron > CommitDate: 2026-01-05 19:32:50 +0000 > > linuxkpi: Add > > The file is copied as is from Linux 6.10 as it dual-licensend under t= he > GPLv2 and BSD 3-clause. > > The amdgpu DRM driver started to use it in Linux 6.10. > > Reviewed by: bz, emaste > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D54501 > --- > sys/compat/linuxkpi/common/include/linux/siphash.h | 168 +++++++ > sys/compat/linuxkpi/common/src/linux_siphash.c | 546 +++++++++++++++= ++++++ > sys/conf/files | 2 + > sys/modules/linuxkpi/Makefile | 1 + > 4 files changed, 717 insertions(+) > > diff --git a/sys/compat/linuxkpi/common/include/linux/siphash.h b/sys/com= pat/linuxkpi/common/include/linux/siphash.h > new file mode 100644 > index 000000000000..9153e77382e1 > --- /dev/null > +++ b/sys/compat/linuxkpi/common/include/linux/siphash.h > @@ -0,0 +1,168 @@ > +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ > +/* Copyright (C) 2016-2022 Jason A. Donenfeld . All Rig= hts Reserved. > + * > + * SipHash: a fast short-input PRF > + * https://131002.net/siphash/ > + * > + * This implementation is specifically for SipHash2-4 for a secure PRF > + * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for > + * hashtables. > + */ > + > +#ifndef _LINUX_SIPHASH_H > +#define _LINUX_SIPHASH_H > + > +#include > +#include > + > +#define SIPHASH_ALIGNMENT __alignof__(u64) > +typedef struct { > + u64 key[2]; > +} siphash_key_t; > + > +#define siphash_aligned_key_t siphash_key_t __aligned(16) > + > +static inline bool siphash_key_is_zero(const siphash_key_t *key) > +{ > + return !(key->key[0] | key->key[1]); > +} > + > +u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t = *key); > +u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_= t *key); > + > +u64 siphash_1u64(const u64 a, const siphash_key_t *key); > +u64 siphash_2u64(const u64 a, const u64 b, const siphash_key_t *key); > +u64 siphash_3u64(const u64 a, const u64 b, const u64 c, > + const siphash_key_t *key); > +u64 siphash_4u64(const u64 a, const u64 b, const u64 c, const u64 d, > + const siphash_key_t *key); > +u64 siphash_1u32(const u32 a, const siphash_key_t *key); > +u64 siphash_3u32(const u32 a, const u32 b, const u32 c, > + const siphash_key_t *key); > + > +static inline u64 siphash_2u32(const u32 a, const u32 b, > + const siphash_key_t *key) > +{ > + return siphash_1u64((u64)b << 32 | a, key); > +} > +static inline u64 siphash_4u32(const u32 a, const u32 b, const u32 c, > + const u32 d, const siphash_key_t *key) > +{ > + return siphash_2u64((u64)b << 32 | a, (u64)d << 32 | c, key); > +} > + > + > +static inline u64 ___siphash_aligned(const __le64 *data, size_t len, > + const siphash_key_t *key) > +{ > + if (__builtin_constant_p(len) && len =3D=3D 4) > + return siphash_1u32(le32_to_cpup((const __le32 *)data), k= ey); > + if (__builtin_constant_p(len) && len =3D=3D 8) > + return siphash_1u64(le64_to_cpu(data[0]), key); > + if (__builtin_constant_p(len) && len =3D=3D 16) > + return siphash_2u64(le64_to_cpu(data[0]), le64_to_cpu(dat= a[1]), > + key); > + if (__builtin_constant_p(len) && len =3D=3D 24) > + return siphash_3u64(le64_to_cpu(data[0]), le64_to_cpu(dat= a[1]), > + le64_to_cpu(data[2]), key); > + if (__builtin_constant_p(len) && len =3D=3D 32) > + return siphash_4u64(le64_to_cpu(data[0]), le64_to_cpu(dat= a[1]), > + le64_to_cpu(data[2]), le64_to_cpu(dat= a[3]), > + key); > + return __siphash_aligned(data, len, key); > +} > + > +/** > + * siphash - compute 64-bit siphash PRF value > + * @data: buffer to hash > + * @size: size of @data > + * @key: the siphash key > + */ > +static inline u64 siphash(const void *data, size_t len, > + const siphash_key_t *key) > +{ > + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || > + !IS_ALIGNED((unsigned long)data, SIPHASH_ALIGNMENT)) > + return __siphash_unaligned(data, len, key); > + return ___siphash_aligned(data, len, key); > +} > + > +#define HSIPHASH_ALIGNMENT __alignof__(unsigned long) > +typedef struct { > + unsigned long key[2]; > +} hsiphash_key_t; > + > +u32 __hsiphash_aligned(const void *data, size_t len, > + const hsiphash_key_t *key); > +u32 __hsiphash_unaligned(const void *data, size_t len, > + const hsiphash_key_t *key); > + > +u32 hsiphash_1u32(const u32 a, const hsiphash_key_t *key); > +u32 hsiphash_2u32(const u32 a, const u32 b, const hsiphash_key_t *key); > +u32 hsiphash_3u32(const u32 a, const u32 b, const u32 c, > + const hsiphash_key_t *key); > +u32 hsiphash_4u32(const u32 a, const u32 b, const u32 c, const u32 d, > + const hsiphash_key_t *key); > + > +static inline u32 ___hsiphash_aligned(const __le32 *data, size_t len, > + const hsiphash_key_t *key) > +{ > + if (__builtin_constant_p(len) && len =3D=3D 4) > + return hsiphash_1u32(le32_to_cpu(data[0]), key); > + if (__builtin_constant_p(len) && len =3D=3D 8) > + return hsiphash_2u32(le32_to_cpu(data[0]), le32_to_cpu(da= ta[1]), > + key); > + if (__builtin_constant_p(len) && len =3D=3D 12) > + return hsiphash_3u32(le32_to_cpu(data[0]), le32_to_cpu(da= ta[1]), > + le32_to_cpu(data[2]), key); > + if (__builtin_constant_p(len) && len =3D=3D 16) > + return hsiphash_4u32(le32_to_cpu(data[0]), le32_to_cpu(da= ta[1]), > + le32_to_cpu(data[2]), le32_to_cpu(da= ta[3]), > + key); > + return __hsiphash_aligned(data, len, key); > +} > + > +/** > + * hsiphash - compute 32-bit hsiphash PRF value > + * @data: buffer to hash > + * @size: size of @data > + * @key: the hsiphash key > + */ > +static inline u32 hsiphash(const void *data, size_t len, > + const hsiphash_key_t *key) > +{ > + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || > + !IS_ALIGNED((unsigned long)data, HSIPHASH_ALIGNMENT)) > + return __hsiphash_unaligned(data, len, key); > + return ___hsiphash_aligned(data, len, key); > +} > + > +/* > + * These macros expose the raw SipHash and HalfSipHash permutations. > + * Do not use them directly! If you think you have a use for them, > + * be sure to CC the maintainer of this file explaining why. > + */ > + > +#define SIPHASH_PERMUTATION(a, b, c, d) ( \ > + (a) +=3D (b), (b) =3D rol64((b), 13), (b) ^=3D (a), (a) =3D rol64= ((a), 32), \ > + (c) +=3D (d), (d) =3D rol64((d), 16), (d) ^=3D (c), \ > + (a) +=3D (d), (d) =3D rol64((d), 21), (d) ^=3D (a), \ > + (c) +=3D (b), (b) =3D rol64((b), 17), (b) ^=3D (c), (c) =3D rol64= ((c), 32)) > + > +#define SIPHASH_CONST_0 0x736f6d6570736575ULL > +#define SIPHASH_CONST_1 0x646f72616e646f6dULL > +#define SIPHASH_CONST_2 0x6c7967656e657261ULL > +#define SIPHASH_CONST_3 0x7465646279746573ULL > + > +#define HSIPHASH_PERMUTATION(a, b, c, d) ( \ > + (a) +=3D (b), (b) =3D rol32((b), 5), (b) ^=3D (a), (a) =3D rol32(= (a), 16), \ > + (c) +=3D (d), (d) =3D rol32((d), 8), (d) ^=3D (c), \ > + (a) +=3D (d), (d) =3D rol32((d), 7), (d) ^=3D (a), \ > + (c) +=3D (b), (b) =3D rol32((b), 13), (b) ^=3D (c), (c) =3D rol32= ((c), 16)) > + > +#define HSIPHASH_CONST_0 0U > +#define HSIPHASH_CONST_1 0U > +#define HSIPHASH_CONST_2 0x6c796765U > +#define HSIPHASH_CONST_3 0x74656462U > + > +#endif /* _LINUX_SIPHASH_H */ > diff --git a/sys/compat/linuxkpi/common/src/linux_siphash.c b/sys/compat/= linuxkpi/common/src/linux_siphash.c > new file mode 100644 > index 000000000000..b4842a8250e1 > --- /dev/null > +++ b/sys/compat/linuxkpi/common/src/linux_siphash.c > @@ -0,0 +1,546 @@ > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) > +/* Copyright (C) 2016-2022 Jason A. Donenfeld . All Rig= hts Reserved. > + * > + * SipHash: a fast short-input PRF > + * https://131002.net/siphash/ > + * > + * This implementation is specifically for SipHash2-4 for a secure PRF > + * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for > + * hashtables. > + */ > + > +#include > +#include > + > +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG =3D=3D 64 > +#include > +#include > +#endif > + > +#define EXPORT_SYMBOL(name) > + > +#define SIPROUND SIPHASH_PERMUTATION(v0, v1, v2, v3) > + > +#define PREAMBLE(len) \ > + u64 v0 =3D SIPHASH_CONST_0; \ > + u64 v1 =3D SIPHASH_CONST_1; \ > + u64 v2 =3D SIPHASH_CONST_2; \ > + u64 v3 =3D SIPHASH_CONST_3; \ > + u64 b =3D ((u64)(len)) << 56; \ > + v3 ^=3D key->key[1]; \ > + v2 ^=3D key->key[0]; \ > + v1 ^=3D key->key[1]; \ > + v0 ^=3D key->key[0]; > + > +#define POSTAMBLE \ > + v3 ^=3D b; \ > + SIPROUND; \ > + SIPROUND; \ > + v0 ^=3D b; \ > + v2 ^=3D 0xff; \ > + SIPROUND; \ > + SIPROUND; \ > + SIPROUND; \ > + SIPROUND; \ > + return (v0 ^ v1) ^ (v2 ^ v3); > + > +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS > +u64 __siphash_aligned(const void *_data, size_t len, const siphash_key_t= *key) > +{ > + const u8 *data =3D _data; > + const u8 *end =3D data + len - (len % sizeof(u64)); > + const u8 left =3D len & (sizeof(u64) - 1); > + u64 m; > + PREAMBLE(len) > + for (; data !=3D end; data +=3D sizeof(u64)) { > + m =3D le64_to_cpup(data); > + v3 ^=3D m; > + SIPROUND; > + SIPROUND; > + v0 ^=3D m; > + } > +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG =3D=3D 64 > + if (left) > + b |=3D le64_to_cpu((__force __le64)(load_unaligned_zeropa= d(data) & > + bytemask_from_count(lef= t))); > +#else > + switch (left) { > + case 7: b |=3D ((u64)end[6]) << 48; fallthrough; > + case 6: b |=3D ((u64)end[5]) << 40; fallthrough; > + case 5: b |=3D ((u64)end[4]) << 32; fallthrough; > + case 4: b |=3D le32_to_cpup(data); break; > + case 3: b |=3D ((u64)end[2]) << 16; fallthrough; > + case 2: b |=3D le16_to_cpup(data); break; > + case 1: b |=3D end[0]; > + } > +#endif > + POSTAMBLE > +} > +EXPORT_SYMBOL(__siphash_aligned); > +#endif > + > +u64 __siphash_unaligned(const void *_data, size_t len, const siphash_key= _t *key) > +{ > + const u8 *data =3D _data; > + const u8 *end =3D data + len - (len % sizeof(u64)); > + const u8 left =3D len & (sizeof(u64) - 1); > + u64 m; > + PREAMBLE(len) > + for (; data !=3D end; data +=3D sizeof(u64)) { > + m =3D get_unaligned_le64(data); > + v3 ^=3D m; > + SIPROUND; > + SIPROUND; > + v0 ^=3D m; > + } > +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG =3D=3D 64 > + if (left) > + b |=3D le64_to_cpu((__force __le64)(load_unaligned_zeropa= d(data) & > + bytemask_from_count(lef= t))); > +#else > + switch (left) { > + case 7: b |=3D ((u64)end[6]) << 48; fallthrough; > + case 6: b |=3D ((u64)end[5]) << 40; fallthrough; > + case 5: b |=3D ((u64)end[4]) << 32; fallthrough; > + case 4: b |=3D get_unaligned_le32(end); break; > + case 3: b |=3D ((u64)end[2]) << 16; fallthrough; > + case 2: b |=3D get_unaligned_le16(end); break; > + case 1: b |=3D end[0]; > + } > +#endif > + POSTAMBLE > +} > +EXPORT_SYMBOL(__siphash_unaligned); > + > +/** > + * siphash_1u64 - compute 64-bit siphash PRF value of a u64 > + * @first: first u64 > + * @key: the siphash key > + */ > +u64 siphash_1u64(const u64 first, const siphash_key_t *key) > +{ > + PREAMBLE(8) > + v3 ^=3D first; > + SIPROUND; > + SIPROUND; > + v0 ^=3D first; > + POSTAMBLE > +} > +EXPORT_SYMBOL(siphash_1u64); > + > +/** > + * siphash_2u64 - compute 64-bit siphash PRF value of 2 u64 > + * @first: first u64 > + * @second: second u64 > + * @key: the siphash key > + */ > +u64 siphash_2u64(const u64 first, const u64 second, const siphash_key_t = *key) > +{ > + PREAMBLE(16) > + v3 ^=3D first; > + SIPROUND; > + SIPROUND; > + v0 ^=3D first; > + v3 ^=3D second; > + SIPROUND; > + SIPROUND; > + v0 ^=3D second; > + POSTAMBLE > +} > +EXPORT_SYMBOL(siphash_2u64); > + > +/** > + * siphash_3u64 - compute 64-bit siphash PRF value of 3 u64 > + * @first: first u64 > + * @second: second u64 > + * @third: third u64 > + * @key: the siphash key > + */ > +u64 siphash_3u64(const u64 first, const u64 second, const u64 third, > + const siphash_key_t *key) > +{ > + PREAMBLE(24) > + v3 ^=3D first; > + SIPROUND; > + SIPROUND; > + v0 ^=3D first; > + v3 ^=3D second; > + SIPROUND; > + SIPROUND; > + v0 ^=3D second; > + v3 ^=3D third; > + SIPROUND; > + SIPROUND; > + v0 ^=3D third; > + POSTAMBLE > +} > +EXPORT_SYMBOL(siphash_3u64); > + > +/** > + * siphash_4u64 - compute 64-bit siphash PRF value of 4 u64 > + * @first: first u64 > + * @second: second u64 > + * @third: third u64 > + * @forth: forth u64 > + * @key: the siphash key > + */ > +u64 siphash_4u64(const u64 first, const u64 second, const u64 third, > + const u64 forth, const siphash_key_t *key) > +{ > + PREAMBLE(32) > + v3 ^=3D first; > + SIPROUND; > + SIPROUND; > + v0 ^=3D first; > + v3 ^=3D second; > + SIPROUND; > + SIPROUND; > + v0 ^=3D second; > + v3 ^=3D third; > + SIPROUND; > + SIPROUND; > + v0 ^=3D third; > + v3 ^=3D forth; > + SIPROUND; > + SIPROUND; > + v0 ^=3D forth; > + POSTAMBLE > +} > +EXPORT_SYMBOL(siphash_4u64); > + > +u64 siphash_1u32(const u32 first, const siphash_key_t *key) > +{ > + PREAMBLE(4) > + b |=3D first; > + POSTAMBLE > +} > +EXPORT_SYMBOL(siphash_1u32); > + > +u64 siphash_3u32(const u32 first, const u32 second, const u32 third, > + const siphash_key_t *key) > +{ > + u64 combined =3D (u64)second << 32 | first; > + PREAMBLE(12) > + v3 ^=3D combined; > + SIPROUND; > + SIPROUND; > + v0 ^=3D combined; > + b |=3D third; > + POSTAMBLE > +} > +EXPORT_SYMBOL(siphash_3u32); > + > +#if BITS_PER_LONG =3D=3D 64 > +/* Note that on 64-bit, we make HalfSipHash1-3 actually be SipHash1-3, f= or > + * performance reasons. On 32-bit, below, we actually implement HalfSipH= ash1-3. > + */ > + > +#define HSIPROUND SIPROUND > +#define HPREAMBLE(len) PREAMBLE(len) > +#define HPOSTAMBLE \ > + v3 ^=3D b; \ > + HSIPROUND; \ > + v0 ^=3D b; \ > + v2 ^=3D 0xff; \ > + HSIPROUND; \ > + HSIPROUND; \ > + HSIPROUND; \ > + return (v0 ^ v1) ^ (v2 ^ v3); > + > +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS > +u32 __hsiphash_aligned(const void *_data, size_t len, const hsiphash_key= _t *key) > +{ > + const u8 *data =3D _data; > + const u8 *end =3D data + len - (len % sizeof(u64)); > + const u8 left =3D len & (sizeof(u64) - 1); > + u64 m; > + HPREAMBLE(len) > + for (; data !=3D end; data +=3D sizeof(u64)) { > + m =3D le64_to_cpup(data); > + v3 ^=3D m; > + HSIPROUND; > + v0 ^=3D m; > + } > +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG =3D=3D 64 > + if (left) > + b |=3D le64_to_cpu((__force __le64)(load_unaligned_zeropa= d(data) & > + bytemask_from_count(lef= t))); > +#else > + switch (left) { > + case 7: b |=3D ((u64)end[6]) << 48; fallthrough; > + case 6: b |=3D ((u64)end[5]) << 40; fallthrough; > + case 5: b |=3D ((u64)end[4]) << 32; fallthrough; > + case 4: b |=3D le32_to_cpup(data); break; > + case 3: b |=3D ((u64)end[2]) << 16; fallthrough; > + case 2: b |=3D le16_to_cpup(data); break; > + case 1: b |=3D end[0]; > + } > +#endif > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(__hsiphash_aligned); > +#endif > + > +u32 __hsiphash_unaligned(const void *_data, size_t len, > + const hsiphash_key_t *key) > +{ > + const u8 *data =3D _data; > + const u8 *end =3D data + len - (len % sizeof(u64)); > + const u8 left =3D len & (sizeof(u64) - 1); > + u64 m; > + HPREAMBLE(len) > + for (; data !=3D end; data +=3D sizeof(u64)) { > + m =3D get_unaligned_le64(data); > + v3 ^=3D m; > + HSIPROUND; > + v0 ^=3D m; > + } > +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG =3D=3D 64 > + if (left) > + b |=3D le64_to_cpu((__force __le64)(load_unaligned_zeropa= d(data) & > + bytemask_from_count(lef= t))); > +#else > + switch (left) { > + case 7: b |=3D ((u64)end[6]) << 48; fallthrough; > + case 6: b |=3D ((u64)end[5]) << 40; fallthrough; > + case 5: b |=3D ((u64)end[4]) << 32; fallthrough; > + case 4: b |=3D get_unaligned_le32(end); break; > + case 3: b |=3D ((u64)end[2]) << 16; fallthrough; > + case 2: b |=3D get_unaligned_le16(end); break; > + case 1: b |=3D end[0]; > + } > +#endif > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(__hsiphash_unaligned); > + > +/** > + * hsiphash_1u32 - compute 64-bit hsiphash PRF value of a u32 > + * @first: first u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) > +{ > + HPREAMBLE(4) > + b |=3D first; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_1u32); > + > +/** > + * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 > + * @first: first u32 > + * @second: second u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_= t *key) > +{ > + u64 combined =3D (u64)second << 32 | first; > + HPREAMBLE(8) > + v3 ^=3D combined; > + HSIPROUND; > + v0 ^=3D combined; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_2u32); > + > +/** > + * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 > + * @first: first u32 > + * @second: second u32 > + * @third: third u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, > + const hsiphash_key_t *key) > +{ > + u64 combined =3D (u64)second << 32 | first; > + HPREAMBLE(12) > + v3 ^=3D combined; > + HSIPROUND; > + v0 ^=3D combined; > + b |=3D third; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_3u32); > + > +/** > + * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 > + * @first: first u32 > + * @second: second u32 > + * @third: third u32 > + * @forth: forth u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, > + const u32 forth, const hsiphash_key_t *key) > +{ > + u64 combined =3D (u64)second << 32 | first; > + HPREAMBLE(16) > + v3 ^=3D combined; > + HSIPROUND; > + v0 ^=3D combined; > + combined =3D (u64)forth << 32 | third; > + v3 ^=3D combined; > + HSIPROUND; > + v0 ^=3D combined; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_4u32); > +#else > +#define HSIPROUND HSIPHASH_PERMUTATION(v0, v1, v2, v3) > + > +#define HPREAMBLE(len) \ > + u32 v0 =3D HSIPHASH_CONST_0; \ > + u32 v1 =3D HSIPHASH_CONST_1; \ > + u32 v2 =3D HSIPHASH_CONST_2; \ > + u32 v3 =3D HSIPHASH_CONST_3; \ > + u32 b =3D ((u32)(len)) << 24; \ > + v3 ^=3D key->key[1]; \ > + v2 ^=3D key->key[0]; \ > + v1 ^=3D key->key[1]; \ > + v0 ^=3D key->key[0]; > + > +#define HPOSTAMBLE \ > + v3 ^=3D b; \ > + HSIPROUND; \ > + v0 ^=3D b; \ > + v2 ^=3D 0xff; \ > + HSIPROUND; \ > + HSIPROUND; \ > + HSIPROUND; \ > + return v1 ^ v3; > + > +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS > +u32 __hsiphash_aligned(const void *_data, size_t len, const hsiphash_key= _t *key) > +{ > + const u8 *data =3D _data; > + const u8 *end =3D data + len - (len % sizeof(u32)); > + const u8 left =3D len & (sizeof(u32) - 1); > + u32 m; > + HPREAMBLE(len) > + for (; data !=3D end; data +=3D sizeof(u32)) { > + m =3D le32_to_cpup(data); > + v3 ^=3D m; > + HSIPROUND; > + v0 ^=3D m; > + } > + switch (left) { > + case 3: b |=3D ((u32)end[2]) << 16; fallthrough; > + case 2: b |=3D le16_to_cpup(data); break; > + case 1: b |=3D end[0]; > + } > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(__hsiphash_aligned); > +#endif > + > +u32 __hsiphash_unaligned(const void *_data, size_t len, > + const hsiphash_key_t *key) > +{ > + const u8 *data =3D _data; > + const u8 *end =3D data + len - (len % sizeof(u32)); > + const u8 left =3D len & (sizeof(u32) - 1); > + u32 m; > + HPREAMBLE(len) > + for (; data !=3D end; data +=3D sizeof(u32)) { > + m =3D get_unaligned_le32(data); > + v3 ^=3D m; > + HSIPROUND; > + v0 ^=3D m; > + } > + switch (left) { > + case 3: b |=3D ((u32)end[2]) << 16; fallthrough; > + case 2: b |=3D get_unaligned_le16(end); break; > + case 1: b |=3D end[0]; > + } > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(__hsiphash_unaligned); > + > +/** > + * hsiphash_1u32 - compute 32-bit hsiphash PRF value of a u32 > + * @first: first u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) > +{ > + HPREAMBLE(4) > + v3 ^=3D first; > + HSIPROUND; > + v0 ^=3D first; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_1u32); > + > +/** > + * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 > + * @first: first u32 > + * @second: second u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_= t *key) > +{ > + HPREAMBLE(8) > + v3 ^=3D first; > + HSIPROUND; > + v0 ^=3D first; > + v3 ^=3D second; > + HSIPROUND; > + v0 ^=3D second; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_2u32); > + > +/** > + * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 > + * @first: first u32 > + * @second: second u32 > + * @third: third u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, > + const hsiphash_key_t *key) > +{ > + HPREAMBLE(12) > + v3 ^=3D first; > + HSIPROUND; > + v0 ^=3D first; > + v3 ^=3D second; > + HSIPROUND; > + v0 ^=3D second; > + v3 ^=3D third; > + HSIPROUND; > + v0 ^=3D third; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_3u32); > + > +/** > + * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 > + * @first: first u32 > + * @second: second u32 > + * @third: third u32 > + * @forth: forth u32 > + * @key: the hsiphash key > + */ > +u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, > + const u32 forth, const hsiphash_key_t *key) > +{ > + HPREAMBLE(16) > + v3 ^=3D first; > + HSIPROUND; > + v0 ^=3D first; > + v3 ^=3D second; > + HSIPROUND; > + v0 ^=3D second; > + v3 ^=3D third; > + HSIPROUND; > + v0 ^=3D third; > + v3 ^=3D forth; > + HSIPROUND; > + v0 ^=3D forth; > + HPOSTAMBLE > +} > +EXPORT_SYMBOL(hsiphash_4u32); > +#endif > diff --git a/sys/conf/files b/sys/conf/files > index 8deb2bd400c0..d0c4ea5f544d 100644 > --- a/sys/conf/files > +++ b/sys/conf/files > @@ -4704,6 +4704,8 @@ compat/linuxkpi/common/src/linux_shmemfs.c o= ptional compat_linuxkpi \ > compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_shrinker.c optional compat_linuxkpi = \ > compile-with "${LINUXKPI_C}" > +compat/linuxkpi/common/src/linux_siphash.c optional compat_linuxkpi = \ > + compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_skbuff.c optional compat_linuxkpi = \ > compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_slab.c optional compat_l= inuxkpi \ > diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefil= e > index a662f5dffbb6..c465c76a7626 100644 > --- a/sys/modules/linuxkpi/Makefile > +++ b/sys/modules/linuxkpi/Makefile > @@ -28,6 +28,7 @@ SRCS=3D linux_compat.c \ > linux_shmemfs.c \ > linux_shrinker.c \ > linux_simple_attr.c \ > + linux_siphash.c \ > linux_skbuff.c \ > linux_slab.c \ > linux_tasklet.c \ > From nobody Wed Jan 7 08:04:48 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmLDJ48PTz6MQfv for ; Wed, 07 Jan 2026 08:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmLDJ27nPz3rsL for ; Wed, 07 Jan 2026 08:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767773088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yip3FsZ5l5Wmbwvf0zZ+8kKLiZ3m9Vt0+safRIPXKiM=; b=Tvsjv8/S/xm2lfOVwG3a1sXs+/hadyodJeW5al88nre/Ng/5jypugWhc2kLGEUdGX88YX4 6PBdwd9TkBdFo4whjkjQOXnywTHiekXcCM/Xh+m81dvNB0ZiujmvkQr7R8xs+h6RUVvpUN w/CGxrwlCjXYewS7HOVKBF5vATp3bpPeD7Y6tPidQq/qsPY+CyCu4shj0IB1a5YKHHxg20 xZvUwgShFgoNTMEcdGa4zCo8Ma7ABn5h4QiVa8ZVBZ3hAkchmdaxJH/oC1/Yb4pXyOw9Vz HKSYTWJ4XB+HzgptlRpJvoUA6hQDRJt1NU9q7wD5XRNadXeeLm/aXSDPMEVsOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767773088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yip3FsZ5l5Wmbwvf0zZ+8kKLiZ3m9Vt0+safRIPXKiM=; b=jScbUWJ7LnjBV4eu73xY6haYYJT0HmlfHgBIHHxJd1Bwlk2aFY32AoCC1fI7cs9r2UgYMV YqhVxBCA+0xee2Z81lWNy+HR5Vw0pvoeb9QFtiTuj3n0Jg88F3lmhD+P8PWF9Yzcfn/o1O 6nWqM2x60Gt0kxKGCw2jx9/zrMyX7GPH50chWTcFYwIuc0LTl2kuD3Fo7GCBgIOrSbuZnP 4S4/8ku8i3LUvDjnSRdPWtyIyleaw8SSCoO6VJTGO+OLTegfiyxwSjZzHuq9/oUGsIqboU 0K8DFJlpVeY1cq+Oco8erQ78HALtowCMWWBjJLC2snaUkup1yNji34fNeYzS9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767773088; a=rsa-sha256; cv=none; b=UPj1sztFdTu0JLntLAzNEZnVNSgcgRa4kS7kf0w6vjnOOKdwnkHCVl36DBtgfhPumNbN75 lXj1SZT5yzID9gbR7LfKf78M1bUEh28mE69fnGsJ9uS4LSjEPYrglMmHytGsSEzSg/TwT5 HKhymmAtzMTlGgxlpOU/07ZjrcB7oYWjjnWh2WRxzxfjB5VrLN8C8qJA6Fyf3J0xuO6eS3 wmN8fh5UrGjsPbg4MXrdO5FGWvWc8BDyrii484LNvX/DYPvKGyaLbYNX+uowBp6ZAvvbn9 bTF2HaaNXRb3IogZXsXMRJnHpO5j7pe0YoKDXz6r7xq2rhxyqDIk4i1G4sZH8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmLDJ0v7Bzknm for ; Wed, 07 Jan 2026 08:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43846 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 08:04:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: c2b407244f3a - main - mrsas.4: Fix devid hex style List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2b407244f3a939d8b09f9a22d872ebdce5f6b19 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 08:04:48 +0000 Message-Id: <695e13a0.43846.6f8e7c87@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=c2b407244f3a939d8b09f9a22d872ebdce5f6b19 commit c2b407244f3a939d8b09f9a22d872ebdce5f6b19 Author: Michael Osipov AuthorDate: 2026-01-07 08:04:14 +0000 Commit: Michael Osipov CommitDate: 2026-01-07 08:04:14 +0000 mrsas.4: Fix devid hex style --- share/man/man4/mrsas.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index c128717600c0..6645835d0bb2 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -334,7 +334,7 @@ was extended to support up to MR-Fusion .Nm is the new driver reworked by LSI which supports Thunderbolt and onward products. -The SAS+SATA RAID controller with device id 0x005b is referred to as +The SAS+SATA RAID controller with device id 0x005B is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged From nobody Wed Jan 7 12:30:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmS6S4BBvz6MmhJ for ; Wed, 07 Jan 2026 12:30: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmS6S3T2Lz3LWX for ; Wed, 07 Jan 2026 12:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767789008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GATqophu18ZYJjEdfOezLmFi+gR+5ajpqvAT+9qzvto=; b=cB35iXsUidj0SLZ0Gerg+NRg2xiCUSVMczfVGijI2Y0c3lz6b9auEJlaiGUwjugJ3GkzQY b3BKjJETEV6SPjP8JJGrN5gNr7eCKH7EYgteTJTffGvlfKa0zbX91qBlESlMhnkfx2iKT6 VyAoOxWWiwInpmHSBNG8cWb0hn4Kd11H1SwlpNlse+YmvLTXUvFIuzlmYV9KPgZwQF6T03 dF7PNoHVlO5eS3bsICPFQQ/KGExMCKkztvBXgdCDW8px/hmeJAfotnFsnxsSGNt6nJ+lcm 35ApHRF9NF9WerSdkO6NYtUqgCks9PtuPJimdVjFg+VGMiwKIx/GE8do/UbMgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767789008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GATqophu18ZYJjEdfOezLmFi+gR+5ajpqvAT+9qzvto=; b=wdxhgeLswGdEUOkA7U4FzNTG1OJN+AijD17OhEiKCSqPGPl6NJSTLtIR6vYlJXd4ODEKl0 LHKBrlLwXLdGnxBi3mfMCuJcgVjqhhUt27QQIx1NJCnLxjvXYihR5imUuYMl47EyztTKAK S19xAh/3m2Uh+loGgdeKfG5v4ySqH3X/T2pmYNxup5P69J+PX3oJqA1+CLSkU0DqHACr9w 2PjbEHdKjoXeyPEvIrX49SxX+RiTLuIFwbyyJTo3hYrOwcMYOvxoduBDcQ2QDCHmYL5HQ/ zsmC0uc+t7d2m1w7PL/FgAXAPWCFo6/9GmT4QAFVYp+SUaNbEZtqUEfF7uQ7JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767789008; a=rsa-sha256; cv=none; b=BvsDlOTj49ZsnEwQW7BxEU8ZtRKRe9M92nbP5kcyVU/ULpCf1HLQ1d75SNgyC+l+rAURyk QkLfBXt/IhK0cWKZ9l9E8jq2W14tT5XIJlULVGMNt4u8E6CF6OYJZmP3nHfHGgciqTA496 BRdJ88dJx92Od/baDTRZwjl25cdj5+Ob6s+4ZlGy09MRlVay7JnR32jMWb9DvESVXCtSMg wPq2TMIPA4OGJE1VdwH8vTzSadsZOgUL9CaStvdOtMyqMRgiH5yvMAs9L+CqQCPgmx+Irj oP6jrN9Bi9LtgzQ1oiL6qqGsK4M/TtYl2z+f+v+pbBQK0w6chYGwnLa3LkkntQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmS6S2vFtzsxN for ; Wed, 07 Jan 2026 12:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 356da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 12:30:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: =?utf-8?Q?Gon=C3=A9ri?= Le Bouder From: Baptiste Daroussin Subject: git: cbc00fcc2b92 - main - nuageinit: only create the default user when needed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbc00fcc2b92e6e38b0a180261547b1a22b461bd Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 12:30:08 +0000 Message-Id: <695e51d0.356da.589e9924@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=cbc00fcc2b92e6e38b0a180261547b1a22b461bd commit cbc00fcc2b92e6e38b0a180261547b1a22b461bd Author: Gonéri Le Bouder AuthorDate: 2026-01-06 17:18:46 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-07 12:29:58 +0000 nuageinit: only create the default user when needed The "default" user should only be created when: - the `users` key is missing - or the `default` string is present in the `users` list Since the `public_keys` is extracted from the meta-data, this patch has to slightly adjust the way they are loaded. The change simplify the logic around the default user SSH key injection. Both `ssh_authorized_keys` and `public_keys` are handled at the same time. MFC After: 1 week Signed-off-by: Gonéri Le Bouder Pull Request: https://github.com/freebsd/freebsd-src/pull/1952 --- libexec/nuageinit/nuageinit | 150 ++++++++++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 62 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 9aaec1b87a6a..40e19f98de6c 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -16,14 +16,28 @@ end local ni_path = arg[1] local citype = arg[2] -local default_user = { - name = "freebsd", - homedir = "/home/freebsd", - groups = "wheel", - gecos = "FreeBSD User", - shell = "/bin/sh", - plain_text_passwd = "freebsd" -} +local function default_user(obj, metadata) + local ssh_authorized_keys = {} + if type(metadata.public_keys) == "table" then + for _, k in pairs(metadata.public_keys) do + table.insert(ssh_authorized_keys, k) + end + end + if type(obj.ssh_authorized_keys) == "table" then + for _, k in ipairs(obj.ssh_authorized_keys) do + table.insert(ssh_authorized_keys, k) + end + end + return { + name = "freebsd", + homedir = "/home/freebsd", + groups = "wheel", + gecos = "FreeBSD User", + shell = "/bin/sh", + plain_text_passwd = "freebsd", + ssh_authorized_keys = ssh_authorized_keys + } +end local root = os.getenv("NUAGE_FAKE_ROOTDIR") if not root then @@ -78,12 +92,16 @@ local function get_ifaces_by_mac() return myifaces end -local function sethostname(obj) +local function sethostname(obj, metadata) -- always prefer fqdn if specified over hostname if obj.fqdn then nuage.sethostname(obj.fqdn) elseif obj.hostname then nuage.sethostname(obj.hostname) + elseif metadata["local-hostname"] then + nuage.sethostname(metadata["local-hostname"]) + elseif metadata["local"] then + nuage.sethostname(metadata["hostname"]) end end @@ -110,20 +128,40 @@ local function groups(obj) end end -local function create_default_user(obj) - if not obj.users then - -- default user if none are defined - nuage.adduser(default_user) +local function create_default_user(obj, metadata) + local function need_default_user() + if not obj.users then + -- default user if "users" is undefined + return true + end + -- create default user if "default" is in the users list + for _, u in pairs(obj.users) do + if type(u) == "string" and u == "default" then + return true + end + end + return false + end + + if need_default_user() then + local du = default_user(obj, metadata) + local homedir = nuage.adduser(du) + if du.ssh_authorized_keys then + for _, k in ipairs(du.ssh_authorized_keys) do + nuage.addsshkey(homedir, k) + end + end end end -local function users(obj) +local function users(obj, metadata) if obj.users == nil then return end for n, u in pairs(obj.users) do if type(u) == "string" then if u == "default" then - nuage.adduser(default_user) + -- already done during create_default_user + nuage.adduser(default_user(obj, metadata)) else nuage.adduser({name = u}) end @@ -180,14 +218,6 @@ local function ssh_keys(obj) end end -local function ssh_authorized_keys(obj) - if obj.ssh_authorized_keys == nil then return end - local homedir = nuage.adduser(default_user) - for _, k in ipairs(obj.ssh_authorized_keys) do - nuage.addsshkey(homedir, k) - end -end - local function nameservers(interface, obj) local resolvconf_conf_handler = open_resolvconf_conf() @@ -280,17 +310,17 @@ local function get_ifaces_by_driver() local drivers = {} local last_interface = nil for line in proc:lines() do - local interface = line:match("^([%S]+): ") + local interface = line:match("^([%S]+): ") - if interface then + if interface then last_interface = interface - end + end - local driver = line:match("^[%s]+drivername: ([%S]+)$") + local driver = line:match("^[%s]+drivername: ([%S]+)$") - if driver then + if driver then drivers[driver] = last_interface - end + end end proc:close() @@ -632,45 +662,42 @@ local function parse_network_config() return netobj end -if citype == "config-2" then - local parser = ucl.parser() - local res, err = parser:parse_file(ni_path .. "/meta_data.json") +local function load_metadata() + if citype == "config-2" then + local parser = ucl.parser() + local res, err = parser:parse_file(ni_path .. "/meta_data.json") - if not res then - nuage.err("error parsing config-2 meta_data.json: " .. err) - end - local obj = parser:get_object() - if obj.public_keys then - local homedir = nuage.adduser(default_user) - for _,v in pairs(obj.public_keys) do - nuage.addsshkey(homedir, v) + if not res then + nuage.err("error parsing config-2 meta_data.json: " .. err) + end + local obj = parser:get_object() + + return obj + elseif citype == "nocloud" then + local f, err = io.open(ni_path .. "/meta-data") + if err then + nuage.err("error parsing nocloud meta-data: " .. err) end + local obj = yaml.load(f:read("*a")) + f:close() + if not obj then + nuage.err("error parsing nocloud meta-data") + end + return obj + elseif citype ~= "postnet" then + nuage.err("Unknown cloud init type: " .. citype) end - nuage.sethostname(obj["hostname"]) + return {} +end + +if citype == "config-2" then -- network config2_network(ni_path) -elseif citype == "nocloud" then - local f, err = io.open(ni_path .. "/meta-data") - if err then - nuage.err("error parsing nocloud meta-data: " .. err) - end - local obj = yaml.load(f:read("*a")) - f:close() - if not obj then - nuage.err("error parsing nocloud meta-data") - end - local hostname = obj["local-hostname"] - if not hostname then - hostname = obj["hostname"] - end - if hostname then - nuage.sethostname(hostname) - end -elseif citype ~= "postnet" then - nuage.err("Unknown cloud init type: " .. citype) end +local metadata = load_metadata() + -- deal with user-data local ud = nil local f = nil @@ -709,7 +736,6 @@ if line == "#cloud-config" then groups, create_default_user, ssh_keys, - ssh_authorized_keys, network_config, ssh_pwauth, runcmd, @@ -740,7 +766,7 @@ if line == "#cloud-config" then local netobj = parse_network_config() or obj network_config(netobj) else - calls_table[i](obj) + calls_table[i](obj, metadata) end end elseif line:sub(1, 2) == "#!" then From nobody Wed Jan 7 14:20:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmVYF32b0z6MvRn for ; Wed, 07 Jan 2026 14:20: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmVYF1tZhz3ccB for ; Wed, 07 Jan 2026 14:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767795601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cDvQeHJNCv/bW/yV4tHj33lsv2Yv/OSpUX25Bo44Sf8=; b=IFCBy6X9oUJt9GAjwa3fDzxpwMudLpJQZ9jVgtk527hy16xJ7ehakejBwYJCVVmd5Mwq2L u6e5Sps3BzMryaE7scXy39DvxH3fFBtC1OfQbcx+8CJywjyqnx7JFSX99c93iqaA6ab5mI 8nwhetGdz6g5tMyoCQRVt5Tm1THl7m1XIw7CVFclC6crfJ+x80g32aT+wkWHrdryPyX9Yo s5TDuNKtqoTxyhFPrl1kROZsvZHNDL30H9YqCBqnyjCmucpcZRFU6EsSdYX6rvnVk5Rk22 /ErVWo10HcPPzQHpMSBNIQJ6i7+aa5gpEWKl6DZWEXbbnoA6UWzjkUmNdrLE9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767795601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cDvQeHJNCv/bW/yV4tHj33lsv2Yv/OSpUX25Bo44Sf8=; b=BwAoULU+++599gdQd4QOTH4iZ/uKHojlbfpGrYjy4zdM2wTbhRaVppUjfBHmUUN6rCZkIg mpz6Bn9ekp7Xx4oMXr+qVtV2hDiTd7LcbqGmA1E8Z3RI4On0vv6ZGBY4oNVYtO0Yo3zhF/ MuytjgJVDV0GDLFmzb2vz7fQ/dCXcKGCkROTnws6CIv6o9WLUpjkPzkDXUdYQsmp/4jvVH MIDKXvpuUxtuNzNzneAHCjI+kqKgJmRD0kfWLa1fF2fgW6uCWRWQCou2Ox51FKdeJOns3v X5c3Wn+wsFISqZn8tUhTLqiL+2Q/pODHt6283Ws1k24vTOhrTJ5rSTQTieevyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767795601; a=rsa-sha256; cv=none; b=HoX3XfqaYHJRrT6Bsez/C8GjLEEr1d89DlHlTzWg6lsNw9VybDgHOeH7Z76ShMxQLt14Xv f9AldUOy22uci/6iEAIyU+/X39KPqNzgqgLqzbM8e3sx8zlpn9flpK9Q4ySf8tiU9Yi044 /SltaPklGqJqSYH3LGkfVFeeDfn8iP5Ignlm3Z5RaA6LLe3op1i6+/WEmOGCJRH9tUBPSQ hU9jyzz5zJb2OQ6andYKdemmk7osVT8w1DvCDzjLCyJn5V0PF9R4Y7m3Mp+jbJiHiHFhnl ti+HT/L9wRene1WrHabjh3UlULyOhKYgZUci/hdzOZyvuWXSIYBHipKhq3aKbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmVYF0x2Wzwh3 for ; Wed, 07 Jan 2026 14:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fdfa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 14:20:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: d07198ff72ae - main - release: stop disabling sendmail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d07198ff72aeddc5a884cfb81b22c22f2abf88f6 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 14:20:01 +0000 Message-Id: <695e6b91.3fdfa.1184f69e@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d07198ff72aeddc5a884cfb81b22c22f2abf88f6 commit d07198ff72aeddc5a884cfb81b22c22f2abf88f6 Author: Baptiste Daroussin AuthorDate: 2026-01-07 13:55:54 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-07 14:19:43 +0000 release: stop disabling sendmail sendmail is already disabled by default everywhere since 14.0 MFC After: 1 week Approved by: emaste (re) Reviewed by: emaste (re) Differential Revision: https://reviews.freebsd.org/D54575 --- release/Makefile | 3 --- release/tools/arm.subr | 4 ---- release/tools/openstack.conf | 6 ------ release/tools/oracle.conf | 1 - release/tools/vagrant.conf | 6 ------ 5 files changed, 20 deletions(-) diff --git a/release/Makefile b/release/Makefile index 230eb66fc077..bcc640075bf0 100644 --- a/release/Makefile +++ b/release/Makefile @@ -278,7 +278,6 @@ disc1: .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf - echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf @@ -323,7 +322,6 @@ bootonly: .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf - echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf @@ -382,7 +380,6 @@ dvd: .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf - echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 5c5ebd29681d..55e918e36d97 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -209,10 +209,6 @@ arm_install_base() { echo "hostname=\"${hostname}\"" > ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'ifconfig_DEFAULT="DHCP inet6 accept_rtadv"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'sshd_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf - echo 'sendmail_enable="NONE"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf - echo 'sendmail_submit_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf - echo 'sendmail_outbound_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf - echo 'sendmail_msp_queue_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'growfs_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf if [ -n "${CONFIG_POWERD_ENABLE}" ]; then echo 'powerd_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf diff --git a/release/tools/openstack.conf b/release/tools/openstack.conf index b73734a4fd04..9ce65a75c3c5 100644 --- a/release/tools/openstack.conf +++ b/release/tools/openstack.conf @@ -22,12 +22,6 @@ vm_extra_pre_umount() { # Allow root to ssh using keys echo 'PermitRootLogin without-password' >> ${DESTDIR}/etc/ssh/sshd_config - # Disable sendmail - echo 'sendmail_enable="NO"' >> ${DESTDIR}/etc/rc.conf - echo 'sendmail_submit_enable="NO"' >> ${DESTDIR}/etc/rc.conf - echo 'sendmail_outbound_enable="NO"' >> ${DESTDIR}/etc/rc.conf - echo 'sendmail_msp_queue_enable="NO"' >> ${DESTDIR}/etc/rc.conf - # Enable DHCP for the OpenStack instance echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf diff --git a/release/tools/oracle.conf b/release/tools/oracle.conf index 152c48af1829..b289f4e4e7e7 100644 --- a/release/tools/oracle.conf +++ b/release/tools/oracle.conf @@ -55,7 +55,6 @@ MISSING_METALOGS=" vm_extra_pre_umount() { cat <<-'EOF' >> ${DESTDIR}/etc/rc.conf dumpdev=AUTO - sendmail_enable=NONE EOF cat <<-'EOF' >> ${DESTDIR}/boot/loader.conf diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index 5b0f38b740a6..6f4420bf26cc 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -33,12 +33,6 @@ vagrant_common () { # Disable DNS lookups by default to make SSH connect quickly echo 'UseDNS no' >> ${DESTDIR}/etc/ssh/sshd_config - # Disable sendmail - echo 'sendmail_enable="NO"' >> ${DESTDIR}/etc/rc.conf - echo 'sendmail_submit_enable="NO"' >> ${DESTDIR}/etc/rc.conf - echo 'sendmail_outbound_enable="NO"' >> ${DESTDIR}/etc/rc.conf - echo 'sendmail_msp_queue_enable="NO"' >> ${DESTDIR}/etc/rc.conf - # Create the vagrant user with a password of vagrant /usr/sbin/pw -R ${DESTDIR} \ groupadd vagrant -g 1001 From nobody Wed Jan 7 14:35:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmVtx6bkTz6MwkP for ; Wed, 07 Jan 2026 14: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmVtx3Rlzz3f2B for ; Wed, 07 Jan 2026 14:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767796521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BuSlnJoXsUffhSM6NFVRD/qRh7lQIAy9cPhRbTeXjbM=; b=pjsELTxSZmpYeY9P+N/Hc8sQ30iqm6WSYWVeuYjLgQYsogXbmjKhX5XvVpaqygfwncMtf2 wUtiIJmKoYG316vfd/4I6bJmAO3lbjJDZxCo5Nrg/ctoy4SHMFtLYAo8N0SWRj4pviwQBa bGNrlXI88GUUt4cKhdUUMAbdFcmb9bKyUpVYgRq6k+c5Qz2HbkCbDUuJM7IxLFffzVOE0g hEOUyqKqHHHZp42aOL30wGNlv5mparsZZ82GiwtuZkLpP0pehXer/PD3KVBwpadLfszZK6 hM8xsA5d+GfvNv7qCTTmWdNVdt4Fw0kX/vrXGXSrQY8XoHtOFHPzPmFvJUNLrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767796521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BuSlnJoXsUffhSM6NFVRD/qRh7lQIAy9cPhRbTeXjbM=; b=HHYXB7SXOhEhzqA+Vo6pqsDjD1MIh4rfCbIFuNRIrlN1h8Z4BrnRrsUJ2j1d46UFZ+4f10 R/xX7SPjDoS91l6Eq4kqxeoW32ysxveC0VuF8cd4R6Qn3/nZIwChpPj2b6MENFg0XuZnLF ciiQMZ/N247UDHVODVXm/uDBo6O3mH7n2sdPIyfPcfP1OPs7xyz13X8Y99i+3bJzbVM9z1 XXnYnMsESjaeKSCj4UpO4Nb2/L7qQb6upPZaVTPV4S97VheYanLy0h7QL3yieqHoK8+07S CO2IXh02Te+Fj92rfismvgBxeX0DBGon4gXo5xB4WMaZuhyqNnEIUMxPJEanUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767796521; a=rsa-sha256; cv=none; b=sVPYZoOB/dXIHIea/U319OVCFWG/71rUfaEwV/hP+pBb+3EPMe42VzTpq9NL/hrpSCAWe5 QKSYFAk/QVcKEb1b/vH4icH0I9rKyektlpAylFa6FW4j6rJ26xXlnDO2iH+vXEoohNLwLT xlxFaOhd+xzslMjeoKABqFWMt5jPMhZvVSytQe8HvbMqG30NgcdhJBSNRer3Y5lgy1I5Uo Lqf0G6pexzA7no4VhRfAnxqsUzb9+vI525VL+RzdYk1XpDIyr2EdAqVFLsRTtNpUaZoMPP Amdbpo+qQ3DB8XeQKAE190dZT1d2mFBaYO+1ag+17YeGuXSko+AELhRKBQa2+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmVtx32kJzx9x for ; Wed, 07 Jan 2026 14:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ade7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 14:35:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 3b6615ec0332 - main - netstat: fix a segfault with --libxo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b6615ec0332f901fcc9e9307f78717424f09c1e Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 14:35:21 +0000 Message-Id: <695e6f29.ade7.4cf71b8b@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=3b6615ec0332f901fcc9e9307f78717424f09c1e commit 3b6615ec0332f901fcc9e9307f78717424f09c1e Author: Alan Somers AuthorDate: 2026-01-06 22:19:57 +0000 Commit: Alan Somers CommitDate: 2026-01-07 14:35:13 +0000 netstat: fix a segfault with --libxo Fix a segfault when printing the "protocol" field. The field-format and encoding-format were expecting different numbers of arguments. Also, fix the width of the tcp-state field in encoded output. PR: 292228 Fixes: c2b08c13c20 netstat: add support for UDP-Lite endpoints MFC after: 1 week Sponsored by: ConnectWise Reviewed by: tuexen, js, des Differential Revision: https://reviews.freebsd.org/D54567 --- usr.bin/netstat/inet.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index dee245b63a87..6e4811480237 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -394,11 +394,10 @@ protopr(u_long off, const char *name, int af1, int proto) if (istcp && (tp->t_flags & TF_TOE) != 0) xo_emit("{:protocol/%-3.3s%-6.6s/%s%s} ", "toe", vchar); else { - int len; + int l = max (2, 9 - strlen(name)); - len = max (2, 9 - strlen(name)); - xo_emit("{:protocol/%.7s%-*.*s/%s%s} ", name, len, len, - vchar); + xo_emit("{d:protocol/%.7s%-*.*s} ", name, l, l, vchar); + xo_emit("{e:protocol/%s%s}", name, vchar); } if (Lflag) { char buf1[33]; @@ -523,9 +522,9 @@ protopr(u_long off, const char *name, int af1, int proto) } if (istcp && !Lflag && !xflag && !Tflag && !Rflag) { if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) - xo_emit("{:tcp-state/%-11d}", tp->t_state); + xo_emit("{:tcp-state/%-11d/%d}", tp->t_state); else { - xo_emit("{:tcp-state/%-11s}", + xo_emit("{:tcp-state/%-11s/%s}", tcpstates[tp->t_state]); #if defined(TF_NEEDSYN) && defined(TF_NEEDFIN) /* Show T/TCP `hidden state' */ From nobody Wed Jan 7 17:12:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmZNC4QmXz6N64g for ; Wed, 07 Jan 2026 17:12: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmZNC3lvxz40fy for ; Wed, 07 Jan 2026 17:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767805947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=skcSAobPnFaaBhSgg8dvbrM1HQkclWqtlqCce0/LP84=; b=DcbxlKHokoRIEcimvSy09o7dooYK7B4E43gjvBwEYu87qi26BUAs7YJId/RtyC5WZYuSvF n4d0GS7/msRNCsidJbC7R2SSmXZL79InUg5deVdWNqA/HJ/X3Z2K/XoVPEdvKYsv4cmQU8 F4omJKK4ROzogRRo/Ovq+7/FGdWiyM8rLpxR/c3+STna8RZqyRucQJLGMcS2XSnJjQ33KK r6rXJdAZ92jy4ZF1ho8oNec3CHnjMohQb+7eynvw4csa+ujxvuYCAkekbCFV+Sm44tHreT Ry466zCxWeauAMQzG7WB0JqeBhBkPkDQXpqPQRVizKs6SXSPKmJY7/U2rJdtLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767805947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=skcSAobPnFaaBhSgg8dvbrM1HQkclWqtlqCce0/LP84=; b=afcSQ9I1XiDKtvjkaW6QAwfqsnh6lWZGjcNZP6KfI36u/Vscsed23nT5FgdWetNjHjm+Mk oyk/jdKAiDmKMW6KPsZLxOs2EyFtD8z6UKhq6FA6KCzdOkqn2AEALidvwBpTdFQHGDHMwt o2zmiim7/cVJrj3pmwEztoLtSeuDLL6YSybws8ZUX4jDEOpswNNDGCg+0GEjqfrHEqVb1b Uhu5intsgAj59Zdch5htgIKkSKg4iYQ05iGQRxtYM4dH7yJoKIUrPRVSeWfpbYb6VDsQBW FfVIoMZYgH1tSkbS6jTBusysUNxVPk9TbGkxQAjxXlMjIphlkLsygfkWCe23lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767805947; a=rsa-sha256; cv=none; b=L5pp1oPxYZ+W8yG7slHi3GFld7mbX1yGjtlB/qMsiMDOfsUaZZCI6OP2PsnNiCRBIO7tSa VcdnCuekPT8WJylMCjsCCUFCtbSGFVUJFS4rr7Bs085wqTloHPvmZrzGyAYm0i+gb5d9z0 I3gXuGfPStlsVqwCvMNEV/Yyc7NBlzIMjw7m4iI65ezPmMBxVwoV2Jpas0wCBKPMKTq1iD uFMiHQxV09Ldr5p2EcGmHQeFXaktuAqwkZPc0qSTFyNtDswc6cc1FzZNKMOb7D4MRDlluY tNojmF91VRtaqZDXGfW4KOUUtO6X9TaEXXnIDWF8NMxFVBzwZbeYHwxo6lDJgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmZNC3890z11rw for ; Wed, 07 Jan 2026 17:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33084 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 17:12:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roman Bogorodskiy Subject: git: 9fc7fe642757 - main - bhyve: improve console error reporting on arm64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9fc7fe6427579f1c82a371588df6fd6af3b83dfd Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 17:12:22 +0000 Message-Id: <695e93f6.33084.4a9e95d6@gitrepo.freebsd.org> The branch main has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=9fc7fe6427579f1c82a371588df6fd6af3b83dfd commit 9fc7fe6427579f1c82a371588df6fd6af3b83dfd Author: Roman Bogorodskiy AuthorDate: 2026-01-04 13:59:34 +0000 Commit: Roman Bogorodskiy CommitDate: 2026-01-07 17:06:45 +0000 bhyve: improve console error reporting on arm64 Currently, on arm64, if bhyve fails to initialize the console, it falls into assert(), which does not look particularly pretty for users. Replace the assert with proper error handling so bhyve prints a meaningful error message and exits with status code 4 (error). That matches the behavior on amd64. Approved by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54504 --- usr.sbin/bhyve/aarch64/bhyverun_machdep.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c index e099df0559a1..10018d082f7e 100644 --- a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c @@ -270,7 +270,7 @@ mmio_uart_mem_handler(struct vcpu *vcpu __unused, int dir, return (0); } -static bool +static int init_mmio_uart(struct vmctx *ctx) { struct uart_pl011_softc *sc; @@ -280,14 +280,14 @@ init_mmio_uart(struct vmctx *ctx) path = get_config_value("console"); if (path == NULL) - return (false); + return (1); sc = uart_pl011_init(mmio_uart_intr_assert, mmio_uart_intr_deassert, ctx); if (uart_pl011_tty_open(sc, path) != 0) { EPRINTLN("Unable to initialize backend '%s' for mmio uart", path); - assert(0); + return (-1); } bzero(&mr, sizeof(struct mem_range)); @@ -301,7 +301,7 @@ init_mmio_uart(struct vmctx *ctx) error = register_mem(&mr); assert(error == 0); - return (true); + return (0); } static void @@ -414,8 +414,11 @@ bhyve_init_platform(struct vmctx *ctx, struct vcpu *bsp) return (error); } - if (init_mmio_uart(ctx)) + error = init_mmio_uart(ctx); + if (error == 0) fdt_add_uart(UART_MMIO_BASE, UART_MMIO_SIZE, UART_INTR); + else if (error < 0) + return (error); init_mmio_rtc(ctx); fdt_add_rtc(RTC_MMIO_BASE, RTC_MMIO_SIZE, RTC_INTR); fdt_add_timer(); From nobody Wed Jan 7 17:53:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmbHR1gBDz6N7mH for ; Wed, 07 Jan 2026 17:53: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmbHR17Sdz43Rt for ; Wed, 07 Jan 2026 17:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767808403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9hTy2TacPP6tsgnTWzzoyfJo3OyFeUTICyB4QJ+ehs=; b=DZWHC/A6NUIVokZrH5bbyhamcFN2JbQSsM013D01MdzimKOlpRzfcqexlfnwntUB3jBM7e R3KgwUOkeXVbtovGD51lEfXnNAJM4Ebcck4n91F9rwesD7Iw17wYTXAJXzSPZSZaheWUjc dtUGca8x7Kc/r5Adv7tsYQKno3k3s9LbSUw1b5k3BSDw+gMcP75M+hMPwh4s2f9uoXdvWy YOkL4KxzCeFPi5L5zFqhESXbHzpWbTXn4N91Tt8h0hNHWX+fOTFbWG8bd/uOfkOdwEBaPa r6POuwvFXVGvMwAFwqTCkzdI2HoENq8hpamaMwgR2Dq4lpDhQcFX3tkmfJz5Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767808403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9hTy2TacPP6tsgnTWzzoyfJo3OyFeUTICyB4QJ+ehs=; b=TqUzRVbMivnyKk9ogdJltjDlX5cFXlzyv87aVSvDaMU4VhU7SGIB+p3BfWxuX0YGks/vNr AsTyp+oqIveBjzHZ4VJ3FdmtK0Kjha8u/VhdHiB7HgogZOBlyG4jAeb4/pexgrc2eiLTur N2iqgB7u0gZJt5ZyRLcD+eGRUPyRyprTqzKntx4ifgZjtacWQOyOTIQGH/O4XJ0zNIs2z5 pDBLMYWXRjiEOQstdDw2gcKcGtKOZfGnwq+C4PKX8b7QiNNH8iNc8TzMhjxwVm64bAwvWl 3uESl36PJ+crhaL/1jvAVTvhGgcUp1PEheKtxR88RW4kC98P+lPw8hunMWGItg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767808403; a=rsa-sha256; cv=none; b=UYsnGWeJPgcdATdlApD671x2pZxwuB5sc0AusI8nqLZTWOLoZoyfbOfVzJLDXKfNuE2Yqs aqPmn8TkP50PMil3Vzpgo5/dZ04DnnbBz3V7Kj3uPOYb5A7NMBWQD/tczHR+xvtzxmBmgy 5Zgho0lGV/NFkXAT8MGHFzoVgBd5I5/FQfFoYfNCT64wb/k0sTvDNRDeSl7ubvE4skR4HH qRK4t4bOzV/DyS4779fq6my7TJCQ2W65plpe0ST0Y0TRkJVwzTf6EP/DV0zQUjqRH6Dh83 w/id3yeQKKZKBZBJPg6sNfgM/v2fWNR5X06f2+jELSwKtP4I3BKuhW3n3LLqZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmbHR0cMGz12sC for ; Wed, 07 Jan 2026 17:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35d72 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 17:53:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 301bc149b96e - main - pf: tests: Require python3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 301bc149b96e54af4ebfba2822f4b7b411bb76c1 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 17:53:23 +0000 Message-Id: <695e9d93.35d72.6f38014d@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=301bc149b96e54af4ebfba2822f4b7b411bb76c1 commit 301bc149b96e54af4ebfba2822f4b7b411bb76c1 Author: Jose Luis Duran AuthorDate: 2026-01-07 17:51:57 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-07 17:51:57 +0000 pf: tests: Require python3 Reported by: Jenkins Reviewed by: kp, ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54549 --- tests/sys/netpfil/pf/killstate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netpfil/pf/killstate.sh b/tests/sys/netpfil/pf/killstate.sh index dc082464b36c..f5925d715e7c 100644 --- a/tests/sys/netpfil/pf/killstate.sh +++ b/tests/sys/netpfil/pf/killstate.sh @@ -110,6 +110,7 @@ src_dst_head() { atf_set descr 'Test killing a state with source and destination specified' atf_set require.user root + atf_set require.progs python3 scapy } src_dst_body() From nobody Wed Jan 7 17:53:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmbHS4DKHz6N80n for ; Wed, 07 Jan 2026 17:53: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmbHS1pd7z43Nt for ; Wed, 07 Jan 2026 17:53:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767808404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ua057ZXWzKD/2aZOavjzGPF9WtRmy5zaO7WekVQvLsI=; b=bSNH/kIJU7EpVkLZqLadgGKrbdCp5hWpwDubnOJbJS4aa7TRD631sQelTDeciNdnG8AId/ i1ebM6E33zXBlFJyyPQz/i1ZbDSOjhAlx4t9LIgaYZYokeZa0vuE+a3WHsBzbCo1Aoj6e4 Kpjb9onDcOgaV9tcpjvRChKM/gIKHDsPy3yAvpPw/xRHnRL10qni8nLemxPOPUHTKy6MhT gdWE/ClCBvteTAxCvmjI1JBhWQG9IrDtVtDz2ZEjwMpTeX3SQ7kh7p0fCCnV8rn9L4lqk0 +yrV8BFZaO1rVs6WW5bIc+62AaGQnRvpKkKHpTxju/A2GbZ0yTScop5M7ZhbDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767808404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ua057ZXWzKD/2aZOavjzGPF9WtRmy5zaO7WekVQvLsI=; b=SfrUYB/EK4yCi8Hjb9qceBlbEE3us/wpuCQhV5nlqfQ97zuJ4SHXQ/mTtT1KLnnf11EtnY MLylT7et7lPJF9yPeqKzXFFLTUWlqD5g48Fb8F9x3LeIIcAVszTaR7YGjLwKdo8Zt0oMdA 0wQBG8K7JUBdk57NreA4w0Py6E/u4C69e5CNAhxMhcQCe6B4oOATMsaIHazvIqikVQgDba jUXyS8xtFdt0rHlhqabqID2klKM/st9caax7Xg8xAr4ZzX9AhPDlyFhipCuvKC3LvFbWLZ h/FnuhKHQR55xz718amns0MLzTS1YEbf9zBIVy8UABwTSs1kDtyewHMATmu6fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767808404; a=rsa-sha256; cv=none; b=cZIKHNPMduaMmwjzgRLulNVXd7A9VOlmOc9+O7MRBAWTgtnkhwISnHfw7UX2E70SNOpxG3 TWu+b0UCjySSfC39Sq7IJ66xnvjvBOBVzbWA2gu/fWSZ/kp8LuvSCrsnyi0cUYEtloRSKp 0mhwx4K7uhXb9o83A2pl2pMr+sdxYuVLFuOl/Z3pSgjYMmImII7+MOAq6oPyqOmEhDwDkh CG8n+e7AqWayYUdShh5usjCjWk92nMY2zROnPo/bgeM/uBnWiQ8x20j4siM+iThk8iYqiF OYjWQdmyqLU042/xakxFaMeoDLIpEEU3dIsvYebVwQcvMjGViZX46RKKxSc4Lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmbHS1NVBz12p9 for ; Wed, 07 Jan 2026 17:53:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 372e5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 17:53:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 47015e454661 - main - tests: Increase timeout List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47015e4546619151f9bff548a3758b72286d04ed Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 17:53:24 +0000 Message-Id: <695e9d94.372e5.2b133df7@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=47015e4546619151f9bff548a3758b72286d04ed commit 47015e4546619151f9bff548a3758b72286d04ed Author: Jose Luis Duran AuthorDate: 2026-01-07 17:52:26 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-07 17:52:26 +0000 tests: Increase timeout Bump the timeout value, to avoid cutoff on emulated architectures on ci.freebsd.org. Reported by: Jenkins Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54550 --- tests/sys/fs/fusefs/Makefile | 2 +- tests/sys/fs/tarfs/tarfs_test.sh | 2 +- tests/sys/geom/class/eli/online_resize_test.sh | 1 + tests/sys/geom/class/eli/reentrancy_test.sh | 2 +- tests/sys/kern/jailmeta.sh | 2 +- tests/sys/mac/portacl/Makefile | 2 +- tests/sys/netpfil/pf/rules_counter.sh | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index a21512798597..6366676b6fc5 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -70,7 +70,7 @@ TEST_METADATA.nfs+= required_user="root" TEST_METADATA.ctl+= is_exclusive="true" TEST_METADATA.ctl+= required_user="root" -TEST_METADATA+= timeout=10 +TEST_METADATA+= timeout=20 TEST_METADATA+= required_kmods="fusefs" FUSEFS= ${SRCTOP}/sys/fs/fuse diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh index 505bfc5325f0..3a95263aeda9 100644 --- a/tests/sys/fs/tarfs/tarfs_test.sh +++ b/tests/sys/fs/tarfs/tarfs_test.sh @@ -401,7 +401,7 @@ tarfs_large_head() { atf_set "descr" "Test support for large files" atf_set "require.user" "root" atf_set "require.kmods" "tarfs" - atf_set "timeout" "600" + atf_set "timeout" "900" } tarfs_large_body() { tarfs_setup diff --git a/tests/sys/geom/class/eli/online_resize_test.sh b/tests/sys/geom/class/eli/online_resize_test.sh index ef6fe85c63d0..b33efbb25c23 100755 --- a/tests/sys/geom/class/eli/online_resize_test.sh +++ b/tests/sys/geom/class/eli/online_resize_test.sh @@ -7,6 +7,7 @@ online_resize_head() { atf_set "descr" "online resize of geli providers" atf_set "require.user" "root" + atf_set "timeout" 600 } online_resize_body() { diff --git a/tests/sys/geom/class/eli/reentrancy_test.sh b/tests/sys/geom/class/eli/reentrancy_test.sh index 92a85d4df10a..f70c574d5965 100755 --- a/tests/sys/geom/class/eli/reentrancy_test.sh +++ b/tests/sys/geom/class/eli/reentrancy_test.sh @@ -42,7 +42,7 @@ init_head() { atf_set "descr" "Initialize a geli provider on top of another" atf_set "require.user" "root" - atf_set "timeout" 600 + atf_set "timeout" 900 } init_body() { diff --git a/tests/sys/kern/jailmeta.sh b/tests/sys/kern/jailmeta.sh index 9a63f958231f..f030e44b14c3 100644 --- a/tests/sys/kern/jailmeta.sh +++ b/tests/sys/kern/jailmeta.sh @@ -515,7 +515,7 @@ keyvalue_contention_head() atf_set descr 'Try to stress metadata read/write mechanism with some contention' atf_set require.user root atf_set execenv jail - atf_set timeout 30 + atf_set timeout 60 } keyvalue_stresser() { diff --git a/tests/sys/mac/portacl/Makefile b/tests/sys/mac/portacl/Makefile index 28c3a5cd71ce..2b0f4634c802 100644 --- a/tests/sys/mac/portacl/Makefile +++ b/tests/sys/mac/portacl/Makefile @@ -10,7 +10,7 @@ TAP_TESTS_SH+= root_test .for t in ${TAP_TESTS_SH} TEST_METADATA.$t+= required_kmods="mac_portacl" TEST_METADATA.$t+= required_user="root" -TEST_METADATA.$t+= timeout="450" +TEST_METADATA.$t+= timeout="600" TEST_METADATA.$t+= is_exclusive="true" .endfor diff --git a/tests/sys/netpfil/pf/rules_counter.sh b/tests/sys/netpfil/pf/rules_counter.sh index e80a46e9d6c6..54a65a907b4f 100644 --- a/tests/sys/netpfil/pf/rules_counter.sh +++ b/tests/sys/netpfil/pf/rules_counter.sh @@ -153,7 +153,7 @@ atf_test_case "4G" "cleanup" { atf_set descr 'Test keepcounter for values above 32 bits' atf_set require.user root - atf_set timeout 900 + atf_set timeout 1200 } 4G_body() From nobody Wed Jan 7 18:24:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmbzn2vb1z6N9Pq for ; Wed, 07 Jan 2026 18:24: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmbzn256gz47V8 for ; Wed, 07 Jan 2026 18:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767810293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rwkkCICX/yykRSc1i8KrUlS2SutTXpdMdQ942yji7qo=; b=ezOf3/xFhDCqjEkTGo4wDDI0xHH9dQiZKhiLkzLaDU2wTMUtdESdkn7olba4Lx004Gwbm0 iJikrg8cNHzCDqi1M2wzoWjUm8+P4AyII2iuPqr3vXkmi1ovdJZqJ+zzUDXU2BnQUsdcnr Z9P9qqdU9BFc1j8i2lGJZmmktPUy2Yp+nactl1qJ6NpAWRuCCRU+SJXT04+S3EIUOcBDRL qeVx0JmmgrcU50bLGYQe+FCZoQaae0PtAXp9ZUv+bXRaMnaBUqKdl3jyYDoGz3JJsmG6+6 Yn2p8k9LbB027e2aNsFMJmQa5XAHE4xgb2gCBstYjCi6Uuv/kdlLgILmbF+1Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767810293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rwkkCICX/yykRSc1i8KrUlS2SutTXpdMdQ942yji7qo=; b=GnN10GvDnT/XGHAmw/iYTDWBWbsE6nsmNyvtH6VFtO2GRQSabAMDClD5lwZa6vSYDX3Fis giZ9pF7f5//JcIxWKDuVvXik6ba5ivyfSD6XJDv2+bbqtGISQlWc0HXOeGrqPdIP2Y8pQM nS40ZfJYaD3LL4KPRWAhdWRAwuo+eshNrK+PPwVzYTDYkRe+CoBFNxjU9yPvFAtGb9IacC 2n2EhYWG6LO1gwTQzvfKTZIFq686a7ANElPhI11DTJ64J8MpxgCzxt+o54GyhbfrETGExg 2EMfyaLEUwIQNz5UGuypLLjYw8fxhxkJV7UzLYP+/eCHgoaUih5GrlC0kqIvMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767810293; a=rsa-sha256; cv=none; b=a6cdcUT0wP0U+0pX2IWpzvXHDu8qtuRaGuQXp89E+1c9/+aodWaBfwhF8Xb9OQqGPhaBhE 6baaIK1dXHoRVR3sbJAT/ZYLB6X+ZuXMH+crXUr2fyxr12J0Lz2mc8BM6OjLV+IvaBxwi3 FFMidWs+lDqRsD3ZYfmwwyEas1Nld8ywOvvz74uSrfjeLAu+UH6VbfSXb0QN41OBw/FMOt GmVt9bXsMW00obziMx6AEt8wgavYhLRLEUdf2lYZ/UmQagFRHEPHSOtwNyeEEHnmM62seJ ymvxfJmu5GjOR3i2UmwB39DtAGDYAYJwiisKgpPWjMfUiJWigj6jHn06vyXBQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmbzn1Z7Rz144K for ; Wed, 07 Jan 2026 18:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a485 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 18:24:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: e30086ab4c87 - main - lualoader: fix pruning of non-existent default kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e30086ab4c8778ea70a3b19e83546ce1b4a16492 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 18:24:53 +0000 Message-Id: <695ea4f5.3a485.58c3c65c@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e30086ab4c8778ea70a3b19e83546ce1b4a16492 commit e30086ab4c8778ea70a3b19e83546ce1b4a16492 Author: Kyle Evans AuthorDate: 2026-01-07 18:20:05 +0000 Commit: Kyle Evans CommitDate: 2026-01-07 18:20:05 +0000 lualoader: fix pruning of non-existent default kernel Removing the kernel from the list of available kernels is sufficient to avoid rendering it in the list, but we need more for booting to actually work. Notably, the 'kernel' loader.conf var was left intact to its default value, so if one didn't use the kernel selector in the menu then we'd try to boot the nonexistent 'kernel' instead of the new default (first autodetected). There's room to improve the error messages here, but for now let's just make it actually work correctly. PR: 292232 Fixes: d04415c520b03 ("loader: lua: remove the default kernel [...]") --- stand/lua/core.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index ad417e5f97e5..b1b321d10868 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -289,6 +289,12 @@ function core.kernelList() kernels[n] = kernels[n + 1] end end + + -- The config/boot bits use the env var as a fallback if the + -- menu's kernel selector remains untouched, so we want to + -- update our notion of the default kernel to one that is + -- actually present. + loader.setenv("kernel", kernels[1]) end core.cached_kernels = kernels From nobody Wed Jan 7 19:32:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmdTz6LX8z6NDLp for ; Wed, 07 Jan 2026 19:32: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmdTz4g4Lz3JFy for ; Wed, 07 Jan 2026 19:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767814359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HOwQi5HdZ+sjb1Z6FoXGB9/EvYR5F9AkHeOQrB50ARI=; b=MsjYk/NSFjthdwiGV34KHvpsgVKQHh2Am5sI+JQG9znR4/UMTlOYpKz6CuJ2cGnS0tkRuu PusrdWmp1x79KwZs+I1SHh5KuJcJciBbeuSCbaWUW8j1AraTyi5NjK8al57QDt5Gf1DFgo 5Zt49VcFO33G8UbFn0vJaGWIIispCoiU87wzj9HssMyLzCeJzv0ShjkC0KgjZwhK0+NhwI KgX14x7kxVR4esCrYpxsTbK6DwiQli6khb54jk/ZNsZ+YuNpLHr9NRqey70Z+IxIUW2mC+ YJdDxfceBomfZCSvtYyb3YPrgnoqTvchjCDIyd+teLR8YZzDH75Oy+Znk265hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767814359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HOwQi5HdZ+sjb1Z6FoXGB9/EvYR5F9AkHeOQrB50ARI=; b=Eg2UNJqDqdfTqUnYvcqPMzvgDFOZKsLsLNGXgrfWyxMhpumwcsp3lptbWc+TQTGro+KQ2F swjLMbHxoFcW/BOI0Nmql8qy2weQBQeSCcB1qgz3nYtFcHlbp/Dm2mvQ5tBVLecZ7t0cfl w4t5M/32RPikc3IHGnRjXy8v5+bypAWe0LOuoDprogP+Z7VO6Ff/pPmG7OOcjkMn8oJKZM UmcmPHfs8b6sXiSjQlUNOinjLfyOyT1Xl0SNDKCJOE0NkT94nxkKYP0MdSGyjzZJed4BtF X423fdYEBbZjye2PT/rEgCSL2gVdH8I9swi88ZZkGJVSrQa7JoByM8QXqVOtwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767814359; a=rsa-sha256; cv=none; b=V0oq74oncxDGHoDPdk7aEu64QsO9x9VW9DeUcBvAoeIVqIxwkJca1BeDEczY9xYzEsY2/r 4el6sk+65jAdXjmhXVPv8jka916epLDb5Hqg8Fu02OowIdnLJKy+NZnPvyz2og1ok94wvQ UM05TQ6BIoWNjhGFT1fth4BxPKlHGbjwx9KOXk0J753H4PvE/MAefAFvdjpRIZDNpj7Pu5 QtUArCmXzYl1qs1rLNUA81n1tZWd6uuvaYO/IisEvon7bIivGXkJ/bi/IJcwnieBY+hnEG nUFrKdHSZ5iTKeq+R/tQd2e4ZmM3d4AQ2GTcWQaazoGkTf3ZgWx5udGmpCYpIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmdTz4GQ5z15sX for ; Wed, 07 Jan 2026 19:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40bf6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 19:32:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 14d93f612f26 - main - iflib: Drop tx lock when freeing mbufs using simple_transmit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14d93f612f26f4e8454e393b75b0e4be0fc9d890 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 19:32:39 +0000 Message-Id: <695eb4d7.40bf6.4791e3cd@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=14d93f612f26f4e8454e393b75b0e4be0fc9d890 commit 14d93f612f26f4e8454e393b75b0e4be0fc9d890 Author: Andrew Gallatin AuthorDate: 2026-01-07 19:29:53 +0000 Commit: Andrew Gallatin CommitDate: 2026-01-07 19:32:08 +0000 iflib: Drop tx lock when freeing mbufs using simple_transmit Freeing completed transmit mbufs can be time consuming (due to them being cold in cache, and due to ext free routines taking locks), especially when we batch tx completions. If we do this when holding the tx ring mutex, this can cause lock contention on the tx ring mutex when using iflib_simple_transmit. To resolve this, this patch opportunistically copies completed mbuf pointers into a new array (ifsd_m_defer) so they can be freed after dropping the transmit mutex. The ifsd_m_defer array is opportunistically used, and may be NULL. If its NULL, then we free mbufs in the old way. The ifsd_m_defer array is atomically nulled when a thread is using it, and atomically restored when the freeing thread is done with it. The use of atomics here avoids acquire/release of the tx lock to restore the array after freeing mbufs. Since we're no longer always freeing mbufs inline, peeking into them to see if a transmit used TSO or not will cause a useless cache miss, as nothing else in the mbuf is likely to be accessed soon. To avoid that cache miss, we encode a TSO or not TSO flag in the lower bits of the mbuf pointer stored in the ifsd_m array. Note that the IFLIB_NO_TSO flag exists primarily for sanity/debugging. iflib_completed_tx_reclaim() was refactored to break out iflib_txq_can_reclaim() and _iflib_completed_tx_reclaim() so the that the tx routine can call iflib_tx_credits_update() just once, rather than twice. Note that deferred mbuf freeing is not enabled by default, and can be enabled using the dev.$DEV.$UNIT.iflib.tx_defer_mfree sysctl. Differential Revision: https://reviews.freebsd.org/D54356 Sponsored by: Netflix Reviewed by: markj, kbowling, ziaee --- share/man/man4/iflib.4 | 8 ++- sys/net/iflib.c | 182 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 154 insertions(+), 36 deletions(-) diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4 index 66395bfe5dfc..349fa402d319 100644 --- a/share/man/man4/iflib.4 +++ b/share/man/man4/iflib.4 @@ -1,4 +1,4 @@ -.Dd August 20, 2025 +.Dd January 7, 2026 .Dt IFLIB 4 .Os .Sh NAME @@ -94,6 +94,12 @@ If set to a non-zero value, task returns immediately and the transmit ring is serviced by a different task. This returns control to the caller faster and under high receive load, may result in fewer dropped RX frames. +.It Va tx_defer_mfree +Controls the threshold in packets before iflib will free the memory +(mbufs) for the packets that it has transmitted. +When this is nonzero, mbufs will be freed outside the transmit lock. +Setting this can reduce lock contention and CPU use when using simple_tx. +Note that this applies only when simple_tx is enabled. .It Va tx_reclaim_thresh Controls the threshold in packets before iflib will ask the driver how many transmitted packets can be reclaimed. diff --git a/sys/net/iflib.c b/sys/net/iflib.c index bd0bfe4742df..fcd847ab6f7a 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -202,6 +202,7 @@ struct iflib_ctx { uint16_t ifc_sysctl_extra_msix_vectors; bool ifc_cpus_are_physical_cores; bool ifc_sysctl_simple_tx; + bool ifc_sysctl_tx_defer_mfree; uint16_t ifc_sysctl_tx_reclaim_thresh; uint16_t ifc_sysctl_tx_reclaim_ticks; @@ -298,6 +299,8 @@ typedef struct iflib_sw_tx_desc_array { bus_dmamap_t *ifsd_map; /* bus_dma maps for packet */ bus_dmamap_t *ifsd_tso_map; /* bus_dma maps for TSO packet */ struct mbuf **ifsd_m; /* pkthdr mbufs */ + struct mbuf **ifsd_m_defer; /* deferred mbuf ptr */ + struct mbuf **ifsd_m_deferb;/* deferred mbuf backing ptr */ } if_txsd_vec_t; /* magic number that should be high enough for any hardware */ @@ -318,6 +321,20 @@ typedef struct iflib_sw_tx_desc_array { #define IFLIB_RESTART_BUDGET 8 + +/* + * Encode TSO or !TSO in the low bits of the tx ifsd_m pointer so as + * to avoid defref'ing the mbuf to determine the correct busdma resources + * to release + */ +#define IFLIB_TSO (1ULL << 0) +#define IFLIB_NO_TSO (2ULL << 0) +#define IFLIB_FLAGS_MASK (0x3ULL) +#define IFLIB_SAVE_MBUF(mbuf, flags) ((void *)(((uintptr_t)mbuf) | flags)) +#define IFLIB_GET_FLAGS(a) ((uintptr_t)a & IFLIB_FLAGS_MASK) +#define IFLIB_GET_MBUF(a) ((struct mbuf *)((uintptr_t)a & ~IFLIB_FLAGS_MASK)) + + #define IFC_LEGACY 0x001 #define IFC_QFLUSH 0x002 #define IFC_MULTISEG 0x004 @@ -343,7 +360,9 @@ struct iflib_txq { qidx_t ift_cidx_processed; qidx_t ift_pidx; uint8_t ift_gen; - uint8_t ift_br_offset; + uint8_t ift_br_offset:1, + ift_defer_mfree:1, + ift_spare_bits0:6; uint16_t ift_npending; uint16_t ift_db_pending; uint16_t ift_rs_pending; @@ -735,7 +754,8 @@ static void iflib_free_intr_mem(if_ctx_t ctx); #ifndef __NO_STRICT_ALIGNMENT static struct mbuf *iflib_fixup_rx(struct mbuf *m); #endif -static __inline int iflib_completed_tx_reclaim(iflib_txq_t txq); +static __inline int iflib_completed_tx_reclaim(iflib_txq_t txq, + struct mbuf **m_defer); static SLIST_HEAD(cpu_offset_list, cpu_offset) cpu_offsets = SLIST_HEAD_INITIALIZER(cpu_offsets); @@ -1786,7 +1806,16 @@ iflib_txsd_alloc(iflib_txq_t txq) err = ENOMEM; goto fail; } - + if (ctx->ifc_sysctl_simple_tx) { + if (!(txq->ift_sds.ifsd_m_defer = + (struct mbuf **) malloc(sizeof(struct mbuf *) * + scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { + device_printf(dev, "Unable to allocate TX mbuf map memory\n"); + err = ENOMEM; + goto fail; + } + } + txq->ift_sds.ifsd_m_deferb = txq->ift_sds.ifsd_m_defer; /* * Create the DMA maps for TX buffers. */ @@ -1879,6 +1908,10 @@ iflib_txq_destroy(iflib_txq_t txq) free(txq->ift_sds.ifsd_m, M_IFLIB); txq->ift_sds.ifsd_m = NULL; } + if (txq->ift_sds.ifsd_m_defer != NULL) { + free(txq->ift_sds.ifsd_m_defer, M_IFLIB); + txq->ift_sds.ifsd_m_defer = NULL; + } if (txq->ift_buf_tag != NULL) { bus_dma_tag_destroy(txq->ift_buf_tag); txq->ift_buf_tag = NULL; @@ -1895,10 +1928,10 @@ iflib_txq_destroy(iflib_txq_t txq) static void iflib_txsd_free(if_ctx_t ctx, iflib_txq_t txq, int i) { - struct mbuf **mp; + struct mbuf *m; - mp = &txq->ift_sds.ifsd_m[i]; - if (*mp == NULL) + m = IFLIB_GET_MBUF(txq->ift_sds.ifsd_m[i]); + if (m == NULL) return; if (txq->ift_sds.ifsd_map != NULL) { @@ -1912,9 +1945,8 @@ iflib_txsd_free(if_ctx_t ctx, iflib_txq_t txq, int i) bus_dmamap_unload(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[i]); } - m_freem(*mp); + m_freem(m); DBG_COUNTER_INC(tx_frees); - *mp = NULL; } static int @@ -3440,7 +3472,7 @@ iflib_remove_mbuf(iflib_txq_t txq) ntxd = txq->ift_size; pidx = txq->ift_pidx & (ntxd - 1); ifsd_m = txq->ift_sds.ifsd_m; - m = ifsd_m[pidx]; + m = IFLIB_GET_MBUF(ifsd_m[pidx]); ifsd_m[pidx] = NULL; bus_dmamap_unload(txq->ift_buf_tag, txq->ift_sds.ifsd_map[pidx]); if (txq->ift_sds.ifsd_tso_map != NULL) @@ -3507,6 +3539,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) struct mbuf *m_head, **ifsd_m; bus_dmamap_t map; struct if_pkt_info pi; + uintptr_t flags; int remap = 0; int err, nsegs, ndesc, max_segs, pidx; @@ -3530,10 +3563,12 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) map = txq->ift_sds.ifsd_tso_map[pidx]; MPASS(buf_tag != NULL); MPASS(max_segs > 0); + flags = IFLIB_TSO; } else { buf_tag = txq->ift_buf_tag; max_segs = scctx->isc_tx_nsegments; map = txq->ift_sds.ifsd_map[pidx]; + flags = IFLIB_NO_TSO; } if ((sctx->isc_flags & IFLIB_NEED_ETHER_PAD) && __predict_false(m_head->m_pkthdr.len < scctx->isc_min_frame_size)) { @@ -3606,7 +3641,7 @@ defrag: DBG_COUNTER_INC(encap_txd_encap_fail); return (err); } - ifsd_m[pidx] = m_head; + ifsd_m[pidx] = IFLIB_SAVE_MBUF(m_head, flags); if (m_head->m_pkthdr.csum_flags & CSUM_SND_TAG) pi.ipi_mbuf = m_head; else @@ -3617,7 +3652,7 @@ defrag: * cxgb */ if (__predict_false(nsegs > TXQ_AVAIL(txq))) { - (void)iflib_completed_tx_reclaim(txq); + (void)iflib_completed_tx_reclaim(txq, NULL); if (__predict_false(nsegs > TXQ_AVAIL(txq))) { txq->ift_no_desc_avail++; bus_dmamap_unload(buf_tag, map); @@ -3707,19 +3742,22 @@ defrag_failed: } static void -iflib_tx_desc_free(iflib_txq_t txq, int n) +iflib_tx_desc_free(iflib_txq_t txq, int n, struct mbuf **m_defer) { uint32_t qsize, cidx, gen; struct mbuf *m, **ifsd_m; + uintptr_t flags; cidx = txq->ift_cidx; gen = txq->ift_gen; qsize = txq->ift_size; - ifsd_m = txq->ift_sds.ifsd_m; + ifsd_m =txq->ift_sds.ifsd_m; while (n-- > 0) { - if ((m = ifsd_m[cidx]) != NULL) { - if (m->m_pkthdr.csum_flags & CSUM_TSO) { + if ((m = IFLIB_GET_MBUF(ifsd_m[cidx])) != NULL) { + flags = IFLIB_GET_FLAGS(ifsd_m[cidx]); + MPASS(flags != 0); + if (flags & IFLIB_TSO) { bus_dmamap_sync(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[cidx], BUS_DMASYNC_POSTWRITE); @@ -3734,7 +3772,12 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) } /* XXX we don't support any drivers that batch packets yet */ MPASS(m->m_nextpkt == NULL); - m_freem(m); + if (m_defer == NULL) { + m_freem(m); + } else if (m != NULL) { + *m_defer = m; + m_defer++; + } ifsd_m[cidx] = NULL; #if MEMORY_LOGGING txq->ift_dequeued++; @@ -3751,28 +3794,20 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) } static __inline int -iflib_completed_tx_reclaim(iflib_txq_t txq) +iflib_txq_can_reclaim(iflib_txq_t txq) { int reclaim, thresh; - uint32_t now; - if_ctx_t ctx = txq->ift_ctx; thresh = txq->ift_reclaim_thresh; KASSERT(thresh >= 0, ("invalid threshold to reclaim")); MPASS(thresh /*+ MAX_TX_DESC(txq->ift_ctx) */ < txq->ift_size); - now = ticks; - if (now <= (txq->ift_last_reclaim + txq->ift_reclaim_ticks) && + if (ticks <= (txq->ift_last_reclaim + txq->ift_reclaim_ticks) && txq->ift_in_use < thresh) - return (0); - txq->ift_last_reclaim = now; - /* - * Need a rate-limiting check so that this isn't called every time - */ - iflib_tx_credits_update(ctx, txq); + return (false); + iflib_tx_credits_update(txq->ift_ctx, txq); reclaim = DESC_RECLAIMABLE(txq); - - if (reclaim <= thresh /* + MAX_TX_DESC(txq->ift_ctx) */) { + if (reclaim <= thresh) { #ifdef INVARIANTS if (iflib_verbose_debug) { printf("%s processed=%ju cleaned=%ju tx_nsegments=%d reclaim=%d thresh=%d\n", __func__, @@ -3782,10 +3817,27 @@ iflib_completed_tx_reclaim(iflib_txq_t txq) #endif return (0); } - iflib_tx_desc_free(txq, reclaim); + return (reclaim); +} + +static __inline void +_iflib_completed_tx_reclaim(iflib_txq_t txq, struct mbuf **m_defer, int reclaim) +{ + txq->ift_last_reclaim = ticks; + iflib_tx_desc_free(txq, reclaim, m_defer); txq->ift_cleaned += reclaim; txq->ift_in_use -= reclaim; +} + +static __inline int +iflib_completed_tx_reclaim(iflib_txq_t txq, struct mbuf **m_defer) +{ + int reclaim; + reclaim = iflib_txq_can_reclaim(txq); + if (reclaim == 0) + return (0); + _iflib_completed_tx_reclaim(txq, m_defer, reclaim); return (reclaim); } @@ -3846,7 +3898,7 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) DBG_COUNTER_INC(txq_drain_notready); return (0); } - reclaimed = iflib_completed_tx_reclaim(txq); + reclaimed = iflib_completed_tx_reclaim(txq, NULL); rang = iflib_txd_db_check(txq, reclaimed && txq->ift_db_pending); avail = IDXDIFF(pidx, cidx, r->size); @@ -4005,7 +4057,7 @@ _task_fn_tx(void *context) #endif if (ctx->ifc_sysctl_simple_tx) { mtx_lock(&txq->ift_mtx); - (void)iflib_completed_tx_reclaim(txq); + (void)iflib_completed_tx_reclaim(txq, NULL); mtx_unlock(&txq->ift_mtx); goto skip_ifmp; } @@ -6817,6 +6869,34 @@ iflib_handle_tx_reclaim_ticks(SYSCTL_HANDLER_ARGS) return (err); } +static int +iflib_handle_tx_defer_mfree(SYSCTL_HANDLER_ARGS) +{ + if_ctx_t ctx = (void *)arg1; + iflib_txq_t txq; + int i, err; + int defer; + + defer = ctx->ifc_sysctl_tx_defer_mfree; + err = sysctl_handle_int(oidp, &defer, arg2, req); + if (err != 0) { + return err; + } + + if (defer == ctx->ifc_sysctl_tx_defer_mfree) + return 0; + + ctx->ifc_sysctl_tx_defer_mfree = defer; + if (ctx->ifc_txqs == NULL) + return (err); + + txq = &ctx->ifc_txqs[0]; + for (i = 0; i < NTXQSETS(ctx); i++, txq++) { + txq->ift_defer_mfree = defer; + } + return (err); +} + #define NAME_BUFLEN 32 static void iflib_add_device_sysctl_pre(if_ctx_t ctx) @@ -6915,6 +6995,11 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) 0, iflib_handle_tx_reclaim_ticks, "I", "Number of ticks before a TX reclaim is forced"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "tx_defer_mfree", + CTLTYPE_INT | CTLFLAG_RWTUN, ctx, + 0, iflib_handle_tx_defer_mfree, "I", + "Free completed transmits outside of TX ring lock"); + if (scctx->isc_ntxqsets > 100) qfmt = "txq%03d"; else if (scctx->isc_ntxqsets > 10) @@ -7162,7 +7247,7 @@ iflib_debugnet_poll(if_t ifp, int count) return (EBUSY); txq = &ctx->ifc_txqs[0]; - (void)iflib_completed_tx_reclaim(txq); + (void)iflib_completed_tx_reclaim(txq, NULL); NET_EPOCH_ENTER(et); for (i = 0; i < scctx->isc_nrxqsets; i++) @@ -7190,7 +7275,8 @@ iflib_simple_transmit(if_t ifp, struct mbuf *m) { if_ctx_t ctx; iflib_txq_t txq; - int error; + struct mbuf **m_defer; + int error, i, reclaimable; int bytes_sent = 0, pkt_sent = 0, mcast_sent = 0; @@ -7216,8 +7302,34 @@ iflib_simple_transmit(if_t ifp, struct mbuf *m) else if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } - (void)iflib_completed_tx_reclaim(txq); + m_defer = NULL; + reclaimable = iflib_txq_can_reclaim(txq); + if (reclaimable != 0) { + /* + * Try to set m_defer to the deferred mbuf reclaim array. If + * we can, the frees will happen outside the tx lock. If we + * can't, it means another thread is still proccessing frees. + */ + if (txq->ift_defer_mfree && + atomic_cmpset_acq_ptr((uintptr_t *)&txq->ift_sds.ifsd_m_defer, + (uintptr_t )txq->ift_sds.ifsd_m_deferb, 0)) { + m_defer = txq->ift_sds.ifsd_m_deferb; + } + _iflib_completed_tx_reclaim(txq, m_defer, reclaimable); + } mtx_unlock(&txq->ift_mtx); + + /* + * Process mbuf frees outside the tx lock + */ + if (m_defer != NULL) { + for (i = 0; m_defer[i] != NULL; i++) { + m_freem(m_defer[i]); + m_defer[i] = NULL; + } + atomic_store_rel_ptr((uintptr_t *)&txq->ift_sds.ifsd_m_defer, + (uintptr_t)m_defer); + } if_inc_counter(ifp, IFCOUNTER_OBYTES, bytes_sent); if_inc_counter(ifp, IFCOUNTER_OPACKETS, pkt_sent); if (mcast_sent) From nobody Wed Jan 7 21:19:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmgsj1zYmz6NLKL for ; Wed, 07 Jan 2026 21:19:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmgsj07BMz3Xhq for ; Wed, 07 Jan 2026 21:19:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.161.50 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-65d132240b5so1442288eaf.2 for ; Wed, 07 Jan 2026 13:19:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767820787; x=1768425587; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rEhjz5b7MRJ/t5+vW36VR7zicYma/zcDBZICdSsgQYE=; b=OVkH4tNMUkkWOre9FH9jUozubqmoll06EXtPH06xi2VAwcEZDBzsdhxn2Y+2/FI08+ 0W35/6efq46qVKnQjiCxZJvlP/j+lU5IeQQhP73G68e2XfqKC0oc5jQULN03a6PLn0g2 HyX1dggAva0ioGPv9Ot9N6vg/mHLXz71fgvDvPjzv/j7+yMoR/OS3hnBcIbR4y9YNmVO t05vOroR6ETgcKzX67fW7A9GQikm/X9cXhesxyyx/DlN2XbgnnnFJ0QfVfMiSZzo15M7 uQ82pAegQhwhf1dcaahmASExT3msX0JWshzEbTPY/UEy97WUq7ePm3ClhiV5rNxaqzH/ ebPA== X-Forwarded-Encrypted: i=1; AJvYcCXh9qdflCRpVWnFYsfldZZcg4dOO6vUdF4Nbp/YoznWl+xDDNXxTD125SBNhvQw/qmxeEWWzkhgbu0mvL6QAWLg0+LqaQ==@freebsd.org X-Gm-Message-State: AOJu0YwwVijLHs8sxpZsz6/oPOadW/QTl4d0/Bk/LarKEaTCi68nkp0j TfUUShNm/xeQc1HtVhD88vsanwV0LD7Y0ckxZWcl8BHsVfmjekgUYb4lapDUAmFhYgjv0lAtCNY Ll8+Wb9EnY9B9avFTVinhWa6AwXWyU5k= X-Gm-Gg: AY/fxX6B62+fGyzLdPUf39DQZiOPrTw7UkAQ71Zcj+ZgAl4sj+dI8X/k/VtlxTFvdoZ j97zKkQRkusMfi6CPZu+gpGbvb/Xvje4cZ0VcC555HRRZ/yoAlyvOc6f2H5RXSCt9mExAzhhGoj WM76dWzAJytT6MxFDRCbKvTp6g6BRMBAlW6U/Rll7NtVutOBZfmXTI6gwQUupxchI+MlWptN829 qA4L70pKpaVTM8WFqJPiGrDz+4TbxZhiL8HgM4mmG9Xy0yib+nGdJpHwaVQwbrRUgr6dNTZJNPP HxfLCaThjnsQf6IQvRdUXLtJ7GyyV/CqJ0y7I02BRfnkiwDp6qHANPDPPwsF X-Google-Smtp-Source: AGHT+IEQOomZaDXiO5e8N39VDmReLQOrqyxhup8p7cAWWX8dWKvfOZ1N+JE8ZeIsj5GH6CjBmydeVRghAzO3X6ZAuNE= X-Received: by 2002:a05:6820:1517:b0:65f:1038:130e with SMTP id 006d021491bc7-65f5508d9b5mr1594367eaf.73.1767820786901; Wed, 07 Jan 2026 13:19:46 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <6958dd10.b4b9.2aebecda@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Wed, 7 Jan 2026 16:19:34 -0500 X-Gm-Features: AQt7F2oTUSGfcgWPCH9oMk3shvys8sv8EWd_bITa-PGDQRtXbOkfPl67gVfvvE8 Message-ID: Subject: Re: git: 27894e20f140 - main - libgeom: Fix segfault in 32-on-64 case To: John Baldwin Cc: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rg_rav?= , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.81 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.94)[-0.944]; NEURAL_HAM_SHORT(-0.86)[-0.863]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.161.50:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[carpeddiem]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.161.50:from]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4dmgsj07BMz3Xhq On Tue, 6 Jan 2026 at 09:37, John Baldwin wrote: > > Should we perhaps not use pointers to hold the cookies? This is going to truncate > in the lib32 case which will probably still work in practice as the low 32 bits of > kernel object addresses are probably unique, but isn't foolproof. Perhaps the cookie > values should be stored as either kvaddr_t values, or uintmax_t? I left a comment in the review that it would be good to at least have a comment in the code explaining the 32-bit truncation (that in practice they are probably unique). From nobody Wed Jan 7 21:50:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmhXx6km4z6NMcg for ; Wed, 07 Jan 2026 21:50: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmhXx5zM6z3f8d for ; Wed, 07 Jan 2026 21:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHgarHpBLDiwGteGI/7pz0OnfJcF4prnac3OM5E3iTs=; b=B31Gt3pZpua+mj3Oiv1hRfSleWg0L2R9+WJRZO3qCInMqYDb8+uYXTEVfcoWxVKxhY9b3h DMe4Cq/TxQ7Rf1IP1PewlfLX0QX2v1EHh2+04zojrEEp1tmP5YTOV1gddeTPIM3iBK5snG q6NskZwrWQy7b7bQhHJ7BS+rIcQ8GgH2z2XqTdeD19DMyGTCgSwVdD/8gOYhQrYWyBXrqP Th3m9LBQTddtIO709PnQfSTATtTIZ5Q9zJbSnXWVgQxUgQ9TPPqmm4+4qYTJl/RmNb0Az4 vSCkGhHw2Vjk0OyZmCJplQGr1tUca/7EwbWqKHwilG2Ls7kqy+xQrv8o2OrjAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHgarHpBLDiwGteGI/7pz0OnfJcF4prnac3OM5E3iTs=; b=IUeDjgSAmVYgDFS0fD9RD7UgWCEbTJQ+GZdOulx0jQJH+MiG5/TQGd6oHmpenJ7YaAj9Qx NVU/pGnPnsmMMUOicH+84H8t8zk1NwELMxBTYuQvA72M2RTXrtGQ9qz858pxC7tGgAxBJc zDyY8Uiltdm4bKMAsgckipNIGPmMtRWPmJUGkEprbHrRlT5qwr6vgAJOyOBQDwG7Kr+M8k 9zY3bt03h/3c6n3D57QAXK1Ao/Za5AOCMHiRTz8q3ZlIZpkM7O2BynXYvJV0/vTBnjxA6q eeIHaZH0fbvBmZGev8RaVf917x7ct8KvuCdVdCGkD9VJv0HkxW+DKdaPNRNDJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767822625; a=rsa-sha256; cv=none; b=rpxsFTHVUxopJzXYHA4H3a/urYSdzjGY43Pxr6lcTP517Qe06zo1o+ekbgP41eBmF0D8f4 ePnPQSFKD+BA8CB0U8uMo1xwOAA052NVOYeLooQgrBZQLVOLBbjX6Rjg/Hvn8ztFfUQHbk BJL32Cg1VpGeC8k/7T9d8gnKqo4/vRvFubdi+/2gYgW6S7j7WVx5qYnveueL5huygXI+Ky of9qsRkDSGhsFB9wneZDvS+7WRoj5j++Ch4n6jgpGd51By4Sbb2DjR+DrZDfX7v0P3ty9H /QR0Mqb0liEGMaSsn4YGVMYH+Pb308vEvi8GduB24035xA6yrvbUPlqv8AgMWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmhXx5733z190x for ; Wed, 07 Jan 2026 21:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e7a5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 21:50:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: ac341353a043 - main - linuxkpi: Define `raw_spinlock_t` in List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac341353a0434408eec6388f3451be8517252c5f Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 21:50:25 +0000 Message-Id: <695ed521.e7a5.5368f5a1@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=ac341353a0434408eec6388f3451be8517252c5f commit ac341353a0434408eec6388f3451be8517252c5f Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 21:55:04 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-07 21:38:36 +0000 linuxkpi: Define `raw_spinlock_t` in For now, it is synonymous to `spinlock_t`. The DRM generic code uses the `struct raw_spinlock` and not `raw_spinlock_t`, that's why the definition is a struct embedding a `struct mtx`, compared to `spinlock_t` which is a simpler typedef. The DRM generic code started to use it in Linux 6.10. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54489 --- sys/compat/linuxkpi/common/include/linux/spinlock.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h index dc10b0457153..341e89b6feed 100644 --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h @@ -178,4 +178,24 @@ _atomic_dec_and_lock_irqsave(atomic_t *cnt, spinlock_t *lock, return (0); } +/* + * struct raw_spinlock + */ + +typedef struct raw_spinlock { + struct mtx lock; +} raw_spinlock_t; + +#define raw_spin_lock_init(rlock) \ + mtx_init(&(rlock)->lock, spin_lock_name("lnxspin_raw"), \ + NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW) + +#define raw_spin_lock(rl) spin_lock(&(rl)->lock) +#define raw_spin_trylock(rl) spin_trylock(&(rl)->lock) +#define raw_spin_unlock(rl) spin_unlock(&(rl)->lock) + +#define raw_spin_lock_irqsave(rl, f) spin_lock_irqsave(&(rl)->lock, (f)) +#define raw_spin_trylock_irqsave(rl, f) spin_trylock_irqsave(&(rl)->lock, (f)) +#define raw_spin_unlock_irqrestore(rl, f) spin_unlock_irqrestore(&(rl)->lock, (f)) + #endif /* _LINUXKPI_LINUX_SPINLOCK_H_ */ From nobody Wed Jan 7 21:50:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmhXz3jp9z6NMlm for ; Wed, 07 Jan 2026 21:50: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmhXy73byz3f8f for ; Wed, 07 Jan 2026 21:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejy7VMmVAULv/Tdk6r023vbv29u3i//FVGX/n4iWjtA=; b=we3ngrbb3KgZC79Zup6uVPmTtD9jHSDTPpfxv++PrIDVyz7i3OxsLP3G+rKDC9/4/prCgq z+tNactluuXbV5kxFu4ULHiFdUiGLbiBgqPokFYdZKvCbhC3yhC+UtuFmSlsyicOnyOmGF 9tM4WWA9PtSGuniCW9xwIRGbK6FZiuLfBgJ0BP/3UgNbx4cUpWby4idAj0vpKeux5USJTh DZBf/B1by3usFPy+dIT6famo8ZqtHwMoOexFX8zNMtWgUnJLeVKMe7QxLUWVvBPZtr+eV1 kJIC3m4PCuL5Zf0x/WSDxfR/Zq+D2fM2BlSTKfMVxoJYZPeVQJtQGsSndznpEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejy7VMmVAULv/Tdk6r023vbv29u3i//FVGX/n4iWjtA=; b=loyWrWHnvwrwfywjJaL/jwfl0i+r9VUES+jHLSO4RO7M8EEgUNAXKVlMt11pL+LfDBHzM+ XSHfLIpQ6823XbXIXSZpG3Osig3dFmzKEFh0SGNBCqEHXkkmW7RMm8pBGDU2CCyuqG543A s40w4tABzdVKwq1b/YPcRzfMIL7UhuImp3fYqXIJcxuIdrxLqh5A9WO0J0gfAnOhtckA3m TqW1Dl9wyCLJmQ+Low1dfBV59A3QEG4n93cQbz/b2xqmwrmHNBwl/c70WkiDKKT48mM5Oi uK1lRcL8hywsPMuxVACcEtglmcE8OtdL9S8bQCayK2HvsUV1eH8iu477y/fFGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767822627; a=rsa-sha256; cv=none; b=Id3S/kDyopxVW5C+SzQM6dFVwYEJmWn4U5HmVCiDlVvvFh9UkNqOcWja0p8y1VVlz2+bvI gLms9hsOmoQIfB6ZTfCcpdwPMJVuRHKOoGmH3ruZSA70bDyV6ev4VeizacBjfL5C0Wt6JN jwiywT7aUwAbAYgb1Iaw52Jkvkua6W4HN4bdRCp7Gk7BhCBsAUyfbZWDwYpOH+PpkFyaJM Bo9bmMaA3GwhtKCBAVko0hGU8l3aoVqXQZ3y5NF1bsrox//iRHVR5vmbxdAARtOWXy1FP9 JIl5Wv6Xy3B23BQKayT3kd+3LBoyEVjXrNh39R3q1pE6I8paZHUKn0j1XjszJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmhXy5y4Bz196P for ; Wed, 07 Jan 2026 21:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c078 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 21:50:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 514d37fa268b - main - linuxkpi: Add List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 514d37fa268b8b181e3632d7f138bd09aa15683c Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 21:50:26 +0000 Message-Id: <695ed522.c078.9139e8a@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=514d37fa268b8b181e3632d7f138bd09aa15683c commit 514d37fa268b8b181e3632d7f138bd09aa15683c Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 22:00:10 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-07 21:38:39 +0000 linuxkpi: Add The header defines the minimum to allow the DRM generic code to build. The only function used so far is `get_default_font()`, as part of a DRM-specific panic handler. We do not use this panic handler on FreeBSD. For now, it returns a NULL value. It should probably map to a vt(4) font. The DRM generic code started to use it in Linux 6.10 as part of the panic handler. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54491 --- sys/compat/linuxkpi/common/include/linux/font.h | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/font.h b/sys/compat/linuxkpi/common/include/linux/font.h new file mode 100644 index 000000000000..45daa00b61f0 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/font.h @@ -0,0 +1,33 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_FONT_H_ +#define _LINUXKPI_LINUX_FONT_H_ + +#include + +struct font_desc { + const char *name; + const void *data; + int idx; + unsigned int width; + unsigned int height; + unsigned int charcount; + int pref; +}; + +static inline const struct font_desc * +get_default_font(int xres, int yres, unsigned long *font_w, + unsigned long *font_h) +{ + return (NULL); +} + +#endif From nobody Wed Jan 7 21:50:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmhY03HBVz6NMbK for ; Wed, 07 Jan 2026 21:50: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmhY00Cmdz3f1k for ; Wed, 07 Jan 2026 21:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LpEoFIok3+3HdfughtVOLIMG8UiPPrfu5wp57Ke9FM4=; b=jwnl01zF93/b6m39JArdMFvrkBvJB9GDObsPn9xJ7ifRIOWOFeWz/jRps06IeLoqoI9F08 zmW3cq1qcpxos24/tQyB8Q/iK+AuJqVKUW0UKCWso8CpyCRNVfV3J2EDddsJ7H7O/wIcbc Z+GeygDxa9LdM+OFzcZi8ieXOFS+DPKk6DtqjUeNm9XRtB4FiV2Tn1ofBwjiHkW4eOjYeT Oh5uiWQ2wUhpmqIOCBrmCmRXYJujumH2qRpCJ8iWz/UbKHLg8Xsi6kF+nJ7T0il6xJczUl PgCiViGNxxvL7oppWvf2VtL7hRlRGoThzMNjZpFWahwNKlcyWWFAMpk3pjI7gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LpEoFIok3+3HdfughtVOLIMG8UiPPrfu5wp57Ke9FM4=; b=pJyC39D+dBE6E78mvlSiT2jl7Q7YOiVALRMKWA5MU7Uh9EZCzaMzR+vEaMeRuAw7Cjt1MZ kkZ5OPQ2nyt5t0YXFFrtp/LReLSdchdcSsZ1EDqHUc1aWgzgfb6q2PH7JO6VRvYxXo5YqN N5H0OLZiCwJXZS9D2KFL4r5bqf1lbypO+J5d59N5drRWSdauv2h8Xfi1FOnLh4n+yoDeEt TBk/jmH+yuKPjf+FDQIZZbb2HqSkYrp8cFiUjFZp0b+qDLKuI6WooXWl/7Ril99GCYqDiG DeL2y3UFmJSl/XiN+ebs8kOfIcLGiiVfX9k/DeJXQP7VGmRbUcv+VKxggohYGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767822628; a=rsa-sha256; cv=none; b=VR2jhg7YKp9DOQYBS2nTPNCiWiHp+OgZHP35d2aOSkufEXgb8qPEq6zsoeNGTVju2+l2Nm C5LA5lo+41jz4aBoOCfGDVLFxNQ7Du2CPweEiankUd4V7Na7hplSDlrEHS9wdu7GyEAteM kbsGRqQDlZ9MZN8DN7fNxg8xlTyA8iAoWCQRTD7KJbEmqm/HMP5Kk8581DFYOVWKj5oObZ SELYLaODzq8q1RFAvtW+l56G7jm+ZxCji8/tMOmC1osQAJ37FuIQW5UpauuObBgM+XQUR9 PMJ2F9fMgH2YPBWSoyJ71rXbG8E+al8Y/WlnbaEiDP2o99xQj5u99/bERjyhAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmhXz6s1xz18hV for ; Wed, 07 Jan 2026 21:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e880 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 21:50:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: e86e4f161e72 - main - linuxkpi: Add List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e86e4f161e7232b7ac19af906368c664d6167cdc Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 21:50:27 +0000 Message-Id: <695ed523.e880.53f9942e@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=e86e4f161e7232b7ac19af906368c664d6167cdc commit e86e4f161e7232b7ac19af906368c664d6167cdc Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 22:02:18 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-07 21:38:40 +0000 linuxkpi: Add This header declares register/unregister functions to allow a piece of code to tell what function to call in case of a panic. Several panic handlers may be registered. The DRM generic code started to use it in Linux 6.10 as part of the panic handler. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54492 --- .../linuxkpi/common/include/linux/kmsg_dump.h | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h new file mode 100644 index 000000000000..25f96b304f59 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h @@ -0,0 +1,51 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_KMSG_DUMP_H_ +#define _LINUXKPI_LINUX_KMSG_DUMP_H_ + +#include +#include + +#include /* For pr_debug() */ + +enum kmsg_dump_reason { + KMSG_DUMP_UNDEF, + KMSG_DUMP_PANIC, + KMSG_DUMP_OOPS, + KMSG_DUMP_EMERG, + KMSG_DUMP_SHUTDOWN, + KMSG_DUMP_MAX +}; + +struct kmsg_dumper { + struct list_head list; + void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); + enum kmsg_dump_reason max_reason; + bool registered; +}; + +static inline int +kmsg_dump_register(struct kmsg_dumper *dumper) +{ + pr_debug("TODO"); + + return (-EINVAL); +} + +static inline int +kmsg_dump_unregister(struct kmsg_dumper *dumper) +{ + pr_debug("TODO"); + + return (-EINVAL); +} + +#endif From nobody Wed Jan 7 21:50:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmhY1281Cz6NMcj for ; Wed, 07 Jan 2026 21:50: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmhY10rfPz3dyy for ; Wed, 07 Jan 2026 21:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=38F9HxUMsEZN4Ca+vBRIxdxwFEE5BqVhjHIsQNdKy8Y=; b=ZM7DAUDnruNZzmddFqu7K65B1xEEI10BG4WZDnWq644FXikrbX+LbwHBz+KJWfHAayUCAG NZru5yXhhjpPZ8IYLiP8qoBPyel1Ihhx46BfFfIMQpncl9IeIB/XbNRFtxtD3XkQ2BRPiR pNJhiHNqBksuapkmdD0n3P2Za3aX0myHuCwDufVCr5JMOCsDvlPoSgURtGNOJ1g2vclrfI BqgoWR0a5Y7nGzFlMTpjn8BO41+vflUcryqX85RPpEJ9C1t5mle+I8Z/efbHli78pEYt0A IwGQwn6AA6SieMg96Q3H+wPwKWzfUC8WoF+2yEk1iywMBmhHysnJkvmOfbDyog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=38F9HxUMsEZN4Ca+vBRIxdxwFEE5BqVhjHIsQNdKy8Y=; b=fWRpsSuoCd2t/Z5G3P9b+7gw1I6s2s72YHHW7CTZbbFG5Abs159+kH6PW3YLadOCVZsBv3 F0ajMaLZ1CJQtpoNK+Vn8SHTCq1dD5YEIU6zchbZOgatpYWePCmiU7Ovl9Wuh8OktshY0w Bl+WQyf1KmQbymZzhKL/k5+FOW/Gf1wGDriL9f5AvW8mzqRKmoNppqzc0YFBCvs7FLFekx JDw8G4L+tt3+O+C3r3dPcy4vw/ywd3c+RIg2R1eGizmm0PiYq0KwFHPMyRQgLYELfkqt6u 1Iw5UtW37SaXH8hHKRkVTVsg9KyGjFpDhh2gYKKcEyioG/WOIICUUkKXUXhxGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767822629; a=rsa-sha256; cv=none; b=f9424ubwzkPwBdInFSf1n9p0N231891W41uZmHRQQxok25jvVMMgguHqthLmY64wx5lAUS vgus5UsthxDCmzxa8uC8+4ei/dyyCS5Ar7Ap5Omy65o6oGgkAAYxkoUgXlTpy+FtRtMbR2 s93f5qpeliUH22KVWwrlftq6JIJGH6BvT+/80fBUiR/uWyFQ74N7YGycdX1d8sr1xirRLy 8Y60eHHxLI88OQc5bdn8esq/s15Q7t+m+bgGB4RSce3G8kyX1S0gqJBYNgU9Jin0BJiF6S rjtGBgB3VpaAH3XXZaCtSmJfm9XW46i6otJpZc/pYR9SG7MkYlb6F+PAc1/24Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmhY10BJQz18Sl for ; Wed, 07 Jan 2026 21:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id deb0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 21:50:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 3942e85b9921 - main - linuxkpi: Add WARN_RATELIMIT() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3942e85b992138056841cd7c96ea20436a66b740 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 21:50:29 +0000 Message-Id: <695ed525.deb0.3b40a993@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=3942e85b992138056841cd7c96ea20436a66b740 commit 3942e85b992138056841cd7c96ea20436a66b740 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 23:14:52 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-07 21:38:40 +0000 linuxkpi: Add WARN_RATELIMIT() The i915 DRM driver started to use it in Linux 6.10. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54493 --- sys/compat/linuxkpi/common/include/linux/ratelimit.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ratelimit.h b/sys/compat/linuxkpi/common/include/linux/ratelimit.h index 9585b4b994d7..fdef57c7882d 100644 --- a/sys/compat/linuxkpi/common/include/linux/ratelimit.h +++ b/sys/compat/linuxkpi/common/include/linux/ratelimit.h @@ -14,4 +14,11 @@ struct ratelimit_state { #define ratelimit_state_init(x, y, z) #define ratelimit_set_flags(x, y) +#define WARN_RATELIMIT(condition, ...) ({ \ + bool __ret_warn_on = (condition); \ + if (unlikely(__ret_warn_on)) \ + pr_warn_ratelimited(__VA_ARGS__); \ + unlikely(__ret_warn_on); \ +}) + #endif From nobody Wed Jan 7 21:50:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmhY33m03z6NMKr for ; Wed, 07 Jan 2026 21:50: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmhY25LwTz3f06 for ; Wed, 07 Jan 2026 21:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MsXflS5Uh9hTGuIulCET2/uxuIQpwToe9KRENKMdRlM=; b=FZNYWJNGAeCgTd8d+TQMTvLkq3bV8y8fwozaTx5CRag98jmT2YxqRrSe16I/KeqkKd8bRM 4/iODgwlFSDGlIGbBy5vQkdSrcZDtCP8eHpZ7rqGT9AVvT9wYKAcEheoDYPikKWqLnGHUa x2o8r59urG0Bw9VLrgAFZW+y9gynDUPjjYfL9LsLFF5DrF+iD/hZquTXldJJ6OlMQ7hQ3f L6ani9UtJnnMYtOuptXfYQiVDwT8IDevTcZg3okKIAWKclAzv40iArh4DUXz/Kziujr2q0 HagP7Ga2whlRNMp2sOgdKVPuqkvdvf/Modu5l5m97/Tvaz3wTzR5KW/usw65cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767822630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MsXflS5Uh9hTGuIulCET2/uxuIQpwToe9KRENKMdRlM=; b=yM8QV5BPsmjbRriTyk9ETOgMMdKux22jEntHIMdmD1uzwNyVgvfIsxfEb8OkLXAHaw/OoK B4oqlFyYgK3RcD1kDqrgrw9aL9x8MVOnxul441QTVBay7OQ5HR03P62mYI8Wtw61AwiQd9 rJ46XMg7YT4oaKeqfPjyYRYisH6hdNjJH8fCZzfxhEYLDqqU7BJdiz28aOyh25omgDDlhu IDYEI0dtdKmeMohXTL3mTSyPzIiAtQVMFOW20scMCTApk/RNl3GfNvsDNXqMwKm4G9Pcc5 FU6NOFMEJVBwNpDhJllYOw5P6NFCYnmJs6maL1o1cP1nRFMkvH/7MSd+AmrxfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767822630; a=rsa-sha256; cv=none; b=mub+2etR3cZEGc4mRj+BMP11qc2OgW/0dJJqLoFZvPme+zPGt70ny0yqmmr0VLXbPJVr2D 9+0g+FtDs3J8aYKAsjuKkZm9myOE93qRodQzrhDb3UXu9caUEgYBgnTYfw6Ie6XqFsYx6Y uF8iDILUMGlcMmeAV6VGY+zbgKGG3gqZFVeM58BMKJ/dKm+gsezXXU3xH0fGkKQEDbrNdH sakJ/IpMNoLSXjoY2fcHLeqA/NPExN3GBmkKNWXDAKv2HWFc9IuK0C6lvLRWf48mnGf/qw pYCMj9EX0xCNnoqpjEEhPirF6yh+lcq1PBkbhjdyDvWY4UQ4l1MNXlKcX8oiwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmhY20nc5z18fx for ; Wed, 07 Jan 2026 21:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d639 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 21:50:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 10c6f1f627cd - main - linuxkpi: Replicate the chain of #include in the `cec*.h` headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10c6f1f627cd4267f9b95f60a9a30e4609566f8a Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 21:50:30 +0000 Message-Id: <695ed526.d639.6425540c@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=10c6f1f627cd4267f9b95f60a9a30e4609566f8a commit 10c6f1f627cd4267f9b95f60a9a30e4609566f8a Author: Jean-Sébastien Pédron AuthorDate: 2025-08-13 19:13:10 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-07 21:38:40 +0000 linuxkpi: Replicate the chain of #include in the `cec*.h` headers The i915 DRM driver depends on this namespace pollution to access `debugfs_*` functions, after several explicit #include of were removed in Linux 6.10. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54494 --- .../linuxkpi/common/include/linux/cec-funcs.h | 16 +++++++++++++++ sys/compat/linuxkpi/common/include/linux/cec.h | 3 +++ .../linuxkpi/common/include/media/cec-notifier.h | 17 ++++++++++++++++ sys/compat/linuxkpi/common/include/media/cec.h | 23 ++++++++++++++++++++++ .../linuxkpi/dummy/include/media/cec-notifier.h | 0 5 files changed, 59 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cec-funcs.h b/sys/compat/linuxkpi/common/include/linux/cec-funcs.h new file mode 100644 index 000000000000..1107b04e4e08 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/cec-funcs.h @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_CEC_FUNCS_H_ +#define _LINUXKPI_LINUX_CEC_FUNCS_H_ + +#include + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/cec.h b/sys/compat/linuxkpi/common/include/linux/cec.h index e0854d87d85c..b08d891537a9 100644 --- a/sys/compat/linuxkpi/common/include/linux/cec.h +++ b/sys/compat/linuxkpi/common/include/linux/cec.h @@ -3,6 +3,9 @@ #ifndef _LINUXKPI_LINUX_CEC_H_ #define _LINUXKPI_LINUX_CEC_H_ +#include +#include + #define CEC_PHYS_ADDR_INVALID 0xffff #endif /* _LINUXKPI_LINUX_CEC_H_ */ diff --git a/sys/compat/linuxkpi/common/include/media/cec-notifier.h b/sys/compat/linuxkpi/common/include/media/cec-notifier.h new file mode 100644 index 000000000000..8d6fc452b907 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/media/cec-notifier.h @@ -0,0 +1,17 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_MEDIA_CEC_NOTIFIER_H_ +#define _LINUXKPI_MEDIA_CEC_NOTIFIER_H_ + +#include +#include + +#endif diff --git a/sys/compat/linuxkpi/common/include/media/cec.h b/sys/compat/linuxkpi/common/include/media/cec.h new file mode 100644 index 000000000000..c96b57868e23 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/media/cec.h @@ -0,0 +1,23 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_MEDIA_CEC_H_ +#define _LINUXKPI_MEDIA_CEC_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/sys/compat/linuxkpi/dummy/include/media/cec-notifier.h b/sys/compat/linuxkpi/dummy/include/media/cec-notifier.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Wed Jan 7 21:55:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmhgN4qw4z6NN12 for ; Wed, 07 Jan 2026 21:56:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from smtp-8fa9.mail.infomaniak.ch (smtp-8fa9.mail.infomaniak.ch [IPv6:2001:1600:7:10::8fa9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "relay.mail.infomaniak.ch", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmhgN0sDyz3hfk for ; Wed, 07 Jan 2026 21:56:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Authentication-Results: mx1.freebsd.org; none Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4dmhg83ZkmzHFw; Wed, 7 Jan 2026 22:55:48 +0100 (CET) Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4dmhg70MW0zHYh; Wed, 7 Jan 2026 22:55:46 +0100 (CET) Message-ID: <6fd19b27-49ad-4fde-886a-0a306de5a34c@FreeBSD.org> Date: Wed, 7 Jan 2026 22:55:44 +0100 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: d448578b445d - main - linuxkpi: Add To: Adrian Chadd Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <695c1a7c.859c.12adca29@gitrepo.freebsd.org> Content-Language: en-US, fr From: =?UTF-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= Organization: The FreeBSD Project In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29222, ipnet:2001:1600::/32, country:CH] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dmhgN0sDyz3hfk On 07/01/2026 04:13, Adrian Chadd wrote: > This looks like it's at least failing on armv7: > > https://ci.freebsd.org/job/FreeBSD-main-armv7-build/26773/ Hi! Thank you for the report. I prepared a fix and posted it to Phabricator: https://reviews.freebsd.org/D54588 -- Jean-Sébastien Pédron The FreeBSD Project From nobody Wed Jan 7 22:40:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmjfV10R7z6NPwH for ; Wed, 07 Jan 2026 22:40: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmjfV0DF9z3mhh for ; Wed, 07 Jan 2026 22:40:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767825618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZahDZ2D5vRVngA/HogQqWxeATZLJfYbBFZ5apa5RhP8=; b=Jzev4ZRwhNmbuWnWf/ILgaEyfV+TzVnWAnZD21ImYUYWigswhAXlj68hfHTPpkVORJMewy uJcEd4RuQ+dBiCWQQnXQNPKHfMX7bMebJrd72ah6Hu4yrrNKbSrcsnOJc69shNIJtNV3zu /gPTyoryvRNS0CQ7lDCFiDhPpFmqCLN/fNWd5KckPzYKOUoWTD6Dm16lqMWWuzt6uHF7ro BzNRwap56YTrFkVCctr1O2R0ulBtSRu2HaN9hwHsUQC7OBVqiy6GToMMtZpB7tskkGbXQC RV6VifxyrJ9PlK6dn46yBxD3yuhSzzSel90SWopqqpGvIWSIUpfMz8VCg4oHDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767825618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZahDZ2D5vRVngA/HogQqWxeATZLJfYbBFZ5apa5RhP8=; b=rDdysp0N1F9tiq1ToD5Wk9QQFHWxCoqToRXUwlJ2p9ZpDBblOIWzJt8orjEHKsXo0IgE+O crdYc1tBmcK4SQE7uPfAgWlTEbTdJKO0XjoYBuL5NRu5L3hg1u+zUV7JRgYWXRXD3wbK1g FxekF/A8l7q9h7WeLYurb+zcGAU5uoljdeQSe9IwJ9epWtpEWXPlLa7Xsff6YnY25nWwj3 HVRHIzALpelaoRjNc9vUpzgo8em7jasY/jvuq/HTZPthDI/y7NwYT20dojgYzmg7LU/0AK vDiljvvB7G0+TUfTS41mzKHUFQBdOCdEePC1S3NGgxMf3uaWpo8yRhO1QDYsCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767825618; a=rsa-sha256; cv=none; b=P8EUiruRx2qk90VdFoByozhswxP+FFw4Iyt5y9Wdl4ePWMzBznV/USFB1MnjTugcNFNOQl m2L1NRmcfQ6jPjKirW4OKSAviE9rO0W/A61UE4Pct5GJcWsMKFq8aa8GRjH2JP9sJAFf22 JkfE24+JXGwUDRh+5JDHupwn9epDm0v3TndTD2/vhlN59Xqs7VjbeGWMix6WPm1Kqepsd2 Cj2mZWqBUsNZyEjQ7eQHu6cOKprgHLsBmC59gDm8Jky5/XS4Qq096lNLuPU7ELR3+RZc/F n5Hs/X4P75Dc2r4wLpVL0QAtaeBeDlpc1oACVKbzb9n1nlpcVSjDKLjqOrgWBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmjfT6hVKz1B9s for ; Wed, 07 Jan 2026 22:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 223bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 22:40:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 6c0bcd15e478 - main - linuxkpi: Add `rol32()` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c0bcd15e4782ff2e23119a37396d693d09c695d Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 22:40:17 +0000 Message-Id: <695ee0d1.223bd.2c3fc8d7@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=6c0bcd15e4782ff2e23119a37396d693d09c695d commit 6c0bcd15e4782ff2e23119a37396d693d09c695d Author: Jean-Sébastien Pédron AuthorDate: 2026-01-07 21:18:38 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-01-07 22:39:04 +0000 linuxkpi: Add `rol32()` `rol64()` and `rol32()` are used by . The former was added previously, before was added. However the latter was not, and it broke the build on armv7. Reported by: adrian Reviewed by: adrian, rpokala Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54588 --- sys/compat/linuxkpi/common/include/linux/bitops.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 969b5e8245e7..ebe9aa120094 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -443,4 +443,10 @@ rol64(uint64_t word, unsigned int shift) return ((word << (shift & 63)) | (word >> ((-shift) & 63))); } +static inline uint32_t +rol32(uint32_t word, unsigned int shift) +{ + return ((word << (shift & 31)) | (word >> ((-shift) & 31))); +} + #endif /* _LINUXKPI_LINUX_BITOPS_H_ */ From nobody Wed Jan 7 23:57:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmlML70nHz6NTdN for ; Wed, 07 Jan 2026 23:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmlML6DtMz3vRr for ; Wed, 07 Jan 2026 23:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767830238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TioxIWBvGyNlYGZuZ9pKvXWIX/cqNAxkz6ORANUWiUs=; b=Mm+vtWWtJ4cyeQ5m9nYpKZcYBvCk2bA0K4rd29ecWWHcby4RJ6oaV7w7FIDAJam35N/XW3 Q84S1jL7KC+hThCQD5e4qYW26hENbqsS2pKrnlSJR8IpqhZU1aeYVfiDmWvit52PiDqf3b WIAGY/hXIJKOuUlf4FZ8itz35aVOkebCY2138Z+fB5ksiIqeB32qoaqsM7/qywQ8hZxAae YC7xwbg+iC3CeqAJhJQKIMsa3a+Lq8y+1FyqkScub5ke5ygQ9fpCRwNzDfa2C+TOAgmqCg 5aTtPyMLDyBxznhFQaMteGaeWYGgo2K+unrrbArB2gFKLQCXaz1zgZgrEOPP8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767830238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TioxIWBvGyNlYGZuZ9pKvXWIX/cqNAxkz6ORANUWiUs=; b=RsJj4rDhnXhJo/rg0Td4HVbjohG9Vt9k4Q6RKhTj732NW7dV8XfolBNYYcEI0A0BM4wt4c 2mwLbtQbbuZPWujHKzvc3F7owv2+5qc7QsyQ0pOUufFAbfKAz6iJDSavTvaxv5nw5bEthA 7G4202sT7r0aVcg/FU3qZvFkHjEcwDOMEUOKydT1gnBNhMPobdp86LZGAHchQFtkhfVsaJ Jqd16PE5JhcWJ1+mo4MUAg33yudPmIhF02P7cQEeV2zm5/wWAghszkwZ7THiwpblQomPOL RElX4pIDho5esw4i09fQz6HXotc2/WY9ym7TMQZz1Aic5PNp64z2gkR53Lo1dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767830238; a=rsa-sha256; cv=none; b=x8OjhtxME1si6UTdB85NkbUR7r0jheZgTDk5VT220fhEwgnSVyJUKFKzmhSV1MCL9lrzAG bcM4614X+3q8MbFFgWHr1c6xAkyDMKYBySmQn2TRLS7BPbtWS+QVXaYdJC+mCx5XlXN3CS VqYraNIrjRbRoRxVIqEZhB7x8tvJfWzxkD+A1/kb9AUncCHESAWAWiGIUxey8Gn0O8ntpV jz//ifYCbFLLjFUNgLBg7toonYBP9s/IJUKudi5SAvLqNmmDaLrCuzmlZG5OsWLO1MCds2 VKQAIFdMKOG00Ukw93mbQwOdszt67lB+Sm/IFLiTLRmRjwE+ORSa7sBO3aAOTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmlML5qxKz1CmP for ; Wed, 07 Jan 2026 23:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32505 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 23:57:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: dcb80621bbf9 - main - vm_object.h: tweak OBJ_ONEMAPPING comment even more List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcb80621bbf9a733b91f1a011af873318fac2709 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 23:57:18 +0000 Message-Id: <695ef2de.32505.897197b@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dcb80621bbf9a733b91f1a011af873318fac2709 commit dcb80621bbf9a733b91f1a011af873318fac2709 Author: Konstantin Belousov AuthorDate: 2026-01-07 06:25:46 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-07 23:56:33 +0000 vm_object.h: tweak OBJ_ONEMAPPING comment even more The formulation that pages are allowed to have at most one mapping is not quite clear. Nothing prevents pages from having more than one mapping, but the flag must be cleared then. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D54570 --- sys/vm/vm_object.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index cd1d10d4fb89..ca88adc12c24 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -197,9 +197,8 @@ struct vm_object { #define OBJ_SPLIT 0x00000400 /* object is being split */ #define OBJ_COLLAPSING 0x00000800 /* Parent of collapse. */ #define OBJ_COLORED 0x00001000 /* pg_color is defined */ -#define OBJ_ONEMAPPING 0x00002000 /* Each page is allowed to have at most - one managed mapping, all in the same - vm_map */ +#define OBJ_ONEMAPPING 0x00002000 /* Each page has at most one managed + mapping, all in the same vm_map */ #define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ From nobody Thu Jan 8 01:21:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmnF05jYwz5Yqq0 for ; Thu, 08 Jan 2026 01:21: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmnF04sdSz46xv for ; Thu, 08 Jan 2026 01:21:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767835316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHXPkIpn/EctVf1/gPLUEFjW7DnDP9Es44oe15j1cdQ=; b=wUK5LbEAw/iLnTwauU0f9t9H2TZ40TDd1JQ98vvIMQV+uRc31gk2McmH/KxbS+IFqEc5UM EL7qStd04GqldA/tjaIyCdgS0xFr0qOtpyyL1AE95xewdFLfu1NmOd96ONdSKmJxF0V7Sh vAPqpTfPF8eXDuo3vA7sZEXNM51LxtZGA5E+ELZYHaWYwpFZmMEsfu8qdJOUIWQMbyXL9e f3Bh3Z/2ka/vTw6X4S4JMufV3hSsTzUnPss2jdwxa2tKSjcGlF0L0EZQXpFdA8mPTm0Jhe Vz4xte2GbfYx8+f/4qUhhibUG2Uz+RPnoLGJkaQ07kvnup/KuCqihm6e5LgxbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767835316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHXPkIpn/EctVf1/gPLUEFjW7DnDP9Es44oe15j1cdQ=; b=whogzvt7f60/Jcc425BP3z56ZOUwYVYx1vmsGV3fOYK67fbjMx81mBB2Qxgl+w5YYFFdlX HqmITygMYZbO0hRkmQNZUL3uo326P7LJYivpFcQD3BBy9E9i5/h84nhxGamukdHRZjJjhi kgB1P9zBnTibXMehQAJsobk3LZuq1g4FTdrlxFwgBboT+pg6rEXUjvXSQ9K5Zl5OFucRgP C7MZk7O0opvBycuwuyOaWglNNVVBJZW8e5156c/aduqTypONxmEu7Mug6e3cfgnRwGue4S 7ZIcP58jc2/t55KpwIP5aiWjqgDKE8WrtdRDiuZL4ohnwO5hILaY/TkYBz4dEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767835316; a=rsa-sha256; cv=none; b=EsDuzGtSdDw+wEs7BidIhaUZ6hbAhPROmOsuSxkttQ2sJ8/YCQHGpAbklCZ9qyJ01MJd7O cLHP/i6RiTOr36nVpXxI7/1triqLINSAzRbTN2Pb89mJQsgkGYxPq4P1YxhKSQ7kCMC4sX BTIuvXvqKwh9VS9MmInXMr/XxEEBQHW92U2vLhZQC7HDHujNClunG3bcoKlB0TGyTNSIdI XraPZPVV9UNvWGVYNgDEdZDxyJmDFChb8rvE365bjUlASX6NId0yL//nW2xYumsal6wotA AkKX9JNEmEZV9E2m8xkUlZfcEp179AVvPemi/l7nC/UzQsYIxTIVRHPbYHXmSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmnF04Qqzz25r for ; Thu, 08 Jan 2026 01:21:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b01b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 01:21:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 61002e0371f0 - main - tty(4): Consistently use ISO C99 bool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61002e0371f09fcd024434144657496d9caa3908 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 01:21:56 +0000 Message-Id: <695f06b4.3b01b.bf5cc0f@gitrepo.freebsd.org> The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=61002e0371f09fcd024434144657496d9caa3908 commit 61002e0371f09fcd024434144657496d9caa3908 Author: Marius Strobl AuthorDate: 2026-01-07 17:12:24 +0000 Commit: Marius Strobl CommitDate: 2026-01-08 01:20:54 +0000 tty(4): Consistently use ISO C99 bool Fixes: 9750d9e5 --- sys/kern/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 067471eb949a..9297fc81df5e 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1036,7 +1036,7 @@ static bool ttydevsw_defbusy(struct tty *tp __unused) { - return (FALSE); + return (false); } /* From nobody Thu Jan 8 04:14:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dms4d2f73z5hjnY for ; Thu, 08 Jan 2026 04:14: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dms4d1rpdz3Fgs for ; Thu, 08 Jan 2026 04:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767845697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wSH3zqP5LhMaxEQHya7wkIvdQwhEfvDZckrfIFltiMc=; b=ETCY1mfXrD868k0ooSdgOWtVkE7OUGqDzCasfy1iIjCFgZcZl6zIMEgmncoXy+Y31FuFiO wz7UBS1i3qrWm4N/qS6eF1KaKMiuQ2djy/H+D9J6aCE/tsj4nr4LnA6AF7YtM8EiA48r+k FVB6TJLjdjH/qmFricAYr3uoHn65HbxrZJM0ruZuefFhuXFapK28LT9nu6NUL7tOn796yP eoLFcZGUn6jKgD7KDDWpo5nSE8EZUajZQ/ouaFyZRxFzbCDltitRuTJtXyjdq+Mkxvzn/v 1MCbfyqngcTfAPNaerPYB2PgKlj6sJ/KUTcDzZCKE9JsGWjjUm/3ehGQxYuP3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767845697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wSH3zqP5LhMaxEQHya7wkIvdQwhEfvDZckrfIFltiMc=; b=pS1TyJicVPiTqGaJDVn19AjOcwqEPzxgUFODFXOqQqnDs9X2PeyTpaledpc9DV2Z/CsKwA YsyDCrxACSD7FXOnE++r+TCPjgKFovdmON36LCs2UIjliKa76G/VrHV2rZ5sPPePwzUYCP K+qyzLahUdqpgNsEivo33lgHvwFB3CYqrIpt+04P+7J0Cgg62gbLlaALNAzaJ9okNvdnHJ xDy/8A2CuFPayXulLEHP9gIr6ubS9KNXhn0l908G0a+r+tSxKR8S/GS0++eIZkzL0Z2eRA bvY30GKuEe82Kxx5gLwiKt2O47qdTJRn/nIWdSh4cCO1CaY87IRMh7GDdQnpkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767845697; a=rsa-sha256; cv=none; b=nT7YxmKDDGHDXG83iClC7ZRFOqwSvFXfbMyqcoBoT+dlOS0dzgFrGPcpDpO5kst85S3BzP 9ueF6TI05tP/7nPwEOQs5soQStIq6B4KfW2PcEEqvRJ7YTe0khHskRU50JNKlxzGCBpO6G 8VUkiNMlqxstKz+2uvLYf8uJ/2XHIzHcLv6y+XB742Oo7t2CnoDRB03rZFEMDqxCzDH+U3 ZcR9yCI68TKTbg2bWQQbGc+aQuunIPrhpPaM7mLyotL9q90Gvpg6jPTOdB0DyoghXPHEsa PHGdVPSYAOyiDclZLv72YTPhBGLq99T3QkIuM5PkrXjtu2LRdsyJwJrTes3gkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dms4d1S4zz6xl for ; Thu, 08 Jan 2026 04:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2403e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 04:14:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: George V. Neville-Neil Subject: git: e2bedc7d6992 - main - Extend the script to collect gprof data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2bedc7d69926426a710d035df51e0a0812d38b1 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 04:14:57 +0000 Message-Id: <695f2f41.2403e.57b5cc96@gitrepo.freebsd.org> The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=e2bedc7d69926426a710d035df51e0a0812d38b1 commit e2bedc7d69926426a710d035df51e0a0812d38b1 Author: George V. Neville-Neil AuthorDate: 2026-01-08 04:13:04 +0000 Commit: George V. Neville-Neil CommitDate: 2026-01-08 04:14:52 +0000 Extend the script to collect gprof data While we're at it, switch to simple waiting from communicate() calls. --- tools/test/hwpmc/pmctest.py | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 588fe6d79e83..ba20306f1d68 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -26,6 +26,7 @@ from subprocess import PIPE import argparse import tempfile from pathlib import Path +import os def gather_counters(): """Run program and return output as array of lines.""" @@ -75,20 +76,42 @@ def main(): p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=file, stdout=file) - result = p.communicate()[1] + result = p.wait() print(result) elif args.sample == True: + pmcout = tmpdir + "/" + program + "-" + counter + ".pmc" p = subprocess.Popen(["pmcstat", - "-O", tmpdir + "/" + program + "-" + counter + ".pmc", + "-O", pmcout, "-P", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] + result = p.wait() + resdir = tmpdir + "/" + program + "-" + counter + ".results" + os.makedirs(resdir) + p = subprocess.Popen(["pmcstat", + "-R", pmcout, + "-g"], + cwd=resdir, + text=True, stderr=PIPE) + result = p.wait() + gmondir = resdir + "/" + counter + if Path(gmondir).is_dir(): + with open(gmondir + "/" + "gprof.out", "w") as file: + p = subprocess.Popen(["gprof", + args.program, + program + ".gmon"], + cwd=gmondir, + text=True, + stdout=file, + stderr=subprocess.STDOUT) + result = p.wait() + else: + print ("Failed to get gmon data for ", counter) print(result) else: p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] + result = p.wait() print(result) if (args.wait == True): try: From nobody Thu Jan 8 05:29:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmtk64qVyz5hpT4 for ; Thu, 08 Jan 2026 05:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmtk64HKzz3MTM for ; Thu, 08 Jan 2026 05:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767850142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzKQUpdGfMVzXDiGLulSgGtmzOJfPJb3kyA4XotYujE=; b=JIef+szX9OCWve288oQaC453Dgkf5rkUi69KL41brYDDLKeszG4rUdnlVMh+P5kAHpWcut CoqHFd+QtdhEdISNh/PlqxtU37FZoZSMA8K6d76Qi407vX3IOacMDSmxlz5xtqGESxt68R sB15sA55b1fQyl6Lxwdav0DIIukX7sPG1Ap5cQ9a7Y7agYZn3lO4DaYsMpxRifh5kz/HzX 3lU3bBBC9kYmZE1mxGOsszpxWvMPq+Hx8jlfVrJ1SPqmLIgXDXgIXL+hmm6P23vi77FFHp XyQAkO7/mXumGcRrnzDrbyEdz0RDVMTnXOWPtYqiXz0GkPme6LbE39vsKbO+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767850142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzKQUpdGfMVzXDiGLulSgGtmzOJfPJb3kyA4XotYujE=; b=VznZi9omjg1UJhVi3jEweyRJ1Mgo8+eryOdk8ImdknrIftl8Ylk8/eIFM9I2EYjAMBQe+3 5mXvWY8OZUtSLcIi+aqlWus6ftY6OJjHbGU0KboEj/uBfw4hFEdzKwwoEXS6Jq39BdxagH eeCvoE089jtcjUgjSd7Q5I/w4HvNZmfO0P0t2wJWxEB6Ifz+dOH/9toWMwXsyIdekVXuGX ohJ4J/30XjRKZiHkMXndsKdeaMpFL++/y2jWg2a9BqTqNnWKhmdDfnZkRZqbXEXjCnEYH6 NjrhuF7x/Zqk1yt5Dny/Ef/o4Qg+ZuH8qANLsUPbo/9rPeBYFZa2GeFWmtGKEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767850142; a=rsa-sha256; cv=none; b=PCFe605bLVledHuGgp5QVFX3/QDSy4zhIIMiG2/NG3vr0ByhzPo8buCZBD0E+XL4HNnD08 VDe2jYaqRMrtOYa7IvffGGi2QTVSaa9rfnKyYr2lTcXcgBEuDGSrg94fpNJx+6R9ldhUhQ /dHj0gkX5fF3j3YBBRjxTTbw9gi5RKsB42SHbsJgNaImpxPf30yr5YADTyJykUmZjNDwSk G5iTdetMHwcgHPd2IehyNA01aocQTHUFY1vJ1Vaz5aOhkQG50YbFQTWoxHWDoO7/MadIu7 oO5qum2M9v9W06GvrH8eD70My8hNQGYsZGkxjVGVBnv15JhltYF7QnKhuxXNZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmtk63qgQz8s8 for ; Thu, 08 Jan 2026 05:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31ec1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 05:29:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jarmo Jaakkola From: Warner Losh Subject: git: d82698ac68c2 - main - loader.efi: Only use SPCR if enabled. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d82698ac68c23d856716dc9f6524b9ef363d7eba Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 05:29:02 +0000 Message-Id: <695f409e.31ec1.6aa62f46@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d82698ac68c23d856716dc9f6524b9ef363d7eba commit d82698ac68c23d856716dc9f6524b9ef363d7eba Author: Jarmo Jaakkola AuthorDate: 2026-01-08 05:14:56 +0000 Commit: Warner Losh CommitDate: 2026-01-08 05:28:44 +0000 loader.efi: Only use SPCR if enabled. SerialPort in the SPCR is zeroed when serial redirection is disabled, rather than the SPCR being omitted from the ACPI tables ony many systems. Check to see that SerialPort.Address is non-zero before using. FreeBSD would fail to boot on systems that could have a serial port redireciton, but don't have it enabled because the loader would create a bogus hw.uart.console. While one could unset this value to boot, you couldn't do that automatically very easily. Instead, don't even look at the SPCR table if the SerialPort is zero'd. PR: 292206 MFC After: 3 days Sponsored by: Netflix Co-authored-by: Warner Losh Closes: https://github.com/freebsd/freebsd-src/pull/1948 --- stand/efi/loader/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index b731136fca4b..22dbd10a0f37 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -867,10 +867,10 @@ acpi_uart_parity(UINT8 p) } /* - * See if we can find a SPCR ACPI table in the static tables. If so, then it - * describes the serial console that's been redirected to, so we know that at - * least there's a serial console. this is most important for embedded systems - * that don't have traidtional PC serial ports. + * See if we can find an enabled SPCR ACPI table in the static tables. If so, + * then it describes the serial console that's been redirected to, so we know + * that at least there's a serial console. This is most important for embedded + * systems that don't have traidtional PC serial ports. * * All the two letter variables in this function correspond to their usage in * the uart(4) console string. We use io == -1 to select between I/O ports and @@ -886,8 +886,12 @@ check_acpi_spcr(void) const char *dt, *pa; char *val = NULL; + /* + * The SPCR is enabled when SerialPort is non-zero. Address being zero + * should suffice to see if it's disabled. + */ spcr = acpi_find_table(ACPI_SIG_SPCR); - if (spcr == NULL) + if (spcr == NULL || spcr->SerialPort.Address == 0) return (0); dt = acpi_uart_type(spcr->InterfaceType); if (dt == NULL) { /* Kernel can't use unknown types */ From nobody Thu Jan 8 05:35:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmtsS16BBz5hpqM for ; Thu, 08 Jan 2026 05:35: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmtsS0D7dz3Nx5 for ; Thu, 08 Jan 2026 05:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767850524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+YDHxhoi6vR7VnoxnCkHd7KoVbkpJ2ZnmakdlQgMBc=; b=WkvcVkgbyFi2bmfc6J9/hsz5n7JxeYbAKOBEPbLBdVFQdumBsyfiSRhP80JSU95N57pSP1 bD2tG0m+p1ZmozkwpvvCuNnHEDYnotpgAyJFoYVqpZJT6pa6okzt9R2Ipxwr4i+VW0Uo8k EOsNnLraXAk2nBZAsf7ksttqnbZ4zNMTzSdD1a35WugQEpN8CuJKt/p6dbMX9pa5bVHIku GphThii9ZzGVTPPF/z1LBosC9I+pv2+cR5KnnAYbqJ71cjA4QchL+LvtIbyiqy6Z78Pb8v ZIq05uUCxZGcGVNr/HnAWffh7i9UQpv6JQMlHyiCsDeUVGIIGCJbPY1SOWtjog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767850524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+YDHxhoi6vR7VnoxnCkHd7KoVbkpJ2ZnmakdlQgMBc=; b=HW1Aw2rxXOANCiVl4k8uQ9zG3WzX5SFzDRuq7L0Xwh4DNqfYRFXCm31W6XDXmVA49AMhLB vBl3hRUhvkjLiNuhs+a2yswt7mjzO/JbASNsyzwWtFalCUyCVdLwD2O1L/mM4CjizAQTwC xEQBo0qZAoLsjs9W2XlqXi/ToFxSgn17HsLHjACYOlwcCV+4qbSy2blRuSXhK5qIwFb8f1 l1khTCXNEv3DspYKf3Pzlx6Pt24zgGj/9SAUDIQvUnAbD7pgR3GgWyCAxcCakCMY/xqJRI BdMo6VztXSxR6xQbELJBw4+OhHBjRi5JaDKpjY9+rH0a2vf5phgLSGevPtMC/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767850524; a=rsa-sha256; cv=none; b=PkzcunXTUHWMAw13ArwRDnl1AYTnA3/AICLfEsrWDFf5+T0UGWVI5q3KeMsqf7de13504N umfz54Md/GaxpOJB3xdcEOtqRuSk5i1sh6jZoLeH6rP1XJ5Lm6dwT3LiY1uN/pW/FN6hnh y0TjVZa39ZcgkkHBc5xfjtjP3Hm9m3Gozx5ndfcFWty3Qr2ex4B+NBTXtRQP24Vlwmgw5k CSdMJYI2ZML8XxpTYV09CVlUUfGEX4WjmoOGavQvs4Tor1Y0cFChkjks1jOMUB/ez0NZH4 yHHvuVcM+CHp15fr5Izy+NX4ktrU1S71lL81/fIlkkY1G4m0zk5tAWKfIXdWtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmtsR6tY7z9Ll for ; Thu, 08 Jan 2026 05:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3428d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 05:35:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3989a3d81701 - main - loader: Only warn when we have neither FDT nor ACPI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3989a3d8170168570c10f4529a8ce7891d432520 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 05:35:18 +0000 Message-Id: <695f4216.3428d.2344537a@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3989a3d8170168570c10f4529a8ce7891d432520 commit 3989a3d8170168570c10f4529a8ce7891d432520 Author: Warner Losh AuthorDate: 2026-01-08 05:34:28 +0000 Commit: Warner Losh CommitDate: 2026-01-08 05:34:28 +0000 loader: Only warn when we have neither FDT nor ACPI Sponsored by: Netflix Reviewed by: adrian, andrew Differential Revision: https://reviews.freebsd.org/D54510 --- stand/efi/loader/bootinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 67b36313c26f..151ac34dd08e 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -432,9 +432,10 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) #if defined(LOADER_FDT_SUPPORT) if (dtb_size) file_addmetadata(kfp, MODINFOMD_DTBP, sizeof(dtbp), &dtbp); - else + else if (getenv("acpi.revision") == NULL) { printf("WARNING! Trying to fire up the kernel, but no " "device tree blob found!\n"); + } #endif file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof(kernend), &kernend); #ifdef MODINFOMD_MODULEP From nobody Thu Jan 8 06:24:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyB3Cvgz5hsY0 for ; Thu, 08 Jan 2026 06:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmvyB2W9cz3S5H for ; Thu, 08 Jan 2026 06:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i9531gylaQ48tN+PZxx9/WdJ33MkudmGEUxje7EocM4=; b=ZXed8dDJpqoYZxxKfzQVf5q7PMsfEdPRO3LV3yn3kdjGNIuub7BqvWxRbAs1cWw/FhZhOX MTiJ0Taichi2iEV66yh3h0jLzq1GYksMolhSHswu6tes6Pz1y6WfIS/p6UknbFjk2wk5s1 z6cbTbfV3QY+sp1CxQraFz3tElnLVb1hawjGIIIK8F3P8VFTQ3EDRvma/S7Qkd2UoU3n/T EywkJpVKDtA/I9kRXj0u2sDSqsKPZzDCw1SApXQdW3Z3WbRMRZjQmYURB5jJhJ1iCGo08p lAVqN2NgcZ1SYIhS7TfBoThnhQk9YCJs2nBk+7pLFx1fEa2N2Bv9IL3rwYnogw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i9531gylaQ48tN+PZxx9/WdJ33MkudmGEUxje7EocM4=; b=hkD+ORNqAebK2VE3Hmx42qaSuHNeJ+J2Ll8jAbdK2hOh4F3Bm1yMF8dA3ConMov7u7DW7k ItCjUONUtoQylWhhAPFoCzLpHucufz7EKKozGESbKCfQZ56kD4xyAlI+exGJR8pTZHxnzZ +UNmtDsxRhE2lgFWEao9ohU7W8AgSCDZnPc2E3SJIZubBtOA5BWJbK3ZK/oVcpQInq34px 4fwcQF4QO4yyQHyF2PzK1oTGf5XGfmNQ70EzgPg7HZrrYsYTO0OeHksmPhh44VyySEkxq/ 5rUgHytC/QLjYIRrcO7vUk2b0VmbQQWIC2oEAQzhBxfVHsN0GGWkK1VkNmMFLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767853474; a=rsa-sha256; cv=none; b=gzJzgRLENZLAf1V9H0NNrmyDg9ojYen19ymv7FSzORylgxLoPZLK3tz/CATNO5+kYsSaWa 5+mdTU+HUZMqRui9eZH39rFUzMXKRUJ2Lkybzcue6vYmUCdZ4BUsswWx9WVsarlW3L+Kgv iMxOF5fBkOn77nAXcV8u9VBelFS3fEwo8ZtHdn0AwDGAoaAiNEzc77boyDwBLyF7cWf5A4 bkNoDP9RhsbS3l0LHN+zCSlnrWfhnq9FrSA66pvEBXYf6lO/8Q33V1E36rZAKbodPyxIQn tqfsSeXxdU4eHu9OVstM95lDj9E73/BMxY9+wQbafUfraa61qUHwab+fHeeCjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyB1x2czBTr for ; Thu, 08 Jan 2026 06:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38a0d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 06:24:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ecb1f465836a - main - cam: Start adding dtrace provider 'cam' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecb1f465836a40c7cdcbcfb67d7d23c36b48c1eb Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 06:24:34 +0000 Message-Id: <695f4da2.38a0d.36b08c40@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ecb1f465836a40c7cdcbcfb67d7d23c36b48c1eb commit ecb1f465836a40c7cdcbcfb67d7d23c36b48c1eb Author: Warner Losh AuthorDate: 2026-01-08 06:19:03 +0000 Commit: Warner Losh CommitDate: 2026-01-08 06:19:03 +0000 cam: Start adding dtrace provider 'cam' Start to provide robust tracing in cam now that clang has broken my fbt-based dtrace scripts a couple of times. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54468 --- sys/cam/cam.c | 5 +++++ sys/cam/cam.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/sys/cam/cam.c b/sys/cam/cam.c index 917197542edc..8e70aacba9a9 100644 --- a/sys/cam/cam.c +++ b/sys/cam/cam.c @@ -30,9 +30,13 @@ #include #ifdef _KERNEL +#include "opt_kdtrace.h" + #include #include #include +#include +#include #include #else /* _KERNEL */ #include @@ -55,6 +59,7 @@ FEATURE(scbus, "SCSI devices support"); +SDT_PROVIDER_DEFINE(cam); #endif static int camstatusentrycomp(const void *key, const void *member); diff --git a/sys/cam/cam.h b/sys/cam/cam.h index 83c1fc7b35ca..4d12debdd86f 100644 --- a/sys/cam/cam.h +++ b/sys/cam/cam.h @@ -33,6 +33,9 @@ #ifdef _KERNEL #include "opt_cam.h" +/* Only need the hooks here so no opt_kdtrace.h */ +#include +#include #endif #ifndef _KERNEL @@ -374,6 +377,17 @@ extern const struct cam_status_entry cam_status_table[]; extern const int num_cam_status_entries; #ifdef _KERNEL extern int cam_sort_io_queues; +#ifdef SDT_PROVIDER_DECLARE +SDT_PROVIDER_DECLARE(cam); +#endif +#define CAM_PROBE1(group, probe, arg0) \ + SDT_PROBE1(cam, , group, probe, arg0) +#define CAM_PROBE2(group, probe, arg0, arg1) \ + SDT_PROBE2(cam, , group, probe, arg0, arg1) +#define CAM_PROBE3(group, probe, arg0, arg1, arg2) \ + SDT_PROBE3(cam, , group, probe, arg0, arg1, arg2) +#define CAM_PROBE4(group, probe, arg0, arg1, arg2, arg3) \ + SDT_PROBE4(cam, , group, probe, arg0, arg1, arg2, arg3) #endif union ccb; struct sbuf; From nobody Thu Jan 8 06:24:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyC73Wyz5hsY1 for ; Thu, 08 Jan 2026 06:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmvyC4VrDz3S1R for ; Thu, 08 Jan 2026 06:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JrQGwT3XuOFxY1PXW9kxZjYWb6fQGU3akYAkcsLSAbc=; b=aVQ4byeBt8m/co80i1ooExteBjWmegaZtAjO3OI9QnfCSPsco4G7I+QvpagBGDdjpc0XmM fgO6jLsiBLVMTU1AwAaYK052lsqm0Io1MS0TDQOOUaLjfS0ygjcpnzrfrhF3YrYw/NTSxN 1IQCz6D5lAONachJG30IibfsP7KW0uItwZl+2fhcUNcoAzSEqx3SHS4rnMl6FRDzKdUgJm T0R4Rg8isOz3QtxKuLc2yKSolVhj0jdLvPYcfMwZVBLAAozO2XqRGavFolufAMycNny2S0 fkqyQ3n+50M/4OG5mkDemiYP+8WU+ELCDJ7JGGqEwquvYxfve3LiPAxoJlNm+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JrQGwT3XuOFxY1PXW9kxZjYWb6fQGU3akYAkcsLSAbc=; b=fGLuGdkKkkjJ+4EbD52nQ9NVNTNzL8cfgIXk4lG94jQUTESJhw49ZJ0PML4kxjc2cdI1qf LRFaXCC/yYuzYI/n4wnDfNCOnq4uK8l5GWWt6n2jtFNgZLlRz7VFdyiXLnjXgqGX1PpULl G2QpQgrQHRVrUSsHgly9fnhfsGI7GpLA0yUKFVeN324zstQQ2OJUrprMPDoL1uKbwvr8ON qCDMcrQz3g4Lunmm8RvpAaqihTa3o82J2t5Te8+AoWxxHPLi1/945BLNUDJKBFUMrvsH6g 0uC+wYIiF/gENDHOw4zXGm0VbEsQ4ubC5fWbywY39OtM7aQAug5Fok6aQ2t80Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767853475; a=rsa-sha256; cv=none; b=P8teEc14lRC2ZEq3/q9Sgtr9VfX1lgrGkjmXqc+Iex4SpFw9Bz9csQuaTeGsVVkh9BigxV vSunZMGGb4YakQR8GzmcnNoLKGDIjglwycwZgdei2VYowHUxIdqS11jjGQFt9/pnVc327p KCYKlOZITp7/ZRN31O+G5dtfM0m3RHxejWYk3C9Hp3osp44q9uzut6YjJBoq56ZLkP+0b8 ptVdMzn6EyNPtDiP6oEmgWkSngDJM2mZVyOSVHs+MnV/5WqOHuJgsJRt+KHrKHXtUk+5JD gORCknY+BtNFifr2zRCByyUF4F8fDnaYq0o8KwIHSA3oQsEj3/e6edYCTfYykw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyC2jdSzBTs for ; Thu, 08 Jan 2026 06:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38816 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 06:24:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1a7151f79664 - main - cam: Add probes for xpt actions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a7151f79664644b2e7c8e69427be8b846e9c1a4 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 06:24:35 +0000 Message-Id: <695f4da3.38816.50c8100@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1a7151f79664644b2e7c8e69427be8b846e9c1a4 commit 1a7151f79664644b2e7c8e69427be8b846e9c1a4 Author: Warner Losh AuthorDate: 2026-01-08 06:19:10 +0000 Commit: Warner Losh CommitDate: 2026-01-08 06:19:10 +0000 cam: Add probes for xpt actions cam::xpt:action(union ccb *) cam::xpt:done((union ccb *) cam::xpt:async-cb(void *cbarg, uint32_t async_code, struct cam_path *path, void *async_arg); Called when xpt_action(), xpt_done*() and the xpt async callbacks are called. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54469 --- share/man/man4/Makefile | 1 + share/man/man4/dtrace_cam.4 | 42 ++++++++++++++++++++++++++++++++++++++++++ sys/cam/cam_xpt.c | 22 +++++++++++++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 5ee6eedd89ee..23bb8495975b 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1009,6 +1009,7 @@ _ccd.4= ccd.4 .if ${MK_CDDL} != "no" _dtrace_provs= dtrace_audit.4 \ dtrace_callout_execute.4 \ + dtrace_cam.4 \ dtrace_dtrace.4 \ dtrace_fbt.4 \ dtrace_io.4 \ diff --git a/share/man/man4/dtrace_cam.4 b/share/man/man4/dtrace_cam.4 new file mode 100644 index 000000000000..e5b7ae34c391 --- /dev/null +++ b/share/man/man4/dtrace_cam.4 @@ -0,0 +1,42 @@ +.\" Copyright (c) 2026 Netflix, Inc +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd December 26, 2025 +.Dt DTRACE_CAM 4 +.Os +.Sh NAME +.Nm dtrace_cam +.Nd a DTrace provider for tracing events related to CAM +.Sh SYNOPSIS +.Fn cam::xpt:action "union ccb *ccn" +.Fn cam::xpt:done "union ccb *ccb" +.Fn cam::xpt:async-cb "void *cbarg" "uint32_t async_code" "struct cam_path *path" "void *async_Arg" +.Sh DESCRIPTION +The +.Nm cam +provider allows the tracing of CAM events. +The +.Fn cam::xpt_action +probe fires when a CAM Control Block (ccb) is submitted to a CAM SIM driver. +The +.Fn cam::xpt:done +probe fires when that request completes. +The +.Fn cam::xpt:async-cb +probe fires just before an async callback is called. +.Sh ARGUMENTS +.Sh FILES +.Sh EXAMPLES +.Sh SEE ALSO +.Xr dtrace 1 , +.Xr SDT 9 +.Sh HISTORY +The +.Nm cam +provider first appeared in +.Fx +15.1 and 16.0. +.Sh AUTHORS +This manual page was written by +.An Warner Losh Aq Mt imp@FreeBSD.org . diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index ecf06045ed90..8b42fb2ca6c5 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -70,6 +70,12 @@ #include +/* SDT Probes */ +SDT_PROBE_DEFINE1(cam, , xpt, action, "union ccb *"); +SDT_PROBE_DEFINE1(cam, , xpt, done, "union ccb *"); +SDT_PROBE_DEFINE4(cam, , xpt, async__cb, "void *", "uint32_t", + "struct cam_path *", "void *"); + /* Wild guess based on not wanting to grow the stack too much */ #define XPT_PRINT_MAXLEN 512 #ifdef PRINTF_BUFR_SIZE @@ -2479,6 +2485,8 @@ xptsetasyncfunc(struct cam_ed *device, void *arg) device->target->target_id, device->lun_id); xpt_gdev_type(&cgd, &path); + CAM_PROBE4(xpt, async__cb, csa->callback_arg, + AC_FOUND_DEVICE, &path, &cgd); csa->callback(csa->callback_arg, AC_FOUND_DEVICE, &path, &cgd); @@ -2500,6 +2508,8 @@ xptsetasyncbusfunc(struct cam_eb *bus, void *arg) CAM_LUN_WILDCARD); xpt_path_lock(&path); xpt_path_inq(&cpi, &path); + CAM_PROBE4(xpt, async__cb, csa->callback_arg, + AC_PATH_REGISTERED, &path, &cpi); csa->callback(csa->callback_arg, AC_PATH_REGISTERED, &path, &cpi); @@ -2526,6 +2536,7 @@ xpt_action(union ccb *start_ccb) start_ccb->ccb_h.pinfo.priority != CAM_PRIORITY_NONE, ("%s: queued ccb and CAM_PRIORITY_NONE illegal.", __func__)); + CAM_PROBE1(xpt, action, start_ccb); start_ccb->ccb_h.status = CAM_REQ_INPROG; (*(start_ccb->ccb_h.path->bus->xport->ops->action))(start_ccb); } @@ -4260,6 +4271,8 @@ xpt_async_bcast(struct async_list *async_head, path->device->sim->mtx : NULL; if (mtx) mtx_lock(mtx); + CAM_PROBE4(xpt, async__cb, cur_entry->callback_arg, + async_code, path, async_arg); cur_entry->callback(cur_entry->callback_arg, async_code, path, async_arg); @@ -4499,8 +4512,10 @@ xpt_done(union ccb *done_ccb) done_ccb->ccb_h.func_code, xpt_action_name(done_ccb->ccb_h.func_code), done_ccb->ccb_h.status)); - if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) == 0) + if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) == 0) { + CAM_PROBE1(xpt, done, done_ccb); return; + } /* Store the time the ccb was in the sim */ done_ccb->ccb_h.qos.periph_data = cam_iosched_delta_t(done_ccb->ccb_h.qos.periph_data); @@ -5376,6 +5391,11 @@ xpt_done_process(struct ccb_hdr *ccb_h) } } + /* + * Call as late as possible. Do we want an early one too before the + * unfreeze / releases above? + */ + CAM_PROBE1(xpt, done, (union ccb *)ccb_h); /* container_of? */ /* Call the peripheral driver's callback */ ccb_h->pinfo.index = CAM_UNQUEUED_INDEX; (*ccb_h->cbfcnp)(ccb_h->path->periph, (union ccb *)ccb_h); From nobody Thu Jan 8 06:24:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyG0Bc1z5hsY5 for ; Thu, 08 Jan 2026 06:24: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmvyF4TM4z3Rvv for ; Thu, 08 Jan 2026 06:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WIMxoiW5k3JKTARX5u1vpEb0f+YdHaNthez5PjaW6jU=; b=OhKeYHKhUZ0So6vQUrHgQduo1XEm04SUKb66QXj52Phjvfugn6tq214XmcUMfPesbrts/l E2jP0EXzMfxi1HDDrL0kBfwKayFxUwX9ufy79PPM4T8wvfWb+q2Jj07+8RbPyrx46gI5h4 /CnFXdkac9yTzWJiA4Lr2oGFkgaSc0omWEvx357Q5HEaHEZ+IKT/K9hgrYEAES40QUOPEO J13qj51MCCU+cfLwk4k41A3j8yREBhj7qX21A7yRUz0L+Ec1bdQQKEG+fyq9IkQRzF1kJd UxvVYiP0fOY0HJsZuyFCcccm4KABump9poxOjJd40364rLn6xJ0adesefprgbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WIMxoiW5k3JKTARX5u1vpEb0f+YdHaNthez5PjaW6jU=; b=nwbl2Y/pxJtltxKCvB5ACQDeS5sSUZNEg5qJVk+pKgUUuqrxYf0w+1PTsNgS+WYlAmnxib o75tXAwAiNgsyoYc9/Z2zyJCjNaKoMgjAvP4RLx0LTzGfz7vqWY3PCxkchNi0DS9FBbVi6 dvshaD7ABrbC5MZE0NLAHsKR5Y2Vp9+HiK/drroNln+LBUWPonMei+lRTS8dDpC+4B1NJG 9zTxAbPggB1SoOdZg7PfkOW8MZQreuZavP7cnsxwdtTOTtiLrzBGjpoOOlBGsF0CXI/5tB boOCPfEzJNOzaAQ8LewViC7uVE+nAXi+5HtTXuRdp6ZYEvBhToOzc5nLYxoVmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767853477; a=rsa-sha256; cv=none; b=VjS0QcAGgr28sNiSONdbkA36RkkKJi+qlzSqalIxInbIZkU0ynCdeYIgMZFeUmDlDpYo2f mGuDxgRdjh9v0XDGZjCsXtxf52QmKweVUV/HbZtSebFVBEgIle4j9SxkhN57VMIuyGj4VC PPHc4QKvU+9bepb2i+/zq+sJtWp/HIdvKJ0gfKCp2fkw5pzIGtj7rT6JutEJFPHlkIJUh+ Zc5heZbjSLU2VyDT6gyeA844iGlQqFrFnUZsLBniDy7aBa6Z4RyiF79SYbKKv66mKsZENn DTAy9Fo18wbTKP6iTinlIAIbMofCqARQCfZzk7YE5G7dZSypcGJsh29ERSc/Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyF3vCdzBnc for ; Thu, 08 Jan 2026 06:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 379ca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 06:24:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: efb77950fdd6 - main - dtrace: Add definitiosn for the cam dtrace provider List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: efb77950fdd6fb03dc172a44b3875948609b7804 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 06:24:37 +0000 Message-Id: <695f4da5.379ca.1c69d131@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=efb77950fdd6fb03dc172a44b3875948609b7804 commit efb77950fdd6fb03dc172a44b3875948609b7804 Author: Warner Losh AuthorDate: 2026-01-08 06:20:28 +0000 Commit: Warner Losh CommitDate: 2026-01-08 06:20:28 +0000 dtrace: Add definitiosn for the cam dtrace provider Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54471 --- cddl/lib/libdtrace/Makefile | 3 +- cddl/lib/libdtrace/cam.d | 194 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+), 1 deletion(-) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 0742d0b5cd5a..fbc6d5fbbec2 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -51,7 +51,8 @@ SRCS= dt_aggregate.c \ dt_xlator.c \ gmatch.c -DSRCS= errno.d \ +DSRCS= cam.d \ + errno.d \ io.d \ ip.d \ psinfo.d \ diff --git a/cddl/lib/libdtrace/cam.d b/cddl/lib/libdtrace/cam.d new file mode 100644 index 000000000000..b31661b0ff42 --- /dev/null +++ b/cddl/lib/libdtrace/cam.d @@ -0,0 +1,194 @@ +/*- + * Copyrtight (c) 2026 Netflix, Inc + * + * SPDX-License-Expression: BSD-2-Clause + */ + +inline string xpt_action_string[int key] = + key == 0 ? "XPT_NOOP" : + key == 1 ? "XPT_SCSI_IO" : + key == 2 ? "XPT_GDEV_TYPE" : + key == 3 ? "XPT_GDEVLIST" : + key == 4 ? "XPT_PATH_INQ" : + key == 5 ? "XPT_REL_SIMQ" : + key == 6 ? "XPT_SASYNC_CB" : + key == 7 ? "XPT_SDEV_TYPE" : + key == 8 ? "XPT_SCAN_BUS" : + key == 9 ? "XPT_DEV_MATCH" : + key == 10 ? "XPT_DEBUG" : + key == 11 ? "XPT_PATH_STATS" : + key == 12 ? "XPT_GDEV_STATS" : + key == 13 ? "XPT_0X0d" : + key == 14 ? "XPT_DEV_ADVINFO" : + key == 15 ? "XPT_ASYNC" : + key == 16 ? "XPT_ABORT" : + key == 17 ? "XPT_RESET_BUS" : + key == 18 ? "XPT_RESET_DEV" : + key == 19 ? "XPT_TERM_IO" : + key == 20 ? "XPT_SCAN_LUN" : + key == 21 ? "XPT_GET_TRAN_SETTINGS" : + key == 22 ? "XPT_SET_TRAN_SETTINGS" : + key == 23 ? "XPT_CALC_GEOMETRY" : + key == 24 ? "XPT_ATA_IO" : + key == 25 ? "XPT_SET_SIM_KNOB" : + key == 26 ? "XPT_GET_SIM_KNOB" : + key == 27 ? "XPT_SMP_IO" : + key == 28 ? "XPT_NVME_IO" : + key == 29 ? "XPT_MMC_IO" : + key == 30 ? "XPT_SCAN_TGT" : + key == 31 ? "XPT_NVME_ADMIN" : + "Too big" ; + +inline string xpt_async_string[int key] = + key == 0x1 ? "AC_BUS_RESET" : + key == 0x2 ? "AC_UNSOL_RESEL" : + key == 0x4 ? "AC_0x4" : + key == 0x8 ? "AC_SENT_AEN" : + key == 0x10 ? "AC_SENT_BDR" : + key == 0x20 ? "AC_PATH_REGISTERED" : + key == 0x40 ? "AC_PATH_DEREGISTERED" : + key == 0x80 ? "AC_FOUND_DEVICE" : + key == 0x100 ? "AC_LOST_DEVICE" : + key == 0x200 ? "AC_TRANSFER_NEG" : + key == 0x400 ? "AC_INQ_CHANGED" : + key == 0x800 ? "AC_GETDEV_CHANGED" : + key == 0x1000 ? "AC_CONTRACT" : + key == 0x2000 ? "AC_ADVINFO_CHANGED" : + key == 0x4000 ? "AC_UNIT_ATTENTION" : + "AC UNKNOWN"; + + +inline int CAM_CDB_POINTER = 1; + +inline int XPT_OP_MASK = 0xff; +inline int XPT_NOOP = 0x00; +inline int XPT_SCSI_IO = 0x01; +inline int XPT_GDEV_TYPE = 0x02; +inline int XPT_GDEVLIST = 0x03; +inline int XPT_PATH_INQ = 0x04; +inline int XPT_REL_SIMQ = 0x05; +inline int XPT_SASYNC_CB = 0x06; +inline int XPT_SDEV_TYPE = 0x07; +inline int XPT_SCAN_BUS = 0x08; +inline int XPT_DEV_MATCH = 0x09; +inline int XPT_DEBUG = 0x0a; +inline int XPT_PATH_STATS = 0x0b; +inline int XPT_GDEV_STATS = 0x0c; +inline int XPT_DEV_ADVINFO = 0x0e; +inline int XPT_ASYNC = 0x0f; +inline int XPT_ABORT = 0x10; +inline int XPT_RESET_BUS = 0x11; +inline int XPT_RESET_DEV = 0x12; +inline int XPT_TERM_IO = 0x13; +inline int XPT_SCAN_LUN = 0x14; +inline int XPT_GET_TRAN_SETTINGS = 0x15; +inline int XPT_SET_TRAN_SETTINGS = 0x16; +inline int XPT_CALC_GEOMETRY = 0x17; +inline int XPT_ATA_IO = 0x18; +inline int XPT_SET_SIM_KNOB = 0x19; +inline int XPT_GET_SIM_KNOB = 0x1a; +inline int XPT_SMP_IO = 0x1b; +inline int XPT_NVME_IO = 0x1c; +inline int XPT_MMC_IO = 0x1c; +inline int XPT_SCAN_TGT = 0x1e; +inline int XPT_NVME_ADMIN = 0x1f; +inline int XPT_ENG_INQ = 0x20; +inline int XPT_ENG_EXEC = 0x21; +inline int XPT_EN_LUN = 0x30; +inline int XPT_TARGET_IO = 0x31; +inline int XPT_ACCEPT_TARGET_IO = 0x32; +inline int XPT_CONT_TARGET_IO = 0x33; +inline int XPT_IMMED_NOTIFY = 0x34; +inline int XPT_NOTIFY_ACK = 0x35; +inline int XPT_IMMEDIATE_NOTIFY = 0x36; +inline int XPT_NOTIFY_ACKNOWLEDGE = 0x37; +inline int XPT_REPROBE_LUN = 0x38; +inline int XPT_MMC_SET_TRAN_SETTINGS = 0x40; +inline int XPT_MMC_GET_TRAN_SETTINGS = 0x41; + +inline int XPT_FC_QUEUED = 0x100; +inline int XPT_FC_USER_CCB = 0x200; +inline int XPT_FC_XPT_ONLY = 0x400; +inline int XPT_FC_DEV_QUEUED = 0x800; + +inline int PROTO_UNKNOWN = 0; +inline int PROTO_UNSPECIFIED = 1; +inline int PROTO_SCSI = 2; +inline int PROTO_ATA = 3; +inline int PROTO_ATAPI = 4; +inline int PROTO_SATAPM = 5; +inline int PROTO_SEMB = 6; +inline int PROTO_NVME = 7; +inline int PROTO_MMCSD = 8; + +inline int XPORT_UNKNOWN = 0; +inline int XPORT_UNSPECIFIED = 1; +inline int XPORT_SPI = 2; +inline int XPORT_FC = 3; +inline int XPORT_SSA = 4; +inline int XPORT_USB = 5; +inline int XPORT_PPB = 6; +inline int XPORT_ATA = 7; +inline int XPORT_SAS = 8; +inline int XPORT_SATA = 9; +inline int XPORT_ISCSI = 10; +inline int XPORT_SRP = 11; +inline int XPORT_NVME = 12; +inline int XPORT_MMCSD = 13; +inline int XPORT_NVMF = 14; +inline int XPORT_UFSHCI = 15; + +inline int CAM_REQ_INPROG = 0x00; +inline int CAM_REQ_CMP = 0x01; +inline int CAM_REQ_ABORTED = 0x02; +inline int CAM_UA_ABORT = 0x03; +inline int CAM_REQ_CMP_ERR = 0x04; +inline int CAM_BUSY = 0x05; +inline int CAM_REQ_INVALID = 0x06; +inline int CAM_PATH_INVALID = 0x07; +inline int CAM_DEV_NOT_THERE = 0x08; +inline int CAM_UA_TERMIO = 0x09; +inline int CAM_SEL_TIMEOUT = 0x0a; +inline int CAM_CMD_TIMEOUT = 0x0b; +inline int CAM_SCSI_STATUS_ERROR = 0x0c; +inline int CAM_MSG_REJECT_REC = 0x0d; +inline int CAM_SCSI_BUS_RESET = 0x0e; +inline int CAM_UNCOR_PARITY = 0x0f; +inline int CAM_AUTOSENSE_FAIL = 0x10; +inline int CAM_NO_HBA = 0x11; +inline int CAM_DATA_RUN_ERR = 0x12; +inline int CAM_UNEXP_BUSFREE = 0x13; +inline int CAM_SEQUENCE_FAIL = 0x14; +inline int CAM_CCB_LEN_ERR = 0x15; +inline int CAM_PROVIDE_FAIL = 0x16; +inline int CAM_BDR_SENT = 0x17; +inline int CAM_REQ_TERMIO = 0x18; +inline int CAM_UNREC_HBA_ERROR = 0x19; +inline int CAM_REQ_TOO_BIG = 0x1a; +inline int CAM_REQUEUE_REQ = 0x1b; +inline int CAM_ATA_STATUS_ERROR = 0x1c; +inline int CAM_SCSI_IT_NEXUS_LOST = 0x1d; +inline int CAM_SMP_STATUS_ERROR = 0x1e; +inline int CAM_REQ_SOFTTIMEOUT = 0x1f; +inline int CAM_NVME_STATUS_ERROR = 0x20; +inline int CAM_IDE = 0x33; +inline int CAM_RESRC_UNAVAIL = 0x34; +inline int CAM_UNACKED_EVENT = 0x35; +inline int CAM_MESSAGE_RECV = 0x36; +inline int CAM_INVALID_CDB = 0x37; +inline int CAM_LUN_INVALID = 0x38; +inline int CAM_TID_INVALID = 0x39; +inline int CAM_FUNC_NOTAVAIL = 0x3a; +inline int CAM_NO_NEXUS = 0x3b; +inline int CAM_IID_INVALID = 0x3c; +inline int CAM_CDB_RECVD = 0x3d; +inline int CAM_LUN_ALRDY_ENA = 0x3e; +inline int CAM_SCSI_BUSY = 0x3f; + +inline int CAM_DEV_QFRZN = 0x40; +inline int CAM_AUTOSNS_VALID = 0x80; +inline int CAM_RELEASE_SIMQ = 0x100; +inline int CAM_SIM_QUEUED = 0x200; +inline int CAM_QOS_VALID = 0x400; +inline int CAM_STATUS_MASK = 0x3F; +inline int CAM_SENT_SENSE = 0x40000000; From nobody Thu Jan 8 06:24:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyF3hw9z5hsfV for ; Thu, 08 Jan 2026 06:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmvyD5cVKz3SCV for ; Thu, 08 Jan 2026 06:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SHtjX05Mgin1bg7VmlENpy3lCiWnUxzeroKglIsTals=; b=fi86m71xX/aWkNbnCuYlamtqoonTL9r+0Xk2bj2HOUPTSEJe8+xDz44UJi8xXeVPYCt/5w 4FoBI117SnTCGPIz+xClzZwufSgy1Xp0HMjCe1hxB9Zem0N4GwyHrT2GYeoqcN6QiPCqte vx7cqPXBZDzY7toeoeGLmWJxQSZ3p9fx0VO7e1dVkgl3K6NBSbQBnw7AyrwxEMJKktSpYx 3VU7Pmc7sg0RoN1N5YWYjhm8QVukPGBlCZHBT18VNnsudMuXS0g61gJK+auHGTJX8Ahmrr pqBBjypHA+XKCfwQf0/sIX+4d/KfnextdxOMXm723AgY0zgCBZlHIoPB7CGQcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SHtjX05Mgin1bg7VmlENpy3lCiWnUxzeroKglIsTals=; b=hnAJS3W815LMA32IotcdRJc6/4/mThHDzXSwYDcJsmHJ4JzZmE+ydsWM0HtWzb5RNYvfi0 eRb+/TlitKkukDgwT/BgP+n6nZP2sG6gOyuRwlfK04DkrOiB83DT67QKJQG3+4TWkrj4bd b/RbA+q3B3nME6iKdl9WlScw2QcCRnC339YzqexPJ0JAlcUMfk7MIh3BlTQev2FMMGwhVc LYHpQKS/3FFWmmp4UrVVTfGOtPXaDQJdXpGpqFBH6Ik1CWxVTLUDT8My94uxPfzH6cv0/a cWSLFFit6ie7aRgbHtTvpnbWrrWrRNUCLSg9oVP7NsaPVE3cEZqCFpM0ltodXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767853476; a=rsa-sha256; cv=none; b=QyTec90UUL92u2zAIAhnjEGcv5fu11RXrX4ePaus70RSlnUR/z7o4DPfecPu6K9wAGYua9 tVRZ3GDW5ChrIPl44z9kaVx5PGO6zuBd3G9RGHoQdnU7EIkzwFujAU7EMwKHxzrlWfgt/j 7fkQY37Mz2BshwR0cNmR5XKVO8hzRrhfNDlrWuBRxM35cgSeiKwUpKHUGp2G3DDtfM5HyC 8UvQbVkEpoygEy/zpSKY9Q+9S+KS27mzpI8AbaHqYvWr8zc8+oMm97edSzZ37cSm0Royz4 updVNkjvkcwUvxc1MlvgI1M3z4JWuDm4/Nv+Lnli3jB3Cu0Yh0DdEOWDqmPmHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyD36jXzBrj for ; Thu, 08 Jan 2026 06:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38be1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 06:24:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aaec2a90b5ce - main - cam: When inq data isn't valid, pass NULL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aaec2a90b5cecd38520ecb0ffa23f116d36933f3 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 06:24:36 +0000 Message-Id: <695f4da4.38be1.3f82b91@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aaec2a90b5cecd38520ecb0ffa23f116d36933f3 commit aaec2a90b5cecd38520ecb0ffa23f116d36933f3 Author: Warner Losh AuthorDate: 2026-01-08 06:19:21 +0000 Commit: Warner Losh CommitDate: 2026-01-08 06:19:21 +0000 cam: When inq data isn't valid, pass NULL When the device isn't there, we don't have valid inq data. Pass NULL in this case. All the routines that receive this test against NULL already. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54470 --- sys/cam/scsi/scsi_all.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 4ea2ab7d4acd..d8bba97e79bc 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -3711,13 +3711,12 @@ scsi_command_string(struct cam_device *device, struct ccb_scsiio *csio, xpt_gdev_type(cgd, csio->ccb_h.path); /* - * If the device is unconfigured, just pretend that it is a hard - * drive. scsi_op_desc() needs this. + * If the device is unconfigured, the inq data is invalid. */ if (cgd->ccb_h.status == CAM_DEV_NOT_THERE) - cgd->inq_data.device = T_DIRECT; - - inq_data = &cgd->inq_data; + inq_data = NULL; + else + inq_data = &cgd->inq_data; #else /* !_KERNEL */ @@ -5170,13 +5169,12 @@ scsi_sense_sbuf(struct cam_device *device, struct ccb_scsiio *csio, xpt_gdev_type(cgd, csio->ccb_h.path); /* - * If the device is unconfigured, just pretend that it is a hard - * drive. scsi_op_desc() needs this. + * If the device is unconfigured, the inq data is invalid. */ if (cgd->ccb_h.status == CAM_DEV_NOT_THERE) - cgd->inq_data.device = T_DIRECT; - - inq_data = &cgd->inq_data; + inq_data = NULL; + else + inq_data = &cgd->inq_data; #else /* !_KERNEL */ From nobody Thu Jan 8 06:24:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyH0z4bz5hsx9 for ; Thu, 08 Jan 2026 06:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmvyG5gysz3SD0 for ; Thu, 08 Jan 2026 06:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXB9mlbRui4SOaTaQ8i3IcIbHUyvlPFce69NxQIj7Gw=; b=Bc1JjbUHh06U81zcOqklP1EI1rgSVczqmutey97apZSOIlOzOvRQa28k2sxu9JsKKeZ49c kSNVW0qdYB3mXc6sA9/usHgqfgSWcMsQF+GzfBNeZMteNvIQiNZe+ynS/VqP3eVJGDKSpB BotIclMiomh/xB81FFCNGiMDSXzMundKKTpb8ECSdsfmoGbcW4coVAmC5XIkRyiORy2DgU 1xBlPCxh75aXr/CN6N0Gk0mq/0Ys4aemss+9pfYordQiQZiOZcigNlk58juMA99ZnA7tOj qkhTemsKIr0T+lJ20x7tlzZj6rwLVFfhiYmJ64ZH5eoehDcJW3z/2molapPS0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXB9mlbRui4SOaTaQ8i3IcIbHUyvlPFce69NxQIj7Gw=; b=VyLgHhQ/okGnlbmzvp0CcVr0WE85dlWlxKqlS323jMWKpp/XgM/4j3cBv/Nimw/Oy+C2d9 1KVC9aXlWwU0jAX6P8HQ4pA4+ZlGOtEWSNw/+oQAFM2k2WSRAJmagxibYTYVrLqG1EFvZN 9jiG3ZtO7yMw8sG8oI8kSwTd7GU8iA3HMavfzC11k5+gfQ7HJuFEiK0cm1AVIbfANZkOiN HPb5n/DmMdyGJJtZEo+Ywj3+oZjCjnvCp/75mjyU3kbyYGN24RZzKzb6pPcF2oGQp2DMKn NDo35KwI81vevFpSQzd75z5kA2cDQzc65+sG9N53I67OVpMeLrLPivMp+I8clw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767853478; a=rsa-sha256; cv=none; b=Gmv5TdsPeYnUOgtap6Jt7yvCe1Z6ZyGEXMWbrZZPidnD1qDjKTXRkmlSreg8oG28aC+ORC 0mfsV0uNsV8fMceMWWW8hB8P44gPElKMMGv5b+K+Y1K8FJAs4TwZFpNG5NoKW3+wjn6DYR G3V119IrJUfxzrSG9qMInkoohLtW2FNpASCAGfn0MEmeCH52ITA9C7L+8V6M/i5sLHuzgx CdZc8e2TRNb0iwknHrn66aBOF1WGXFl5Lthsz7oP6afKd6+3KScXH9CcVh7putZxjur62L eFGFUNScbOpTngPe6jGUa8X2wYjGEF20xOoGnABxbclZhSde1syCL9zkptQ+JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyG4fyXzBNP for ; Thu, 08 Jan 2026 06:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36269 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 06:24:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cd1aa5f9917c - main - tools/cam: Start to add the testing tools for CAM List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd1aa5f9917cc7de255e854954c818e5ef3e9c9b Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 06:24:38 +0000 Message-Id: <695f4da6.36269.3bd4f8ad@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cd1aa5f9917cc7de255e854954c818e5ef3e9c9b commit cd1aa5f9917cc7de255e854954c818e5ef3e9c9b Author: Warner Losh AuthorDate: 2026-01-08 06:20:34 +0000 Commit: Warner Losh CommitDate: 2026-01-08 06:20:34 +0000 tools/cam: Start to add the testing tools for CAM Create a directory for testing tools arond CAM. These are snippets of what will eventually be camio. At the moment, it was written using fbt traces. This is OK, but fragile, so they need to be re-written with the cam provider. cam_all_but_scsi.d is the first step. It shows how to do this with the new cam dtrace provider. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54472 --- tools/cam/README | 9 +++++ tools/cam/cam_all_but_scsi.d | 89 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/tools/cam/README b/tools/cam/README new file mode 100644 index 000000000000..fd93ccd15e1f --- /dev/null +++ b/tools/cam/README @@ -0,0 +1,9 @@ +This directory has snippets of what will eventually become camio. This program +can take an expression for the types of things to trace, and then custom write a +dtrace script to do that. + +camio is a d-traced tcpdump-like program for examining CAM traffic (and +therefore I/O and other traffic to storage media) that written during covid, but +with fbp providers that recent clang optimizations make unuseable, hence the +shift to the cam provider, but retooling them and finishing the grammar will +take some time (but these scripts are useful today). diff --git a/tools/cam/cam_all_but_scsi.d b/tools/cam/cam_all_but_scsi.d new file mode 100644 index 000000000000..a20d7fa0cba9 --- /dev/null +++ b/tools/cam/cam_all_but_scsi.d @@ -0,0 +1,89 @@ +#!/usr/sbin/dtrace -s + +/* Sample use of the cam dtrace provider */ + +/* + * Trace all the non I/O commands flowing through CAM + */ + +dtrace:::BEGIN +{ +} + +/* + * There's two choke points in CAM. We can intercept the request on the way down + * in xpt_action, just before it's sent to the SIM. This can be a good place to + * see what's going on before it happens. However, most I/O happens quite + * quickly, this isn't much of an advantage. The other place is on completion + * when the transaction is finally done. The retry mechanism is built into the + * periph driver, which is responsible for submitting the request. + * + * cam::xpt_action is a single logical point that handles both xpt_action and + * xpt_action_direct. Thie example hooks into it. The style is funky because + * D doesn't have looping or generalized if constructs. + * + * The 'trace' context local variable controls printing of different types + * of results. This is all controlled by camio.lua. + */ + + +/* + * CAM queues a CCB to the SIM in xpt_action. Save interesting bits + * for later winnowing. + */ +/* fbt::xpt_action_default:entry */ +cam::xpt:action +{ + this->ccb = ((union ccb *)arg0); + this->func = this->ccb->ccb_h.func_code & 0xff; + this->periph = this->ccb->ccb_h.path->periph; + this->bus = this->ccb->ccb_h.path->bus; + this->target = this->ccb->ccb_h.path->target; + this->device = this->ccb->ccb_h.path->device; + this->trace = 1; +} + +/* + * Omit the I/O CCBs. Go ahead and pass the other semi I/O enclosure + * commands, though. + */ +cam::xpt:action +/this->func == XPT_SCSI_IO || this->func == XPT_NVME_IO || this->func == XPT_NVME_ADMIN || this->func == XPT_ATA_IO/ +{ + this->trace = 0; +} + +/* + * Print out the non I/O and non ASYNC commands here. + */ +cam::xpt:action +/this->trace && this->func != XPT_ASYNC/ +{ + printf("(%s%d:%s%d:%d:%d:%d): %s", + this->periph == NULL ? "noperiph" : stringof(this->periph->periph_name), + this->periph == NULL ? 0 : this->periph->unit_number, + this->bus == NULL ? "nobus" : this->bus->sim->sim_name, + this->bus == NULL ? 0 : this->bus->sim->unit_number, + this->bus == NULL ? 0 : this->bus->sim->bus_id, + this->target == NULL ? 0 : this->target->target_id, + this->device == NULL ? 0 : this->device->lun_id, + xpt_action_string[this->func]); +} + +/* + * For async calls, print out the async message type. + */ +cam::xpt:action +/this->trace && this->func == XPT_ASYNC/ +{ + printf("(%s%d:%s%d:%d:%d:%d): %s %s", + this->periph == NULL ? "noperiph" : stringof(this->periph->periph_name), + this->periph == NULL ? 0 : this->periph->unit_number, + this->bus == NULL ? "nobus" : this->bus->sim->sim_name, + this->bus == NULL ? 0 : this->bus->sim->unit_number, + this->bus == NULL ? 0 : this->bus->sim->bus_id, + this->target == NULL ? 0 : this->target->target_id, + this->device == NULL ? 0 : this->device->lun_id, + xpt_action_string[this->func], + xpt_async_string[this->ccb->casync.async_code]); +} From nobody Thu Jan 8 08:52:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmzDS01JYz62b0H for ; Thu, 08 Jan 2026 08:52: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmzDR6FXGz3hnk for ; Thu, 08 Jan 2026 08:52:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HeCaxEtBOJZx12CBrkVxS9rNKYzWXrIuWIyYVghqx+8=; b=nrPtKp/+CxFRlHnUvj+k6tG7wkCA50SqZDMgbcUMkwFWyn22oVrKPeHerMdgOYRS271Pdb pLDG08t8UctAFUTg/1grMx0g3NugDK314sl2CuAjbWu3TW8+GAE0VA17cb//5ecE5k1VM7 3ac1B5I833NzYQfGF6qAME8Te2N3gkqGCo6nE4xdjXIEfKzI33eIbtOtHDB+LmB57yk3wz 9tgpmZDDVqfWlJhr0vuJB1v6eqLHzSQeGYsVAmMLa3hUxs6wm3b7dfRrzGw/HJOfqbDiZ5 h+OuNwDwus+g3pgr7DrtFwRV8X8REIh+AAZXLXPVN7/ySyk8I1/1gWlndU7tew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HeCaxEtBOJZx12CBrkVxS9rNKYzWXrIuWIyYVghqx+8=; b=FYOdzhVk6LOVaDvq0S6+Dwtmc1+4boMp7WqL1l+M5KNmzSWTZBQYM5YXYWbaYTVuD3gWVD ZhaX0WlOZBECxRcDBZ9qjZEbsNy6pmlCn/xBJtw1zDLexTd/g3J7kVZ/xXb0x+rJuS5R4M RM5sWfsKYhO03St9w0myaLkx+dATqzmCLnUeK4h3iCwlBehXrgC/zQBODFjbJbO/SNIcas EiZSj88h7z2Lb4g+QxN0euS+OrIm7ftm9ge0vbRCD3/LCo4KQ8qLrALDCgWhJUPr74dQHR LERXXJejBl9G8Ln/xFOxJ6qXTwdYSdKmGvdmEaDKFoiN5qS3Vvfs9uX4VRIllg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767862327; a=rsa-sha256; cv=none; b=nrpx1E1EyTpLeZxir7XkPrB+vWe6mp56tf5GukroH31iDw3oRISPFLBpVCyCKbM9sg7IxM X3R3FGHCTP6TqfV1BnqonP7DkLReNzT0d6PCCoYQdr3XDdhICqZQKt/6ssUL2pZrtGe041 fF4KgVc/6hiiX94cK7zrHRydbrI59DwIF1U+YQS9vt15enS1tKwAi+4pbM9nSHx+aqAfPV qJqxIST4vUA1L/xCi7OD/f4Pu0Ye5f7SbZomETnJojpuVTsxAofqqfcjnmP39R7X+j93rt TiyW7/dOE4fMHo2HvqNE8LByfhVWMQPYkWEvvtTN+tJAYv+/8KXT0YTji4DDaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmzDR5n10zXZp for ; Thu, 08 Jan 2026 08:52:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ef9a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 08:52:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: eb1b6ec7a79a - main - zfs: emit .note.GNU-stack section for all ELF targets List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb1b6ec7a79aff05f5f10e1d6b1c63a0d8dc5f2f Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 08:52:07 +0000 Message-Id: <695f7037.ef9a.6211cd34@gitrepo.freebsd.org> The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=eb1b6ec7a79aff05f5f10e1d6b1c63a0d8dc5f2f commit eb1b6ec7a79aff05f5f10e1d6b1c63a0d8dc5f2f Author: Dimitry Andric AuthorDate: 2026-01-08 08:35:13 +0000 Commit: Dimitry Andric CommitDate: 2026-01-08 08:51:36 +0000 zfs: emit .note.GNU-stack section for all ELF targets On FreeBSD, linking the zfs kernel module with binutils ld 2.44 shows the following warning: ld: warning: aesni-gcm-avx2-vaes.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker Some of the `.S` files under `module/icp/asm-x86_64/modes` check whether to emit the `.note.GNU-stack` section using: #if defined(__linux__) && defined(__ELF__) We could add `&& defined(__FreeBSD__)` to the test, but since all other `.S` files in the OpenZFS tree use: #ifdef __ELF__ it would seem more logical to use that instead. Any recent ELF platform should support these note sections by now. Reviewed by: emaste, kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54578 --- sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S | 2 +- sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S | 2 +- sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S index 3d1b045127e2..76ced8ebad3d 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S @@ -1316,7 +1316,7 @@ SET_SIZE(aes_gcm_dec_update_vaes_avx2) #endif /* !_WIN32 || _KERNEL */ /* Mark the stack non-executable. */ -#if defined(__linux__) && defined(__ELF__) +#ifdef __ELF__ .section .note.GNU-stack,"",%progbits #endif diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S index 49671f1fc46a..2e0a88ec8cef 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S @@ -1275,7 +1275,7 @@ SECTION_STATIC #endif /* Mark the stack non-executable. */ -#if defined(__linux__) && defined(__ELF__) +#ifdef __ELF__ .section .note.GNU-stack,"",%progbits #endif diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S index 319caa4e190b..6c5bbf0fb272 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S @@ -714,7 +714,7 @@ SET_OBJ(.Lrem_8bit) .balign 64 /* Mark the stack non-executable. */ -#if defined(__linux__) && defined(__ELF__) +#ifdef __ELF__ .section .note.GNU-stack,"",%progbits #endif From nobody Thu Jan 8 08:59:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmzPR6g8hz62b8D for ; Thu, 08 Jan 2026 08:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmzPR5ZxJz3jpv for ; Thu, 08 Jan 2026 08:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w1K/kwooRWVOqTzBUhpS2Vg5UmAivXjhIQFXm4JBMLA=; b=Y5/rD4uFf4HYoaYWtgG8zA7++v0FbCSXhPH0sB20SxaLaYDLTqP4PKdCBCJVq2wLuuJwWn nFdjLHsoewk7USodYnr9y/wVxZ6f5uC85tKDfET39OAOpQPlnNmW40Kayj9GjMnMHywclZ vQMU3xXC+ysm44DojBUtAZ0Ig5SNrpSyjD1iLNRJwg65lnA3wi7wx73gzpA3PrTrAhoSZv QwwFnC7C4svk8yZOwuKRl1gSqooAzLv2zZnTQhmrsZ2tT2pgXoZO6tAJGjFdU/HRaypu4O x345P6CR4+zL4hqzgMioQQvlgqQxq1TTI0j0H2E1xWD2sBa+VKNRw8zJjTEayA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w1K/kwooRWVOqTzBUhpS2Vg5UmAivXjhIQFXm4JBMLA=; b=pLMoXynRloroaPvj70nnsld4A6gHvxMpJ8M7iDJh6dTu3aWh2khZemEaBiz/mLisBYC7kg i/rygA3PtaKxKzoz0mfC14gdotdg7uoX1dnxJUwsOlTpal4aUvaDIUHMJs2HiEqshWyAac 1OQHqA1ldoy3lCirE+x1ZMT298xAkpwILRJTH41SZ9cYJocLrLDW05pMu86kM8MCLEi468 2MFDJXXgPWWQtBz6H2rRyI51poNy0NLivS9pb2xsHZfg1uN/+aSczovtRqQjhYXCjLg+5n Gz9CO0WxNvRnOQRLwJN3AqwM33UQRAjYSYgvTg5lLkvUOIlHenJ9DctYYjFn7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767862795; a=rsa-sha256; cv=none; b=I5CLaTBuE/S+lBVBSc/isn5cCHJHfC/7H/n3Fm5DLn2BYB5f/tnS74DEV522P8HAKcsGZr wvGq6zhQ46qKpt+JDFhbgjLW5m1rQJylVNIIbJl5NHlJHZ5OsDQEEj+VHzX/D7+hJYhFpi Gu01W+L4c1I5aplQxudr/ayQZuwS2RW95eFWYnDDV9gGTdT5x/7I+KY43yksNCMdY5NBWw +auC7Sn721nj/mwSGM7nu/Zfd4bXSJsHz02xTKDb2GQIQ/MjES0nTUd6RUrMCVbAbxSSX2 ijNJLzEx4ZAHa/Jfz3vlioSFpj3w8cEG0uzwCYDQF54OXcgToooVvsizRe9DeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmzPR58mYzXKS for ; Thu, 08 Jan 2026 08:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f1f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 08:59:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: William Carrel From: Xin LI Subject: git: 709c1049fe0c - main - GCE: Fix growfs path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 709c1049fe0c6d0217e81268d4f33f7191474453 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 08:59:55 +0000 Message-Id: <695f720b.f1f5.66e79e14@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=709c1049fe0c6d0217e81268d4f33f7191474453 commit 709c1049fe0c6d0217e81268d4f33f7191474453 Author: William Carrel AuthorDate: 2026-01-08 08:49:42 +0000 Commit: Xin LI CommitDate: 2026-01-08 08:59:06 +0000 GCE: Fix growfs path The sed command was missing the ${DESTDIR} prefix, meaning it was attempting to modify the build host's /etc/rc.d/growfs instead of the target image's script. Tested in an arm64 builder that builds as non-root. PR: kern/292081 MFC after: 1 day --- release/tools/gce.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 558641821b16..6bbd26b5835f 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -39,7 +39,7 @@ vm_extra_pre_umount() { # Enable growfs on every boot, not only the first, as as instance's disk can # be enlarged post-creation - sed -i -e '/KEYWORD: firstboot/d' /etc/rc.d/growfs + sed -i -e '/KEYWORD: firstboot/d' ${DESTDIR}/etc/rc.d/growfs cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" From nobody Thu Jan 8 08:59:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmzPT1Lg6z62bW4 for ; Thu, 08 Jan 2026 08:59: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmzPS6s2Sz3jss for ; Thu, 08 Jan 2026 08:59:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CN18zZx1Krkm6AYkTjGaR/I6ue/CD9F7glcsplltnB8=; b=fZi+4UAF7OKNqbqcNK2QQwps5H6M64yIOgnx4di/MdkcfcwWfP66Yr/BWOXk/uCrgbxvkf 1HbNYzggCyOw28if9J5ucyLGnJL6XTGnKnT8o9EHkyBy+ow8/cgZkxNA3mwKk309olVfW7 k7SnmH15PJMV7J44ajJ3Omb9YJRwWCSyVXFAMHcjuGzwW3KwHUHJB9tssBCaICqHdZNE/A m/4xOM0ZPlvgq67gzVGJ/NUqLwGtZ2ZOvVKPOJ5KZGVYIP/jXWoWbMWXwVCaUTZWmt6UV+ rOgV105hDB3aGdrOLmZwUOWsBX8pSo8ODWjRnVhDAYqT1tEmqVb/+3GxJ55NAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CN18zZx1Krkm6AYkTjGaR/I6ue/CD9F7glcsplltnB8=; b=D0/wsVAyENi0FUjhiiPrb/PA+m2ZzBI443RMQPtEm0EuLJiuvogviCSnkW4p+N+AyR7yvi TH4RvY8xJrHf3XE394x59hK7V2cOMy/WQuztdqp7EakO2PDq9xkb1YV0jK177k23kEqNVJ Zd29PPuvD5tepgajg/2H9PovjSqy3rpcR5ARHE7fDSYOdn3ccQLsrMY5NYZmBXeXsgbrnU foDfvbQgoIO/H7fW5yqUoVotCEs4m0ebQj7SZD9rjqvjXDFV02YEX7QFy5+jIdcPRBloeZ i2AbeK2sWWkG0SdP6fpwZ/61DSe2k+hAl5agkaKC396pMOTgwdU/rKNyzzD62g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767862797; a=rsa-sha256; cv=none; b=PlwS+95HwZd3CDtdJh53UVqNkQByClmDFoW/0gPLALjZdQdFPbAlJceLgeLRSJK8OYA8tH WnqHMb4/quhWvQl2VmNf/w3S10vtzoDjFcAHOykhRae6vCz3Elox3eLV25NhZh5sfU0Qa4 bzobnAiN1eAnGOZ0FCyx3WwKAzYm6vEX/kMREnoawzcrhbW+Xt1t2YMR8uaLlt3hQL4sEz h8oBz/nTHFjWDYAlo1eqLJI8u7gSeLvYTQAiDe4DylfcKmWljDE1Yt2ev4pVqWYOItQbYK 6qk/LuXeVRKwfDA2YSA5pnzfVG2Ylu+a/bx5gjj1qSMHUkTlH4vnmckUD+f6Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmzPS6RRMzXVx for ; Thu, 08 Jan 2026 08:59:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f15c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 08:59:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: William Carrel From: Xin LI Subject: git: f604d84618ad - main - GCE: Enable vtnet(4) Multiqueue. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f604d84618ad478fa46ec374480cbcbc1d93bf07 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 08:59:56 +0000 Message-Id: <695f720c.f15c.121222eb@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=f604d84618ad478fa46ec374480cbcbc1d93bf07 commit f604d84618ad478fa46ec374480cbcbc1d93bf07 Author: William Carrel AuthorDate: 2026-01-08 08:51:11 +0000 Commit: Xin LI CommitDate: 2026-01-08 08:59:06 +0000 GCE: Enable vtnet(4) Multiqueue. Removes hw.vtnet.mq_disable=1. This workaround was originally introduced nearly a decade ago to address stability issues on KVM that have long since been resolved in both the FreeBSD driver and the GCE hypervisor. Removing this allows network interrupts to scale across multiple vCPUs. Tested on n2-highcpu-16 VM with 15.0-RELEASE and confirmed multiple queue pairs active and interrupts handling across cores. PR: kern/292081 MFC after: 1 day --- release/tools/gce.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 6bbd26b5835f..934007759279 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -56,7 +56,6 @@ beastie_disable="YES" loader_logo="none" hw.memtest.tests="0" console="comconsole,vidconsole" -hw.vtnet.mq_disable=1 kern.timecounter.hardware=ACPI-safe aesni_load="YES" nvme_load="YES" From nobody Thu Jan 8 08:59:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmzPV2nFGz62b8H for ; Thu, 08 Jan 2026 08:59:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmzPT70wqz3jjd for ; Thu, 08 Jan 2026 08:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OMTlKTZ6KIvHWDyOHkAKqAMd691ng8IbU8Ma6ybfrIE=; b=jHOkr+8XrnrDsFh5d0aFmx1bRA36XPdIo5Ze9uJy4ksd0SlB7Cp7fvDQkAeeqlIo9R8nli ShoMHmeeRTEjSEdWaUR98kUgEssB7MRc2pGU/FjXVrWqEuSZUyhnqrJ0FD/kHHnA7r4CJM gm0XucWtnk3IgkM1oMbgU05H+FP/6hPjYBR0Fo0Z1q22vQJCq9cq1RCJVYzAdv5YF8yHVa ObC6Cw1MrsVrhP0MrmnvV0u2DSgt4U6jkbZm1sb2EiOfug2/b78o43ZwD4tpK5HsMcPBpM dE1Oq/JrHEJgK8aNT+NF/HJGnd5Hb9YNdwNcNV7aFW4vR8FO5BBWbqXo0249Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767862798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OMTlKTZ6KIvHWDyOHkAKqAMd691ng8IbU8Ma6ybfrIE=; b=F7WB4lhvREmS9YdNgYhbiBHAiGnIfy4WYasUwN315pc4OF+zQGpHpDahHSlaxvFLWOqRT4 c5PLVuJv+SkUu2fu6P3Oq5hM1hpB3VvtXkK6b+GYCBYK+BQ8kZo6StWXnhIJk0tUPbhQHx lKJnJ5oNew0rRyT5RSmgTb5sN8b1CSnjqZ/w+rJn8thZN7EMbJHVPIzkPgSSzkqXENToke EW03asHH/om9RvHggONrsUAAR3VqsMdRL4GfJWrEOVT2Xg4/ztRnZKcnJttkWmNP/lWt8T ECpuUPQBUQgm698gVgQIXNeCIbr/FvtaTX82jNItXa3yVQAwZMCi8w9eeUn4QA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767862798; a=rsa-sha256; cv=none; b=XNyUi+lTCMD+bavjpy8odSqnFEMh4YW+F8rH1j4CtCfXMZ7cLGtXmwIt73fyPCT9RW/7lq 1dylSZswEIUfyVNoaFz2ZC5se8+MVlBtDC0QWziMRq/+axfK1yLz+Ll26cKqEVFkxCPzKt jE7Y6RbSFes/HCo5+Olpt6X5y9hOde2NdgRgd5Rev9nPNJ+UjDOspVNrErYLHST6uE9OTm qnWue+aoL34WycUBajf5uCoT0rQNyMaTffSfc03dytJ0emOHNacjTTQUsQRGF5JmXwXT0Z 22lqJMn0MYLgS6pTcPvl7C7aunD6EfbRFn5QQRVbdd7Jh51Me7Agg5Re8b2p9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmzPT6Xm0zXX9 for ; Thu, 08 Jan 2026 08:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f09f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 08:59:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: William Carrel From: Xin LI Subject: git: 9ae43352c89c - main - GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ae43352c89c776c8171f5881a984bc39acf5d6a Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 08:59:57 +0000 Message-Id: <695f720d.f09f.32f3bdc5@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=9ae43352c89c776c8171f5881a984bc39acf5d6a commit 9ae43352c89c776c8171f5881a984bc39acf5d6a Author: William Carrel AuthorDate: 2026-01-08 08:56:27 +0000 Commit: Xin LI CommitDate: 2026-01-08 08:59:07 +0000 GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0. This is required for MSI support on GCE ARM64 instances which is prerequisite to gve(4) not panicking at boot, and nvme(4) also has a real sad time without interrupts. Tested on a variety of c4a VMs. This is meant to be a temporary hack; long term fix would be to check for the hypervisor and quirk gve(4) device with PCI_QUIRK_ENABLE_MSI_VM. PR: kern/292081 MFC after: 1 week --- release/tools/gce.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 934007759279..7298aabf3956 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -59,6 +59,9 @@ console="comconsole,vidconsole" kern.timecounter.hardware=ACPI-safe aesni_load="YES" nvme_load="YES" + +# Required for arm64. +hw.pci.honor_msi_blacklist=0 EOF metalog_add_data ./boot/loader.conf From nobody Thu Jan 8 10:21:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn1CX0g83z62hZ9 for ; Thu, 08 Jan 2026 10:21: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn1CW7181z3sPv for ; Thu, 08 Jan 2026 10:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767867688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpgksrmRAV0sUcO+gltoKl3/hILv9tGAe18Dm3Sse+I=; b=KSKWeWufQTaNWBOTiJtEuj6bO1wlRS0fDuW0T9kwc6F8TURAZsZl/O7KQstx+4ikhONqsi Pdi873RvqBfgH5sbV/HGj+7YqixheQ2HypeGwo525bS595oZHqEprcTSxR7IJc9S3XJ/Op 966EdfcuXTgjmtgZr/hZ5jlzSi4cuxlNG4BMT4sahACnDVxuRX5a8CRRCqV3uhhkoMkqyw v1adTEO+bIHAE6gyzp3H5Kffn3ycA5f0odfsaPwvZGQaJxdiOueHflS8NHVzdptRdLxJXu 8/8LCp7a7QcAp8OfkreyOj6sP7pUpoUUIi90sdcHOpH3QcNMccPm52a7+Nk1Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767867688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpgksrmRAV0sUcO+gltoKl3/hILv9tGAe18Dm3Sse+I=; b=wT7LSvPfnWibUgJ2fkVR5JckLyoQN8eBDUbZVCozOwFHObpVNiqL/UCey04MeQNOs0W+K0 9m2ZvZJKYJIDZ3DKkmdr2n1wae/CexSgT0zi2QWM06zOUarzX0pga396+QdlFJjkhv9NyC ErgjKnwVa+30YUAHZ1DhG2r0MdiralZvfj/bDruRt4Aech7nbjU+knQDdUqwYb+SJJqOjc rRNkyHNiQA2KSRfsQM2anTWObpBaf64pUVwKhswFY4OdV6gzKQ4rdnuYJ06JCCTvxEZpEz lpN330dVWIWWikRFEpnz1XoTJJBd58yGh3hwK6fSBPTQUZbBvao8EbKSUBECvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767867688; a=rsa-sha256; cv=none; b=vjwTBYIGd7Qiftu80RH27G9kWCaoGS5eR4m7hqBIVQbSUt5c2fY2pBq8DZc+jH3qCaX17m E1kt3I7lz1RwqfmN1f7rqRMOMFtcNjgmXoe/i90HRGOCJfXJJ2XdeXMc5QMJpJ+i9/Q8qV xAun9AaxwKG4rK6TuiY/wzDNBuXzeV39gqPhdYb71ZNUCGK6jKehDeln8HUySYxX92ZxQk V+SUqAH2glp1OpW4pdXGM6IEgc9JsPZxinJaiBRJ86LCtxKPjVHc/uOO2nE9ra5Yh312Bp arDk/fZuyJQBI2Kh4uWdB7r1KAXE0ZiqGB5oHdQwwFmXSyGDxMsgcfgwH7f/rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn1CW6VF0zb4W for ; Thu, 08 Jan 2026 10:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27739 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 10:21:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: =?utf-8?Q?Gon=C3=A9ri?= Le Bouder From: Baptiste Daroussin Subject: git: cae280931c9e - main - nuageinit: set the hostname when user-data is missing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cae280931c9e1f072d8bf300c377ae120300b898 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 10:21:27 +0000 Message-Id: <695f8527.27739.4f75fe6c@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=cae280931c9e1f072d8bf300c377ae120300b898 commit cae280931c9e1f072d8bf300c377ae120300b898 Author: Gonéri Le Bouder AuthorDate: 2026-01-07 21:03:34 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-08 09:55:27 +0000 nuageinit: set the hostname when user-data is missing This address the situation reported here https://github.com/freebsd/freebsd-src/pull/1952#issuecomment-3720210259 The user-data file was missing and the `sethostname` function is never called. This commit adjusts slightly the logic to avoid the `exit()` call when the `user-data` file is missing. MFC After: 1 week Signed-off-by: Gonéri Le Bouder Differential Revision: https://github.com/freebsd/freebsd-src/pull/1953 --- libexec/nuageinit/nuageinit | 113 ++++++++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 46 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 40e19f98de6c..f7700f7d8e70 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -23,7 +23,7 @@ local function default_user(obj, metadata) table.insert(ssh_authorized_keys, k) end end - if type(obj.ssh_authorized_keys) == "table" then + if obj and type(obj.ssh_authorized_keys) == "table" then for _, k in ipairs(obj.ssh_authorized_keys) do table.insert(ssh_authorized_keys, k) end @@ -94,13 +94,13 @@ end local function sethostname(obj, metadata) -- always prefer fqdn if specified over hostname - if obj.fqdn then + if obj and obj.fqdn then nuage.sethostname(obj.fqdn) - elseif obj.hostname then + elseif obj and obj.hostname then nuage.sethostname(obj.hostname) - elseif metadata["local-hostname"] then + elseif metadata["local-hostname"] then nuage.sethostname(metadata["local-hostname"]) - elseif metadata["local"] then + elseif metadata["hostname"] then nuage.sethostname(metadata["hostname"]) end end @@ -130,6 +130,10 @@ end local function create_default_user(obj, metadata) local function need_default_user() + -- no user data + if not obj then + return true + end if not obj.users then -- default user if "users" is undefined return true @@ -269,7 +273,7 @@ local function nameservers(interface, obj) -- Only call resolvconf with interface if interface is provided if interface then resolvconf_command = "resolvconf -a " .. interface .. " < " .. resolv_conf - else + else resolvconf_command = "resolvconf -u" end if not os.execute(resolvconf_command) then @@ -662,7 +666,7 @@ local function parse_network_config() return netobj end -local function load_metadata() +local function load_metadata(citype) if citype == "config-2" then local parser = ucl.parser() local res, err = parser:parse_file(ni_path .. "/meta_data.json") @@ -690,46 +694,70 @@ local function load_metadata() return {} end +local function load_userdata() + local ud = nil + local f = nil + local userdatas = {"user-data", "user_data"} + for _, v in pairs(userdatas) do + f = io.open(ni_path .. "/" .. v, "r") + if f then + ud = v + break + end + end + if not f then + return nil, nil + end + local line = f:read("*l") + if not line or #string.gsub(line, "^%s*(.-)%s*$", "%1") == 0 then + f:close() + return + end + if citype ~= "postnet" then + local content = f:read("*a") + if not content or #string.gsub(content, "^%s*(.-)%s*$", "%1") == 0 then + f:close() + return + end + nuage.mkdir_p(root .. "/var/cache/nuageinit") + local tof = assert(io.open(root .. "/var/cache/nuageinit/user_data", "w")) + tof:write(line .. "\n" .. content) + tof:close() + end + f:close() + + local obj = nil + if ud then + f = io.open(ni_path .. "/" .. ud) + obj = yaml.load(f:read("*a")) + f:close() + if not obj then + nuage.err("error parsing cloud-config file: " .. ud) + end + end + return line, obj +end if citype == "config-2" then -- network config2_network(ni_path) end -local metadata = load_metadata() +local metadata = load_metadata(citype) +local line, obj = load_userdata() --- deal with user-data -local ud = nil -local f = nil -local userdatas = {"user-data", "user_data"} -for _, v in pairs(userdatas) do - f = io.open(ni_path .. "/" .. v, "r") - if f then - ud = v - break - end -end -if not f then - os.exit(0) -end -local line = f:read("*l") -if not line or #string.gsub(line, "^%s*(.-)%s*$", "%1") == 0 then - f:close() - os.exit(0) -end -if citype ~= "postnet" then - local content = f:read("*a") - if not content or #string.gsub(content, "^%s*(.-)%s*$", "%1") == 0 then - f:close() - os.exit(0) +-- No user-data +if line == nil then + local calls_table = { + sethostname, + create_default_user, + } + + for i = 1, #calls_table do + calls_table[i](obj, metadata) end - nuage.mkdir_p(root .. "/var/cache/nuageinit") - local tof = assert(io.open(root .. "/var/cache/nuageinit/user_data", "w")) - tof:write(line .. "\n" .. content) - tof:close() -end -f:close() -if line == "#cloud-config" then +-- YAML user-data +elseif line == "#cloud-config" then local pre_network_calls = { sethostname, settimezone, @@ -749,13 +777,6 @@ if line == "#cloud-config" then write_files_deferred, } - f = io.open(ni_path .. "/" .. ud) - local obj = yaml.load(f:read("*a")) - f:close() - if not obj then - nuage.err("error parsing cloud-config file: " .. ud) - end - local calls_table = pre_network_calls if citype == "postnet" then calls_table = post_network_calls From nobody Thu Jan 8 10:21:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn1CY2vJXz62h22 for ; Thu, 08 Jan 2026 10:21: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn1CY0JvDz3sDp for ; Thu, 08 Jan 2026 10:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767867689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Ux0ut94DxiWn3x9RjAHFN1mH4GdeD5AVsDFlzIscm0=; b=ZNe7IguAtBqgiU6ta6rVcwZIH1h0dgwppNGiNJLoRBCkKZ7ErbGNSr4QHVLxOgkXGC6N3c nOvPmXFa73U7XXyEDD1rYPrievpDoV6YPkS91Ta3m/4CuQx6VfLfyGwnjPlOPJEeJv+4Ol rV3++H4JeUDegRVeQ7A3ShLPHk+tXEAFh+ZJ6BoXosCcR4CEG2ro9kiYRkk0VBBV35eL/H cJZGWw5co2dFoQcM0cxY6OgBWn1HBsUNQ9HJzKLoarvfXV5WsJJIwyhhgq16Z62CtChFtf QyR4PctxWZXq7Z88LPJSDKFaGhzliGtM/qsjWe9Ca8k2JxAsBz0nnXh1Bq/vtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767867689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Ux0ut94DxiWn3x9RjAHFN1mH4GdeD5AVsDFlzIscm0=; b=HpuKNjtQj+ib1rNKzg4WKiDHbY6KxPrCxYkpBcjeryg4P5EAK19O7K+Bw68a/7VjilTscW CMVUwyYjXzuEpetWYoP00emvo1Y6LSv5B9OmfNd84l6N1UKlf6V0UdigL9mW5C1T3N5guP aT1O+J+FOaJVAXahrR9vnorwd7rhtc/1Kw0og3dTJ59uyqI4nXsU6N9BLNm+DIDFxnySqQ nz8rKbisC5wth60QxIbMwsZsOiO9KvP/1nn1G6rE87mMhBgFyR2B7BHnBYQa3a5fEowoR1 zMD9P+RkIPYE0lSGiek73CMSJcE4QOxcj2Tr3yQV0B1xNGSffgdvcKgtnStweQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767867689; a=rsa-sha256; cv=none; b=UTjvDDfhrqsfOV8rESRASaY50rzraWezL0a0ingbXafH7IbR7NZA+SxQJQX3WI7o88fNNx OHq/NuTpQNeJClL/A5JQ7ejIpXrc+zsYIpTUo0+VUrmkxJOVcb9F2FSbDSnzt3UYPHaw8n lzzfuE9xPv/xyPfjLXziuGCAsAN672NzYcDrRZ14NvbK79Gl+20f9M9/v1RCZdPkENAchP T3wetBPScVGlbv/wmoEdMUw27GLssL+zmSkiR09sCD3B23X0sM9cGqVTHHCU3RDC8xHcKE bLV6MQmHWqPlLc0sZEx60Eks8IIg3oTchVIxX6w5CExbT0UWI96tagAZw/URpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn1CX71pBzbcq for ; Thu, 08 Jan 2026 10:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30425 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 10:21:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 65e77d34fdff - main - nuageinit: fix test after recent behaviour change List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65e77d34fdff9065616cfaedef3ef53329cdad26 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 10:21:28 +0000 Message-Id: <695f8528.30425.2aeec0fd@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=65e77d34fdff9065616cfaedef3ef53329cdad26 commit 65e77d34fdff9065616cfaedef3ef53329cdad26 Author: Baptiste Daroussin AuthorDate: 2026-01-08 09:52:20 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-08 09:55:27 +0000 nuageinit: fix test after recent behaviour change with recent change nuageinit always create a "freebsd" user, if no users are specified, which means we do need to get the rootdir in the testsuite containing a group file otherwise pw complains and the tests fails. --- libexec/nuageinit/tests/nuageinit.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 851f7110378a..3a01413f8487 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -59,6 +59,7 @@ args_body() nocloud_body() { mkdir -p media/nuageinit + setup_test_adduser atf_check -s exit:1 -e match:"nuageinit: error parsing nocloud.*" /usr/libexec/nuageinit "${PWD}"/media/nuageinit/ nocloud printf "instance-id: iid-local01\nlocal-hostname: cloudimg\n" > "${PWD}"/media/nuageinit/meta-data atf_check -s exit:0 /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud @@ -220,6 +221,7 @@ EOF config2_body() { mkdir -p media/nuageinit + setup_test_adduser atf_check -s exit:1 -e match:"nuageinit: error parsing config-2 meta_data.json:.*" /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 printf "{}" > media/nuageinit/meta_data.json atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 @@ -335,6 +337,7 @@ EOF config2_network_body() { mkdir -p media/nuageinit + setup_test_adduser printf "{}" > media/nuageinit/meta_data.json mynetworks=$(ifconfig -l ether) if [ -z "$mynetworks" ]; then @@ -401,6 +404,7 @@ EOF config2_network_static_v4_body() { mkdir -p media/nuageinit + setup_test_adduser printf "{}" > media/nuageinit/meta_data.json mynetworks=$(ifconfig -l ether) if [ -z "$mynetworks" ]; then From nobody Thu Jan 8 10:45:19 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn1l34t8Pz62jm0 for ; Thu, 08 Jan 2026 10:45: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn1l33cdMz3xST for ; Thu, 08 Jan 2026 10:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767869119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xf7LirL+l4JpXkd/2PzrVEVAHdV2fydYzi52cZBMMHc=; b=b6v3+ONnBV48dxYZGMSEEVqbEAd8BRVhEO8j3SW5HxUq4IPexSMM3N/W2u82JoHe8F+mNm lImQYyBI+VKd/zdTlnUL05AxTKywplVqKiIpyHspfdaK39RdRVIEjQAmK58lLHNvTLP43q MirdX7iEQ7MsV6P4mh7ryM5CBXSNDHE+GN/BaTn+pG4lk5HbNgUg+P2D5/urtwUIowFb2K 9+lnd/xdI25vsGbfJXvdUu1bt1aPPV+klIVlTFg3tvhhOoDQa2atmD8BrrY4P0O/JtUj4j zvg0Hn7aL3tb4LyFLHxA3eoXZq5iTdUHauengCYYgVeXUpYXqvhNN/jBCsdfBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767869119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xf7LirL+l4JpXkd/2PzrVEVAHdV2fydYzi52cZBMMHc=; b=bMrMcIzha8MTfsyLJMx0PuCYFD5zIL9v+Yx5jknXCh3VWbKhMHSBLWSYSRUr9p5+7WskS7 +OX4kPvfrJFnkiOgASmlba3LlouHQPtRQke8D4QZ1S0+xeDvN4YVN6qZ0cO2Dvqz13CPO0 EiUbxy8rjHTRVEPCTjPfQy2o+VxDjS/fpqI1nnDrOEEtyXrkF34sGZup1gBxg3ZRHCAso1 vvzhBpGQo6C3YFZ0qAzDHAnrxhvJMCVHeD/kgNMsR3NYg7fskjCBXESDVI69TJTFP7gd1y vtT0wCGcZ6POgfi2fqinBPthYJeG/9TYDWYXqcqceFWOZxJ4192Q8h5v3E7VqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767869119; a=rsa-sha256; cv=none; b=BFaFrif9cx0z1GDLVOSKkVMgzgafg1r/6jW9TmXSZl25Sf+po61SC0qdST7+Uvy5Zg1sfG d3BXYhxPbz8H1PktWvSUgiY19C/nGAYNm4dvKYwiLcnsBwJHYulAGru+Ig0SylUqJ+P83m DpmleZRa8rsOeq995fbTlvWXnJla6T1t4YLvhnCJAkYJkoH5sezMZP/P6ylwq7K7nHwPO6 eP4V4SXlk1ZjTpdditGBkpo493mRF2OYO2FhPkGbmQWDlGVc75l01Obxhnzr94T0bjcaCV tkO8ZQp2Fw+5SrupPdnjFcLcGhp9efqU2SxCOX3YLq5+4NMqgK5NoGgBG8656Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn1l335B8zbbL for ; Thu, 08 Jan 2026 10:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30bec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 10:45:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: c0df8f6f0e6a - main - acpi: Make taskqueue only run on BSP List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0df8f6f0e6a5f77ec9140e8075d09c55fe4c3c7 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 10:45:19 +0000 Message-Id: <695f8abf.30bec.62a9009@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=c0df8f6f0e6a5f77ec9140e8075d09c55fe4c3c7 commit c0df8f6f0e6a5f77ec9140e8075d09c55fe4c3c7 Author: Aymeric Wibo AuthorDate: 2025-12-29 20:01:50 +0000 Commit: Aymeric Wibo CommitDate: 2026-01-08 10:35:54 +0000 acpi: Make taskqueue only run on BSP This is needed because when we add the suspend-to-idle loop, we only want to break the BSP out of idle to process the taskqueue while keeping all the others idled. Currently assuming BSP to be CPU0, which may not always be the case on non-x86. Reviewed by: kib Approved by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54406 --- sys/dev/acpica/Osd/OsdSchedule.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c index f0464709e8ad..0c5eadb87687 100644 --- a/sys/dev/acpica/Osd/OsdSchedule.c +++ b/sys/dev/acpica/Osd/OsdSchedule.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -109,10 +110,13 @@ static void acpi_taskq_init(void *arg) { int i; + /* XXX Currently assuming BSP is CPU0. */ + cpuset_t just_bsp = CPUSET_T_INITIALIZER(0x1); acpi_taskq = taskqueue_create_fast("acpi_task", M_NOWAIT, &taskqueue_thread_enqueue, &acpi_taskq); - taskqueue_start_threads(&acpi_taskq, acpi_max_threads, PWAIT, "acpi_task"); + taskqueue_start_threads_cpuset(&acpi_taskq, acpi_max_threads, PWAIT, + &just_bsp, "acpi_task"); if (acpi_task_count > 0) { if (bootverbose) printf("AcpiOsExecute: enqueue %d pending tasks\n", From nobody Thu Jan 8 10:59:59 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn24D3ZQZz62kVM; Thu, 08 Jan 2026 11:00:12 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn24B2DL5z40bc; Thu, 08 Jan 2026 11:00:10 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com Received: from skull.home.blih.net (mwc0868.ftth.cust.milkywan.net [45.13.107.196]) by mx.blih.net (OpenSMTPD) with ESMTPSA id dbbd8052 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 8 Jan 2026 11:00:02 +0000 (UTC) Date: Thu, 8 Jan 2026 11:59:59 +0100 From: Emmanuel Vadot To: Aymeric Wibo Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: eeaa865edba6 - main - acpi: Fix setting sleep state sysctls to NONE Message-Id: <20260108115959.4bc9493930ce880913058e5c@bidouilliste.com> In-Reply-To: <6929b55d.2b59a.8a970bd@gitrepo.freebsd.org> References: <6929b55d.2b59a.8a970bd@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd16.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.08 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.985]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; ONCE_RECEIVED(0.20)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FREEFALL_USER(0.00)[manu]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4dn24B2DL5z40bc Hello, On Fri, 28 Nov 2025 14:44:45 +0000 Aymeric Wibo wrote: > The branch main has been updated by obiwac: > > URL: https://cgit.FreeBSD.org/src/commit/?id=eeaa865edba685545ac22c378b35552e09bf1b41 > > commit eeaa865edba685545ac22c378b35552e09bf1b41 > Author: Aymeric Wibo > AuthorDate: 2025-11-25 19:34:34 +0000 > Commit: Aymeric Wibo > CommitDate: 2025-11-28 14:42:54 +0000 > > acpi: Fix setting sleep state sysctls to NONE > > This restores the functionality as it was pre-97d152698f48. > > A stopgap was committed by glebius@ in 34dfccc64f47 ("acpi: in > acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()"). > > PR: 290651 > Reviewed by: thj, emaste > Approved by: thj > Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h") > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D53909 > --- > sys/dev/acpica/acpi.c | 39 ++++++++++++++++++++++++--------------- > 1 file changed, 24 insertions(+), 15 deletions(-) > > diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c > index e3ff4f6937d2..99dd817f9158 100644 > --- a/sys/dev/acpica/acpi.c > +++ b/sys/dev/acpica/acpi.c > @@ -4318,13 +4318,15 @@ acpi_sname_to_sstate(const char *sname) > { > int sstate; > > + if (strcasecmp(sname, "NONE") == 0) > + return (ACPI_STATE_UNKNOWN); > + > if (toupper(sname[0]) == 'S') { > sstate = sname[1] - '0'; > if (sstate >= ACPI_STATE_S0 && sstate <= ACPI_STATE_S5 && > sname[2] == '\0') > return (sstate); > - } else if (strcasecmp(sname, "NONE") == 0) > - return (ACPI_STATE_UNKNOWN); > + } > return (-1); > } > > @@ -4379,8 +4381,10 @@ acpi_suspend_state_sysctl(SYSCTL_HANDLER_ARGS) > if (new_sstate < 0) > return (EINVAL); > new_stype = acpi_sstate_to_stype(new_sstate); > - if (acpi_supported_stypes[new_stype] == false) > + if (new_sstate != ACPI_STATE_UNKNOWN && > + acpi_supported_stypes[new_stype] == false) > return (EOPNOTSUPP); > + > if (new_stype != old_stype) > power_suspend_stype = new_stype; > return (err); > @@ -4423,21 +4427,26 @@ acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) > if (err != 0 || req->newptr == NULL) > return (err); > > - new_stype = power_name_to_stype(name); > - if (new_stype == POWER_STYPE_UNKNOWN) { > - sstate = acpi_sname_to_sstate(name); > - if (sstate < 0) > - return (EINVAL); > - printf("warning: this sysctl expects a sleep type, but an ACPI S-state has " > - "been passed to it. This functionality is deprecated; see acpi(4).\n"); > - if (sstate < ACPI_S_STATE_COUNT && > - !acpi_supported_sstates[sstate]) > + if (strcasecmp(name, "NONE") == 0) { > + new_stype = POWER_STYPE_UNKNOWN; > + } else { > + new_stype = power_name_to_stype(name); > + if (new_stype == POWER_STYPE_UNKNOWN) { > + sstate = acpi_sname_to_sstate(name); > + if (sstate < 0) > + return (EINVAL); > + printf("warning: this sysctl expects a sleep type, but an ACPI " > + "S-state has been passed to it. This functionality is " > + "deprecated; see acpi(4).\n"); > + MPASS(sstate < ACPI_S_STATE_COUNT); > + if (acpi_supported_sstates[sstate] == false) > + return (EOPNOTSUPP); > + new_stype = acpi_sstate_to_stype(sstate); > + } > + if (acpi_supported_stypes[new_stype] == false) > return (EOPNOTSUPP); > - new_stype = acpi_sstate_to_stype(sstate); > } > > - if (acpi_supported_stypes[new_stype] == false) > - return (EOPNOTSUPP); > if (new_stype != old_stype) > *(enum power_stype *)oidp->oid_arg1 = new_stype; > return (0); > Since this commit I have the warning printed as I have the hw.acpi.lid_switch_state set to 'S3' in sysctl.conf, the man page says it's correct. Changing it to 'standby' doesn't work as the value isn't recognized. What is the correct way for this sysctl now ? Cheers, -- Emmanuel Vadot From nobody Thu Jan 8 12:27:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn40r3LQgz6B0mt for ; Thu, 08 Jan 2026 12:27: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn40r0mzgz47Z9 for ; Thu, 08 Jan 2026 12:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767875244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qyn4a4mPtMPa8UA7sqKfM0l4QjD7+TD2QWF9SGHpFDQ=; b=oPp4FiHue1wqryDdh1amjIrbx2erXWY8o+0JIzl0/UJmp8EVEB+OqjezddsaPKyFKkxV4j JN807EhPvHiLMtj8LxErp9FqQNEtN/nwPCml5z1Tey17lS1A4svEcQVMzsne/PcNXf6fo9 DtKz6LKc9Vy17ArzFgnQnk5wnoHE3uKDujGnCBYxo23sQI6buMSLdFiELzq1+2sX906G2p 5Qu5lWFaObBOq3N0oN6Sak0JLmC22/uYS0PCH7hSJR6Zkk7Mzh8amRrY6yPrgDAqlRw5Zs RPOTVA50oR8SaLrnC6mpTggFRWZMA2CRwPEqWclC3IjLY17+6Te6PF/dqd+iPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767875244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qyn4a4mPtMPa8UA7sqKfM0l4QjD7+TD2QWF9SGHpFDQ=; b=CHJ+mrto2nbEqklAmkdzJ1oKWAVvcpBPkpl3wlE4f4jRTJqOW6wPdcC6saLPs2UbPPsLaZ n4Z5aidhjtVgNGl0T6RrhEHTnNcdv9OkWY+TMwxWF6yqmE2VQ4j7WLZ5EnuQYOp0S/EuxF +P2zYOLYTAoK6NKJAtE9JPt6jp+2D5WwFxWfp2kdAaqDVLYGu+sUadvrmiHHf+nNaK2Udf 723+Kd/QM5kNdk80qeeiejfuCPGh55eaq7JKuON6HFZ9HlMfL0yHmEg20OVtkVoNUkoubg sOiTIbR9vVt8m3USvSQEAOwvildGq01V0ozor7+fm40+2alnF+oatvpouskhSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767875244; a=rsa-sha256; cv=none; b=Bwf/QYtvUj7sYflw7NWNsNs2DcfCd68P1c48u+nZ836C/93jI/tg7zVC37tPkFcGbP38BY jTuTdhdhfznSXUbSKB4UQwE60fHHl8sces/3CioiBn0wjdpMu5U9QupTyNtoyoeizAUPcr cF8RdPxJ1jlqs2K+aNdwU0Qev+HIcUIEebJ/iNWsIFYqOl5ALE5DFCVwRfap1goUIxZ3/b LtJvyo2Vf9R4+DezZ4vPO9dSumnuwLDcDDXm88ebwz5VNe24R2wz8HWk4tEx+VfrBurLl4 /5RAnoWU4xy16tUqEs9aH6WdGtfuddsFFfdMMGmCWoL7f8QknDYhycdpQ2ThaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn40q74Xbzf1r for ; Thu, 08 Jan 2026 12:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c1ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 12:27:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: bf19253516ec - main - pf: remove redundant zeroing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf19253516ec7c3bac5ccd64d934f970f68f2b2d Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 12:27:23 +0000 Message-Id: <695fa2ab.3c1ed.22023a91@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf19253516ec7c3bac5ccd64d934f970f68f2b2d commit bf19253516ec7c3bac5ccd64d934f970f68f2b2d Author: Kristof Provost AuthorDate: 2026-01-06 21:57:58 +0000 Commit: Kristof Provost CommitDate: 2026-01-08 12:25:24 +0000 pf: remove redundant zeroing nlmsg_reserve_object() already zeroes the header before it gives it to us, so there's no need to explicitly zero these fields again. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_nl.c | 54 -------------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 0a8538607ed7..4845342563ce 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -160,8 +160,6 @@ dump_state(struct nlpcb *nlp, const struct nlmsghdr *hdr, struct pf_kstate *s, struct genlmsghdr *ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GETSTATES; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u64(nw, PF_ST_VERSION, PF_STATE_VERSION); @@ -324,8 +322,6 @@ dump_creatorid(struct nlpcb *nlp, const struct nlmsghdr *hdr, uint32_t creator, struct genlmsghdr *ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GETCREATORS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_ST_CREATORID, htonl(creator)); @@ -832,8 +828,6 @@ pf_handle_getrules(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GETRULES; - ghdr_new->version = 0; - ghdr_new->reserved = 0; error = pf_ioctl_getrules(&attrs); if (error != 0) @@ -894,8 +888,6 @@ pf_handle_getrule(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GETRULE; - ghdr_new->version = 0; - ghdr_new->reserved = 0; PF_RULES_WLOCK(); ruleset = pf_find_kruleset(attrs.anchor); @@ -1085,8 +1077,6 @@ pf_handle_killclear_states(struct nlmsghdr *hdr, struct nl_pstate *npt, int cmd) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = cmd; - ghdr_new->version = 0; - ghdr_new->reserved = 0; NET_EPOCH_ENTER(et); if (cmd == PFNL_CMD_KILLSTATES) @@ -1210,8 +1200,6 @@ pf_handle_get_status(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_STATUS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; since = time_second - (time_uptime - V_pf_status.since); @@ -1301,8 +1289,6 @@ pf_handle_natlook(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_NATLOOK; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_in6_addr(nw, PF_NL_SRC_ADDR, &attrs.rsaddr.v6); nlattr_add_in6_addr(nw, PF_NL_DST_ADDR, &attrs.rdaddr.v6); @@ -1392,8 +1378,6 @@ pf_handle_get_timeout(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_TIMEOUT; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_TO_SECONDS, attrs.seconds); @@ -1452,8 +1436,6 @@ pf_handle_get_limit(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_LIMIT; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_LI_LIMIT, attrs.limit); @@ -1482,8 +1464,6 @@ pf_handle_begin_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_BEGIN_ADDRS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_BA_TICKET, ticket); @@ -1576,8 +1556,6 @@ pf_handle_get_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_ADDRS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_AA_NR, attrs.nr); @@ -1613,8 +1591,6 @@ pf_handle_get_addr(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_ADDR; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_AA_ACTION, attrs.action); nlattr_add_u32(nw, PF_AA_TICKET, attrs.ticket); @@ -1663,8 +1639,6 @@ pf_handle_get_rulesets(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_RULESETS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_RS_NR, attrs.nr); @@ -1697,8 +1671,6 @@ pf_handle_get_ruleset(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_RULESET; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_string(nw, PF_RS_NAME, attrs.name); @@ -1759,8 +1731,6 @@ pf_handle_get_srcnodes(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_SRCNODES; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_in6_addr(nw, PF_SN_ADDR, &n->addr.v6); nlattr_add_in6_addr(nw, PF_SN_RADDR, &n->raddr.v6); @@ -1832,8 +1802,6 @@ pf_handle_clear_tables(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_CLEAR_TABLES; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_T_NBR_DELETED, ndel); @@ -1869,8 +1837,6 @@ pf_handle_add_table(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_ADD_TABLE; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_T_NBR_ADDED, attrs.pfrio_nadd); @@ -1906,8 +1872,6 @@ pf_handle_del_table(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_DEL_TABLE; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_T_NBR_DELETED, attrs.pfrio_ndel); @@ -1986,8 +1950,6 @@ pf_handle_get_tstats(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_GET_TSTATS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_pfr_table(nw, PF_TS_TABLE, &pfrtstats[i].pfrts_t); @@ -2054,8 +2016,6 @@ pf_handle_clear_tstats(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_CLR_TSTATS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u64(nw, PF_TS_NZERO, nzero); @@ -2091,8 +2051,6 @@ pf_handle_clear_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_CLR_ADDRS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u64(nw, PF_T_NBR_DELETED, ndel); @@ -2176,8 +2134,6 @@ pf_handle_table_add_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_TABLE_ADD_ADDR; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_TA_NBR_ADDED, attrs.nadd); @@ -2209,8 +2165,6 @@ pf_handle_table_del_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_TABLE_DEL_ADDR; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_TA_NBR_DELETED, attrs.ndel); @@ -2243,8 +2197,6 @@ pf_handle_table_set_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_TABLE_SET_ADDR; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_TA_NBR_ADDED, attrs.nadd); nlattr_add_u32(nw, PF_TA_NBR_DELETED, attrs.ndel); @@ -2318,8 +2270,6 @@ pf_handle_table_get_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) } ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_TABLE_GET_ADDR; - ghdr_new->version = 0; - ghdr_new->reserved = 0; if (i == 0) nlattr_add_u32(nw, PF_TA_ADDR_COUNT, size); @@ -2416,8 +2366,6 @@ pf_handle_table_get_astats(struct nlmsghdr *hdr, struct nl_pstate *npt) } ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_TABLE_GET_ASTATS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; if (i == 0) nlattr_add_u32(nw, PF_TAS_ASTATS_COUNT, size); @@ -2457,8 +2405,6 @@ pf_handle_table_clear_astats(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); ghdr_new->cmd = PFNL_CMD_TABLE_CLEAR_ASTATS; - ghdr_new->version = 0; - ghdr_new->reserved = 0; nlattr_add_u32(nw, PF_TAS_ASTATS_ZEROED, attrs.nchange); From nobody Thu Jan 8 12:27:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn40s4q95z6B0pv for ; Thu, 08 Jan 2026 12:27: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn40s1D5xz47xB for ; Thu, 08 Jan 2026 12:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767875245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7h0xrt0Yo8XFeDRIz0gzXask9zx0D5BgmPfRaLFw8tE=; b=YARn8qK/Afg0TBneodK3se6LFm6yddAP0NZQpce+BoA74iAoSHiivK4oQQmn2Lsn+vS0eq gEDjXkOpnAZqCj/dRzxlpmhxutsasB5orCS7t1tbkyHkHSQ5ursLNYBDLpSSZW2TGVpuyP CZZflb9mFHKww735fDfqOADtvTFLLZhJrsMjwAQ+qo/0A77ETueiRbX6fk/rpu0cnnKl7N 9gZvXrmDc3Lt/m5c7r1/xuyvtsoomrYc7jQImYDezxCLyzRQkbOTRWrAFniLasH+MK9k9y FFL3si6KO8fc8eVTF8TrmZpR+pcq9G0uLBFnGA55onWoQql2Xy80cbQ3RR1e0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767875245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7h0xrt0Yo8XFeDRIz0gzXask9zx0D5BgmPfRaLFw8tE=; b=dn+c4VoPtn3mh2/O2PJCtqZpoUJZbYEeAQ9AgUQUiAnx59GStc79Kldtmx2tsvd1p2T53p H5Vkk/9Ww7s91g9+l2pV3SvPUHZ9EQYQsNSb9lTBjRtlg8ONLAg1NobFbnxupGdArGdw/I aMdgZ5tjZs4TjFjdcZ7vYjyVSshNrZ7ZMW3JWOJOkoRubIBC/8vak0q9ciK8pa2+dSvMxD KdAvrx6NzWs3yKxUL5CjMj+DkJ7ye17idDTcqYRCNJ4DlvPp1Zu/C//kh26bZ5+O4ayzhV wqokn79nhrHa6KMJj07ksz3xNqSNYp04qkRuk+Ppef+PA8JdPoxozMtg+QneyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767875245; a=rsa-sha256; cv=none; b=rJwfAJjoVy5ODz/qTO0djzdl5ygkt+B2eVK8/oBvUrKWPvfd9ZPdv+XRecwXj6PDmXYVop plRM9m4gcm8RmTyXL+RVwRgc/LAerVzENYZ4ucqJK4D1wXchro9JOh99rQxnVhrTfrTGVK 3nSH1rpe+LtlvH/6DWOZQtnFTQ6XE/ICrYWRFby9Qwnmqw/Ev1WyedrvHBUUrujdIc6JNA 7nMLpRPthvDPFCsqmi3C/du1bNIolwyHJghoVupqDjwih3k+NTdUQ9ocZ+oTohqeKEcJ+3 BJjLbfC3nF8mrTMIWpUu2Q7sHZv5GFn6T7vVdBcAmAUBkEddbmBmAU78owXtzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn40s0j7RzfST for ; Thu, 08 Jan 2026 12:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bf0f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 12:27:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0df9054bc116 - main - pf: handle nlattr_add_nested() failure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0df9054bc11633e2a4414e783be74906c743a64d Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 12:27:25 +0000 Message-Id: <695fa2ad.3bf0f.2de4002e@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0df9054bc11633e2a4414e783be74906c743a64d commit 0df9054bc11633e2a4414e783be74906c743a64d Author: Kristof Provost AuthorDate: 2026-01-06 22:01:21 +0000 Commit: Kristof Provost CommitDate: 2026-01-08 12:25:25 +0000 pf: handle nlattr_add_nested() failure Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_nl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 4845342563ce..1c8a1f95b650 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -100,6 +100,7 @@ static bool dump_state_peer(struct nl_writer *nw, int attr, const struct pf_state_peer *peer) { int off = nlattr_add_nested(nw, attr); + if (off == 0) return (false); @@ -129,6 +130,7 @@ static bool dump_state_key(struct nl_writer *nw, int attr, const struct pf_state_key *key) { int off = nlattr_add_nested(nw, attr); + if (off == 0) return (false); @@ -430,6 +432,9 @@ nlattr_add_addr_wrap(struct nl_writer *nw, int attrtype, struct pf_addr_wrap *a) { int off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + nlattr_add_in6_addr(nw, PF_AT_ADDR, &a->v.a.addr.v6); nlattr_add_in6_addr(nw, PF_AT_MASK, &a->v.a.mask.v6); nlattr_add_u8(nw, PF_AT_TYPE, a->type); @@ -465,6 +470,9 @@ nlattr_add_rule_addr(struct nl_writer *nw, int attrtype, struct pf_rule_addr *r) struct pf_addr_wrap aw = {0}; int off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + bcopy(&(r->addr), &aw, sizeof(struct pf_addr_wrap)); pf_addr_copyout(&aw); @@ -493,6 +501,9 @@ nlattr_add_mape_portset(struct nl_writer *nw, int attrtype, const struct pf_mape { int off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + nlattr_add_u8(nw, PF_MET_OFFSET, m->offset); nlattr_add_u8(nw, PF_MET_PSID_LEN, m->psidlen); nlattr_add_u16(nw, PF_MET_PSID, m->psid); @@ -555,6 +566,9 @@ nlattr_add_labels(struct nl_writer *nw, int attrtype, const struct pf_krule *r) int off = nlattr_add_nested(nw, attrtype); int i = 0; + if (off == 0) + return (false); + while (r->label[i][0] != 0 && i < PF_RULE_MAX_LABEL_COUNT) { nlattr_add_string(nw, PF_LT_LABEL, r->label[i]); @@ -584,6 +598,9 @@ nlattr_add_pool(struct nl_writer *nw, int attrtype, const struct pf_kpool *pool) { int off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + nlattr_add(nw, PF_PT_KEY, sizeof(struct pf_poolhashkey), &pool->key); nlattr_add_in6_addr(nw, PF_PT_COUNTER, (const struct in6_addr *)&pool->counter); nlattr_add_u32(nw, PF_PT_TBLIDX, pool->tblidx); @@ -611,6 +628,9 @@ nlattr_add_rule_uid(struct nl_writer *nw, int attrtype, const struct pf_rule_uid { int off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + nlattr_add_u32(nw, PF_RUT_UID_LOW, u->uid[0]); nlattr_add_u32(nw, PF_RUT_UID_HIGH, u->uid[1]); nlattr_add_u8(nw, PF_RUT_OP, u->op); @@ -671,6 +691,9 @@ nlattr_add_timeout(struct nl_writer *nw, int attrtype, uint32_t *timeout) { int off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + for (int i = 0; i < PFTM_MAX; i++) nlattr_add_u32(nw, PF_RT_TIMEOUT, timeout[i]); @@ -1144,6 +1167,10 @@ nlattr_add_counters(struct nl_writer *nw, int attr, size_t number, char **names, { for (int i = 0; i < number; i++) { int off = nlattr_add_nested(nw, attr); + + if (off == 0) + return (false); + nlattr_add_u32(nw, PF_C_ID, i); nlattr_add_string(nw, PF_C_NAME, names[i]); nlattr_add_u64(nw, PF_C_COUNTER, counter_u64_fetch(counters[i])); @@ -1159,6 +1186,10 @@ nlattr_add_fcounters(struct nl_writer *nw, int attr, size_t number, char **names { for (int i = 0; i < number; i++) { int off = nlattr_add_nested(nw, attr); + + if (off == 0) + return (false); + nlattr_add_u32(nw, PF_C_ID, i); nlattr_add_string(nw, PF_C_NAME, names[i]); nlattr_add_u64(nw, PF_C_COUNTER, pf_counter_u64_fetch(&counters[i])); @@ -1173,6 +1204,9 @@ nlattr_add_u64_array(struct nl_writer *nw, int attr, size_t number, const uint64 { int off = nlattr_add_nested(nw, attr); + if (off == 0) + return (false); + for (size_t i = 0; i < number; i++) nlattr_add_u64(nw, 0, array[i]); @@ -1482,6 +1516,9 @@ nlattr_add_pool_addr(struct nl_writer *nw, int attrtype, struct pf_pooladdr *a) off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + nlattr_add_addr_wrap(nw, PF_PA_ADDR, &a->addr); nlattr_add_string(nw, PF_PA_IFNAME, a->ifname); @@ -1689,6 +1726,9 @@ nlattr_add_pf_threshold(struct nl_writer *nw, int attrtype, int off = nlattr_add_nested(nw, attrtype); int conn_rate_count = 0; + if (off == 0) + return (false); + /* Adjust the connection rate estimate. */ if (t->cr != NULL) conn_rate_count = counter_rate_get(t->cr); @@ -1889,6 +1929,9 @@ nlattr_add_pfr_table(struct nl_writer *nw, int attrtype, { int off = nlattr_add_nested(nw, attrtype); + if (off == 0) + return (false); + nlattr_add_string(nw, PF_T_ANCHOR, t->pfrt_anchor); nlattr_add_string(nw, PF_T_NAME, t->pfrt_name); nlattr_add_u32(nw, PF_T_TABLE_FLAGS, t->pfrt_flags); @@ -2212,6 +2255,7 @@ static int nlattr_add_pfr_addr(struct nl_writer *nw, int attr, const struct pfr_addr *a) { int off = nlattr_add_nested(nw, attr); + if (off == 0) return (false); @@ -2291,6 +2335,7 @@ static int nlattr_add_pfr_astats(struct nl_writer *nw, int attr, const struct pfr_astats *a) { int off = nlattr_add_nested(nw, attr); + if (off == 0) return (false); From nobody Thu Jan 8 13:23:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn5Fp1yD5z6B40J; Thu, 08 Jan 2026 13:23:42 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn5Fm6NpYz3GrS; Thu, 08 Jan 2026 13:23:40 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com Received: from skull.home.blih.net (mwc0868.ftth.cust.milkywan.net [45.13.107.196]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 8a033b5f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 8 Jan 2026 13:23:38 +0000 (UTC) Date: Thu, 8 Jan 2026 14:23:38 +0100 From: Emmanuel Vadot To: Aymeric Wibo Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: eeaa865edba6 - main - acpi: Fix setting sleep state sysctls to NONE Message-Id: <20260108142338.548865cf1cd31fb18d2b6a2a@bidouilliste.com> In-Reply-To: <20260108115959.4bc9493930ce880913058e5c@bidouilliste.com> References: <6929b55d.2b59a.8a970bd@gitrepo.freebsd.org> <20260108115959.4bc9493930ce880913058e5c@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd16.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.09 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.993]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; ONCE_RECEIVED(0.20)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; FREEFALL_USER(0.00)[manu]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4dn5Fm6NpYz3GrS On Thu, 8 Jan 2026 11:59:59 +0100 Emmanuel Vadot wrote: > > Hello, > > On Fri, 28 Nov 2025 14:44:45 +0000 > Aymeric Wibo wrote: > > > The branch main has been updated by obiwac: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=eeaa865edba685545ac22c378b35552e09bf1b41 > > > > commit eeaa865edba685545ac22c378b35552e09bf1b41 > > Author: Aymeric Wibo > > AuthorDate: 2025-11-25 19:34:34 +0000 > > Commit: Aymeric Wibo > > CommitDate: 2025-11-28 14:42:54 +0000 > > > > acpi: Fix setting sleep state sysctls to NONE > > > > This restores the functionality as it was pre-97d152698f48. > > > > A stopgap was committed by glebius@ in 34dfccc64f47 ("acpi: in > > acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()"). > > > > PR: 290651 > > Reviewed by: thj, emaste > > Approved by: thj > > Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h") > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D53909 > > --- > > sys/dev/acpica/acpi.c | 39 ++++++++++++++++++++++++--------------- > > 1 file changed, 24 insertions(+), 15 deletions(-) > > > > diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c > > index e3ff4f6937d2..99dd817f9158 100644 > > --- a/sys/dev/acpica/acpi.c > > +++ b/sys/dev/acpica/acpi.c > > @@ -4318,13 +4318,15 @@ acpi_sname_to_sstate(const char *sname) > > { > > int sstate; > > > > + if (strcasecmp(sname, "NONE") == 0) > > + return (ACPI_STATE_UNKNOWN); > > + > > if (toupper(sname[0]) == 'S') { > > sstate = sname[1] - '0'; > > if (sstate >= ACPI_STATE_S0 && sstate <= ACPI_STATE_S5 && > > sname[2] == '\0') > > return (sstate); > > - } else if (strcasecmp(sname, "NONE") == 0) > > - return (ACPI_STATE_UNKNOWN); > > + } > > return (-1); > > } > > > > @@ -4379,8 +4381,10 @@ acpi_suspend_state_sysctl(SYSCTL_HANDLER_ARGS) > > if (new_sstate < 0) > > return (EINVAL); > > new_stype = acpi_sstate_to_stype(new_sstate); > > - if (acpi_supported_stypes[new_stype] == false) > > + if (new_sstate != ACPI_STATE_UNKNOWN && > > + acpi_supported_stypes[new_stype] == false) > > return (EOPNOTSUPP); > > + > > if (new_stype != old_stype) > > power_suspend_stype = new_stype; > > return (err); > > @@ -4423,21 +4427,26 @@ acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) > > if (err != 0 || req->newptr == NULL) > > return (err); > > > > - new_stype = power_name_to_stype(name); > > - if (new_stype == POWER_STYPE_UNKNOWN) { > > - sstate = acpi_sname_to_sstate(name); > > - if (sstate < 0) > > - return (EINVAL); > > - printf("warning: this sysctl expects a sleep type, but an ACPI S-state has " > > - "been passed to it. This functionality is deprecated; see acpi(4).\n"); > > - if (sstate < ACPI_S_STATE_COUNT && > > - !acpi_supported_sstates[sstate]) > > + if (strcasecmp(name, "NONE") == 0) { > > + new_stype = POWER_STYPE_UNKNOWN; > > + } else { > > + new_stype = power_name_to_stype(name); > > + if (new_stype == POWER_STYPE_UNKNOWN) { > > + sstate = acpi_sname_to_sstate(name); > > + if (sstate < 0) > > + return (EINVAL); > > + printf("warning: this sysctl expects a sleep type, but an ACPI " > > + "S-state has been passed to it. This functionality is " > > + "deprecated; see acpi(4).\n"); > > + MPASS(sstate < ACPI_S_STATE_COUNT); > > + if (acpi_supported_sstates[sstate] == false) > > + return (EOPNOTSUPP); > > + new_stype = acpi_sstate_to_stype(sstate); > > + } > > + if (acpi_supported_stypes[new_stype] == false) > > return (EOPNOTSUPP); > > - new_stype = acpi_sstate_to_stype(sstate); > > } > > > > - if (acpi_supported_stypes[new_stype] == false) > > - return (EOPNOTSUPP); > > if (new_stype != old_stype) > > *(enum power_stype *)oidp->oid_arg1 = new_stype; > > return (0); > > > > Since this commit I have the warning printed as I have the > hw.acpi.lid_switch_state set to 'S3' in sysctl.conf, the man page says > it's correct. Changing it to 'standby' doesn't work as the value isn't > recognized. > What is the correct way for this sysctl now ? > > Cheers, Ok so the correct value is 's2mem' but this doesn't seems to be documented anywhere in acpi(4) like the warning says. -- Emmanuel Vadot From nobody Thu Jan 8 13:52:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn5ts6KXgz6B5Qf for ; Thu, 08 Jan 2026 13:52: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn5ts3zY6z3KPf for ; Thu, 08 Jan 2026 13:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767880341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNxvODU3Cd5GjKA8mRjNNNYmrB772he6kXyEnvWJOaQ=; b=mKRDira9nAlwT5ZpSJgBy/h3re0xZvY2FzP2pj3xBAsHdKE+iTU/KnkruAioSZvNpZM8lu tbZjW9wpw82ibeBiXyP44JsUVI97LSSXqfqvGev4+S0HgvkNfIgrzmd+NTZMxT4jNNWcUX VrT7iS9fOpMDR0byJMYPEbirmfGYYI7Sqm6sH/ZWldAQ4jaDVrkUyUyC4mQ8qnTpxnde+F 5k3IARKAyMhbeQNUevPR2RPFtr2uP+YFraQpCkj5uLHfZQNhKKzdctwWBSt6jlQ29Hrxqc EYjPF8KN3BMi73mBXU4y4Qmk7nAXtIkNLJb+unlkyJdE/v2nd6IdNUx+JBNsWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767880341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNxvODU3Cd5GjKA8mRjNNNYmrB772he6kXyEnvWJOaQ=; b=lOhsUvJwajoTmgQD3JBJ3UCibK+4aURgxYtNgMMFKWTQl0YoPWmlnT9le7lDlrWITmaeIh iqvh6bzwQoFXkkHg7q691MykNqJrjTNRjun7uiYfeFnApkawMjY5Y+LYUPTUmLbRz8+Fsa G7bVn734GmF/9ChhqZ8BOYABEdh/kjg8sGAXbQkBHDp6s6tGS01WNYT3dNu8et49Y/C/Hg tHMUsMWJGbxbZ6XXQJVrFYa8uPQJ4rGFlbPdpeJVOPIn/R8RvvA47rKqHvLo5yukKNhAge 1cAgLZPssMzb4IOklDi07cVhJw8Jim9cjo79O4dXGixp9fpXi7Y/OPZM5s2Fug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767880341; a=rsa-sha256; cv=none; b=PLESq+Jc0OiSqwcgJPsdY60zGh+fi9iRKbxumep5wntUQiw1g6ZsAgAhnYHqFhiRcjcwga aFO0ng6Kb5m9y3WoImCtsPx8lRqTKFlRdBS5gainH1T8Q6jU6MhBBy/1BgKLXDGwRcFW3X oCSBw9p/+orVAODelABBFZPwKTP1BEfwnWh8wgvq4rr9YgVy8RJTn3z5FbQcIOHrmC1ygg qiLWjnHv/OfKEa6UpWIe8a+Xt8xuZLF8u0yUD2nKu3frzHhjKip1+yi9cOLR82lA0TwdTn WGr5720fPGksoAhpYOphK6Rt3EX7aH3vWR+Oo296b/nL/VXG0vS85WW4Ler5ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn5ts3WvlzhHV for ; Thu, 08 Jan 2026 13:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43e55 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 13:52:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: b72cb305899e - main - bnxt: fix i2c read to allow access to different addresses List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b72cb305899ed30daf103b92818c199ccfc52378 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 13:52:21 +0000 Message-Id: <695fb695.43e55.28ce6460@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=b72cb305899ed30daf103b92818c199ccfc52378 commit b72cb305899ed30daf103b92818c199ccfc52378 Author: Andrew Gallatin AuthorDate: 2026-01-08 13:49:38 +0000 Commit: Andrew Gallatin CommitDate: 2026-01-08 13:52:01 +0000 bnxt: fix i2c read to allow access to different addresses Allow reading of i2c addresses other than A0. A0 does provide most information, but doesn't provide things like module temps, and optical signal levels. Sponsored by: Netflix Reviewed by: sumit.saxena_broadcom.com Differential Revision: https://reviews.freebsd.org/D54590 MFC after: 3 days --- sys/dev/bnxt/bnxt_en/if_bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 471e26a4b252..fa37d04e0884 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -4295,7 +4295,7 @@ bnxt_i2c_req(if_ctx_t ctx, struct ifi2creq *i2c) return -EOPNOTSUPP; - rc = bnxt_read_sfp_module_eeprom_info(softc, I2C_DEV_ADDR_A0, 0, 0, 0, + rc = bnxt_read_sfp_module_eeprom_info(softc, i2c->dev_addr, 0, 0, 0, i2c->offset, i2c->len, data); return rc; From nobody Thu Jan 8 14:01:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn65r47tLz6B61K for ; Thu, 08 Jan 2026 14:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn65r1pmYz3Ksy for ; Thu, 08 Jan 2026 14:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767880912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXjPBrQb/CIGHz6i8SVBb5k4GW2+GqZ3AKwL/INzA24=; b=M5khyE2L71Jd86rtucx0CEqfg6Yc77HI7qSqpo3EjXP/3djHkQFu2LyfaZUtXVJe1bnW8e WcKiwyDFcZmQlQeNUZUoGoHyfdj5wYG6S3WFSrpC9OcTk3+nep4S024r9Q5zx15k00bLND GPNd6HsFVt6mHzTWrO3tGweVKAfNXSTAlSIr94kWghPXNlds+pid9MvnaepTkG3Eep5z6T l9ufu+K4PNG4qMOaaPxTpfOejo1pggTXLoYyOAWRRMc2GR09kWA/xFf+FJ0GUUDj34iI/R 9bccuQazunwWWTTT8yvuWi1fIZIc3Gm4efF6QXQGF3Vl+bzNzl9ZTcsJSCFK/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767880912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXjPBrQb/CIGHz6i8SVBb5k4GW2+GqZ3AKwL/INzA24=; b=NlBmpJ75LB8UJppFHco3HGKZfYyAwrpjWZhRB2ti50C/AHIcSGF7PUbhBGQ+3adVrUwa7d iit2exYYL6khgoZmGcJkPvWobVtZcCIgNrgoreiwVvW1cs1CxPl8S7j013o2uFEqQVNaIk OV9dYfMuENYbZ/TshsRWNfUVfKAH/hp7DL7OPKePiZXJYxnBedbbrvgJf+70LcXW7rz5Md YgKCxH2q61+vseWUrTj8AKVyBHj1LogEWbacMFQbHhYsFN8heuhCSefxOCg7AfXlXyuDa2 /YXacKgzIwR0lHbRrfuFMkNewgBBze5hqCPrS4DPaXWPFm9ji7oCXmMMPsMxbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767880912; a=rsa-sha256; cv=none; b=exeWjU5VzgYhsWFD1Mr54+NlBHxrxox2kGAtV9se+DQMZyMizDtiZ5GrOnSSaNb7HeHBCX e5OM14dXLL6xQeIUMWJGoP0flOykkJzErRXZWhBL+lvy7jSdImsk/loo2xDV4v1TGi2cHy d6MVyHSdir0WPZlAycfLPEZdJz1SJWwnakraoFHitxK27j1LO4w2flABl7feTT8Y8X/0QB uARR/tVr/ZfcrYXeWcuGiDus3pyBhoVJef1PEP+PGCmJnvcStpi1MfIY6oQOwmApEKGbBq fWp9Y+NFWyWiMQUkhYzBor3pRKi+ingY6VejRjo4VomO0pcdH2odHftaVSBXyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn65r1M6HzhyM for ; Thu, 08 Jan 2026 14:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44a3e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 14:01:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Alexander Ziaee Subject: git: d2f1c8e0d1be - main - Makefile: Update doxygen requirements List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2f1c8e0d1bebab9fba32d69d261abc101f368ba Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 14:01:52 +0000 Message-Id: <695fb8d0.44a3e.55c80d6@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=d2f1c8e0d1bebab9fba32d69d261abc101f368ba commit d2f1c8e0d1bebab9fba32d69d261abc101f368ba Author: Minsoo Choo AuthorDate: 2026-01-06 18:11:11 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-08 14:01:03 +0000 Makefile: Update doxygen requirements MFC after: 3 days Reviewed by: imp, ziaee Signed-off-by: Minsoo Choo Closes: https://github.com/freebsd/freebsd-src/pull/1869 --- Makefile | 4 ++-- Makefile.inc1 | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5f27f22d7a3f..da4bac4673fa 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ # kernel - buildkernel + installkernel. # kernel-toolchain - Builds the subset of world necessary to build a kernel # kernel-toolchains - Build kernel-toolchain for all universe targets. -# doxygen - Build API documentation of the kernel, needs doxygen. +# doxygen - Build API documentation of the kernel, needs doxygen, TeX, and graphviz. # checkworld - Run test suite on installed world. # check-old - List obsolete directories/files/libraries. # check-old-dirs - List obsolete directories. @@ -804,7 +804,7 @@ universe_epilogue: .PHONY .MAKE.MODE= normal # Normally the things we run from here don't either. # Using -DWITH_META_MODE -# we can buildworld with meta files created which are useful +# we can buildworld with meta files created which are useful # for debugging, but without any of the rest of a meta mode build. MK_DIRDEPS_BUILD= no MK_STAGING= no diff --git a/Makefile.inc1 b/Makefile.inc1 index 5005e4e0acc7..8b920c1dc571 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2464,6 +2464,14 @@ doxygen: .PHONY echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi + @if [ ! -x "${LOCALBASE}/bin/tex" ]; then \ + echo "You need TeX (print/texlive-full) to generate the API documentation of the kernel." | /usr/bin/fmt; \ + exit 1; \ + fi + @if [ ! -x "${LOCALBASE}/bin/dot" ]; then \ + echo "You need graphviz (graphics/graphviz) to generate the API documentation of the kernel." | /usr/bin/fmt; \ + exit 1; \ + fi ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys; ${MAKE} obj all # From nobody Thu Jan 8 15:02:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn7RG0wlDz6GN9m for ; Thu, 08 Jan 2026 15:02: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn7RF5SXRz3Rjx for ; Thu, 08 Jan 2026 15:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767884521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=We/kElUcbZQ87dk5PTWfSyOSGL0Z09k4UFsznca4I04=; b=gNv3/dUZDhEkWKAOOogzvONZb9GmunP94p/QS7dP/QrsDY3Y0Kz3OrDfs2vMtWZcnkX1sl eCGsZqLBcs745PfK2RCxeiu15ziWLuC5brb6ESQ5KFx3OniqXn8Lziln7UyX73TLEkZVNT c/McZ1dspolLegEgYIYjJGjX2613g2O16Cw4AkNUh0TLLQCujVq6NJ5Hv6RTcFVWSQ/XoK 1zdK9U3YI8iu5vLaJ/Kt2Uym7d0PAYGLmdYzvtSpLJug/QiTsI4pi65/pQ47TRp1NlgVr1 rnEi8YmrLIO+Ni63RKL9w23ht/5yLjjXRyN/rNqc3TLdTZbgy/gjmI8GqZfXkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767884521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=We/kElUcbZQ87dk5PTWfSyOSGL0Z09k4UFsznca4I04=; b=RL+cOLywvIEcLsQGjBks1SWdniYHpLO8WUEoFyaC7XbSXIXgC2aid+zxUxEfJdsnTdCye2 SKR0hwA4m/ksBvm4pBQHPRvUaV4OWXYPVa89z8y9ZGajvr0cYr/bMzz/MXzms7uPxdoDH5 FHsNh7JgeEB7+pOBw8WcgC6RbQ8Rhz0/h34z3nZqpGEng/jSz1R3mrc5zHCnywqXMgvzpj VyH5kzPx7aZZKgY1hCMNtDjRhV8q45HMZIpj6ckbztcY1CUHVrwTT2k+dIlUwvrhWbg6pK MoTBFWkkxwq8CznKeWl+BW8Q7evgpdjuDX+T77Ygx+CStgViN8zX84XUtX86+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767884521; a=rsa-sha256; cv=none; b=UyuAUwYo2pFYqwTIhBNCemcZGHudTgZAOPh7tOn5Oh/LwoGwudQ13Zov9vG98jVIiL0xy7 Tc3XsfJnxirADel/zV9sTLUhtPMt5QMdAIkeSG6FXfEfIH2ty7oVVQW1u/tfOLrL4FEYaM lZ7TnDg1+/oqQ8IHMsHjBr0P9j1gBnFq7oFb5WKjgS8/YB+/oazoDsrDW47AHcPRasZlAL e0zgZmABGuolBrFVWF/6j0fa+banflKdgAod+gfb/1jVJ2VZGd1h9olggbKcVj6UKE2dXa HCiy5K61N4UPnBaEdfeVoBYPW/R0aTfWK6yRgHI0Vs+ITnE+y+Bgi4+JACIseQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn7RF2pPSzkVL for ; Thu, 08 Jan 2026 15:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b70a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 15:02:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 16f8ea6a81b5 - main - amd64: Remove tpm(4) from GENERIC for now List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16f8ea6a81b59a82d8c27c6b3aa380617485bfd2 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 15:02:01 +0000 Message-Id: <695fc6e9.b70a.2b548eea@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=16f8ea6a81b59a82d8c27c6b3aa380617485bfd2 commit 16f8ea6a81b59a82d8c27c6b3aa380617485bfd2 Author: Mark Johnston AuthorDate: 2026-01-08 14:54:15 +0000 Commit: Mark Johnston CommitDate: 2026-01-08 14:54:15 +0000 amd64: Remove tpm(4) from GENERIC for now It breaks suspend/resume and no one has had time to investigate and fix it. PR: 291067 Reviewed by: emaste Fixes: 3deb21f1afd5 ("random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM") Differential Revision: https://reviews.freebsd.org/D54587 --- sys/amd64/conf/GENERIC | 3 ++- sys/amd64/conf/MINIMAL | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index ef7ce215474e..38b6dccb3579 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -324,7 +324,8 @@ device bpf # Berkeley packet filter # random(4) device rdrand_rng # Intel Bull Mountain RNG -device tpm # Trusted Platform Module +# Disabled for now since tpm(4) breaks suspend/resume. +#device tpm # Trusted Platform Module options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 options RANDOM_ENABLE_KBD options RANDOM_ENABLE_MOUSE diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 8df3349b4c34..9f80fe2f42d5 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -122,7 +122,8 @@ device bpf # Berkeley packet filter # random(4) device rdrand_rng # Intel Bull Mountain RNG -device tpm # Trusted Platform Module +# Disabled for now since tpm(4) breaks suspend/resume. +#device tpm # Trusted Platform Module options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0 options RANDOM_ENABLE_KBD options RANDOM_ENABLE_MOUSE From nobody Thu Jan 8 16:06:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn8sD304qz6GRfj for ; Thu, 08 Jan 2026 16:06: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn8sD0qdDz3Zjn for ; Thu, 08 Jan 2026 16:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767888368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GqZz/UDiaxLq8eepignS+VRqDSoWO4IDLfBtviRLf4Q=; b=FqFRmct1eEucraireU5T4018fgoEUwsoEtiT5goJ+tkfWU+UIUUrC9I6fRNmpEbwxCi75Q P+OlSscVALgW98sSn0RUVFTmdXXcfImv5CKNRePDxIhXqK8snSphedKJDL+MwjMrYVyrf3 OdfQMLApXDF8iXf1A9cvaX2hbg86PK8ZQS7nhagu/QhtLEkphSNBJevKSB8lidRsGFu2WO pKne42jNwzey3EvOzRK2Jo30Qhl7X0xJVDXx6M9c5wM6rmrVxp12mQuxT2554dtVBnt+e4 HYlupJwdVocXqe5LSeRebeV6J5phvNsm0kQG2dU9Nv6QeEPMlG97jRdzaOcAuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767888368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GqZz/UDiaxLq8eepignS+VRqDSoWO4IDLfBtviRLf4Q=; b=xo/k+uaZvBDRuDWYxnR7DYpE/d0Ff7kBDe6RDR1tqOHHqW6LzVLXEdp9SY4hpuvSCfoYKL U8Sd8yqe8qKUFLdcuh6zoTGqZ2zabL8DkOQ86Ui9dIZ0Tl4gB98F6MLyq6X72EXj7pV9R7 XjeUZh4woXB2IgAEBoDZxgj4jpS8Usx80K28XKz9duZtSb7Rm55NSsHyMVAEj1WxkappF8 i/ea3v5j0P0oo/EOeYWOy1aZ2baHdVJDfT0K8lL1hroxvPj7mV7lRDWO/wRPV01z//OOjf nX4cEZVHnUlnI+5gaNeGvVVzAJQV9R3do67zg4Haes/2BaQGfOkmxJ6vmfXqbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767888368; a=rsa-sha256; cv=none; b=S9GYwLLt2oJClkE+exAA7zqjwUlafbZAMFBV40F8tAxDjNAvwVl2ZCLkITe+uAGWU6xpj2 aV2O/LLHUgjCHAQmdh+nLXO5TbnFcOvxWHOssvvdv26lvu/mZx7WA3haW6aIW1JmjqTIyg khSsOwURnSVfrIpC2qsCeZBfMlhbwu2mL57nPJBgrn453Dy4GEQWid+gBBnfbEwic1yv+P dEkCFB/NOZPOUvaDSjUsflotw3R9aNckiFtit4ZxifRNP4owwXI091Zg5opestgeJMzM7A Nv64IMG78Y5avrqM5U9P5/N9XmbVu4LInNzWy+5zBRhyl+deKScvycW0xXoYOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn8sC6FpYzls3 for ; Thu, 08 Jan 2026 16:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2179f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 16:06:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Quent=?utf-8?Q?in Th=C3=A9?=bault From: Mark Johnston Subject: git: cbc6f7e941e4 - main - bhyve: add UNIX domain socket support to rfb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbc6f7e941e42639a0314cd121b06493cce8e0e6 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 16:06:07 +0000 Message-Id: <695fd5ef.2179f.71e9bb42@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cbc6f7e941e42639a0314cd121b06493cce8e0e6 commit cbc6f7e941e42639a0314cd121b06493cce8e0e6 Author: Quentin Thébault AuthorDate: 2025-11-18 06:44:05 +0000 Commit: Mark Johnston CommitDate: 2026-01-08 15:24:52 +0000 bhyve: add UNIX domain socket support to rfb This commit adds support for a UNIX domain socket to bhyve's remote framebuffer. It enables the use of the graphical console when the bhyve instance is running in a jail with no networking, for instance. A VNC client running on the host can then connect to the UNIX domain socket through the filesystem. Signed-off-by: Quentin Thébault Sponsored by: Defenso Reviewed by: kevans, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53814 --- usr.sbin/bhyve/bhyve.8 | 12 +++++++---- usr.sbin/bhyve/bhyve_config.5 | 7 ++++++- usr.sbin/bhyve/pci_fbuf.c | 22 ++++++++++++++++++- usr.sbin/bhyve/rfb.c | 49 +++++++++++++++++++++++++++++++------------ usr.sbin/bhyve/rfb.h | 4 +++- 5 files changed, 74 insertions(+), 20 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index d3b067509ced..496539f30885 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -891,7 +891,7 @@ to guest by VirtIO Input Interface. .Bl -bullet .Sm off .It -.Op Cm rfb= Ar ip-and-port +.Op Cm rfb= Ar address .Op Cm ,w= Ar width .Op Cm ,h= Ar height .Op Cm ,vga= Ar vgaconf @@ -902,9 +902,9 @@ to guest by VirtIO Input Interface. .Pp Configuration options are defined as follows: .Bl -tag -width 10n -.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port -An IP address and a port VNC should listen on. -There are two formats: +.It Cm rfb= Ns Ar address Pq or Cm tcp= Ns Ar address +A UNIX domain socket or IP address and a port VNC should listen on. +There are three possible formats: .Pp .Bl -bullet -compact .It @@ -916,6 +916,10 @@ There are two formats: .Sm off .Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port .Sm on +.It +.Sm off +.Cm unix: Ar my/unix.sock +.Sm on .El .Pp The default is to listen on localhost IPv4 address and default VNC port 5900. diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 4ead94690d91..429ce3e38138 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -523,7 +523,7 @@ the device name. If specified, it must be a unicast MAC address. .El .Ss Frame Buffer Settings -.Bl -column "password" "[IP:]port" "127.0.0.1:5900" +.Bl -column "password" "unix:my/unix.sock" "127.0.0.1:5900" .It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description .It Va wait Ta bool Ta false Ta Wait for a remote connection before starting the VM. @@ -535,6 +535,11 @@ support scoped identifiers as described in .Xr getaddrinfo 3 . A bare port number may be given in which case the IPv4 localhost address is used. +.It Va rfb Ta +.Sm off +.Cm unix: Ar my/unix.sock Ta Ta +.Sm on +Alternatively, provide a path to a UNIX domain socket. .It Va vga Ta string Ta io Ta VGA configuration. More details are provided in diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index 1e3ec77c15b0..560c2bc839d6 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -28,6 +28,8 @@ #include #include +#include +#include #include #include @@ -94,6 +96,7 @@ struct pci_fbuf_softc { } __packed memregs; /* rfb server */ + sa_family_t rfb_family; char *rfb_host; char *rfb_password; int rfb_port; @@ -252,11 +255,13 @@ pci_fbuf_parse_config(struct pci_fbuf_softc *sc, nvlist_t *nvl) value = get_config_value_node(nvl, "tcp"); if (value != NULL) { /* + * UNIX -- unix:path/to/socket.sock * IPv4 -- host-ip:port * IPv6 -- [host-ip%zone]:port * XXX for now port is mandatory for IPv4. */ if (value[0] == '[') { + sc->rfb_family = AF_INET6; cp = strchr(value + 1, ']'); if (cp == NULL || cp == value + 1) { EPRINTLN("fbuf: Invalid IPv6 address: \"%s\"", @@ -279,7 +284,21 @@ pci_fbuf_parse_config(struct pci_fbuf_softc *sc, nvlist_t *nvl) value); return (-1); } + } else if (strncmp("unix:", value, 5) == 0) { + if (strlen(value + 5) > SUNPATHLEN) { + EPRINTLN( + "fbuf: UNIX socket path too long: \"%s\"", + value + 5); + return (-1); + } else if (*(value + 5) == '\0') { + EPRINTLN("fbuf: UNIX socket path is empty"); + return (-1); + } else { + sc->rfb_family = AF_UNIX; + sc->rfb_host = strdup(value + 5); + } } else { + sc->rfb_family = AF_UNSPEC; cp = strchr(value, ':'); if (cp == NULL) { sc->rfb_port = atoi(value); @@ -433,7 +452,8 @@ pci_fbuf_init(struct pci_devinst *pi, nvlist_t *nvl) memset((void *)sc->fb_base, 0, FB_SIZE); - error = rfb_init(sc->rfb_host, sc->rfb_port, sc->rfb_wait, sc->rfb_password); + error = rfb_init(sc->rfb_family, sc->rfb_host, sc->rfb_port, + sc->rfb_wait, sc->rfb_password); done: if (error) free(sc); diff --git a/usr.sbin/bhyve/rfb.c b/usr.sbin/bhyve/rfb.c index 716e191e2fc0..aeaf8d1c0639 100644 --- a/usr.sbin/bhyve/rfb.c +++ b/usr.sbin/bhyve/rfb.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -1254,13 +1255,15 @@ sse42_supported(void) } int -rfb_init(const char *hostname, int port, int wait, const char *password) +rfb_init(sa_family_t family, const char *hostname, int port, int wait, + const char *password) { int e; char servname[6]; struct rfb_softc *rc; struct addrinfo *ai = NULL; struct addrinfo hints; + struct sockaddr_un sun; int on = 1; int cnt; #ifndef WITHOUT_CAPSICUM @@ -1301,25 +1304,42 @@ rfb_init(const char *hostname, int port, int wait, const char *password) hostname = "[::1]"; #endif - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV | AI_PASSIVE; - - if ((e = getaddrinfo(hostname, servname, &hints, &ai)) != 0) { - EPRINTLN("getaddrinfo: %s", gai_strerror(e)); - goto error; + if (family == AF_UNIX) { + memset(&sun, 0, sizeof(sun)); + sun.sun_family = AF_UNIX; + if (strlcpy(sun.sun_path, hostname, sizeof(sun.sun_path)) >= + sizeof(sun.sun_path)) { + EPRINTLN("rfb: socket path too long"); + goto error; + } + rc->sfd = socket(AF_UNIX, SOCK_STREAM, 0); + } else { + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = family; + hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV | AI_PASSIVE; + + if ((e = getaddrinfo(hostname, servname, &hints, &ai)) != 0) { + EPRINTLN("getaddrinfo: %s", gai_strerror(e)); + goto error; + } + rc->sfd = socket(ai->ai_family, ai->ai_socktype, 0); } - rc->sfd = socket(ai->ai_family, ai->ai_socktype, 0); if (rc->sfd < 0) { perror("socket"); goto error; } + /* No effect for UNIX domain sockets. */ setsockopt(rc->sfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); - if (bind(rc->sfd, ai->ai_addr, ai->ai_addrlen) < 0) { + if (family == AF_UNIX) { + unlink(hostname); + e = bind(rc->sfd, (struct sockaddr *)&sun, SUN_LEN(&sun)); + } else + e = bind(rc->sfd, ai->ai_addr, ai->ai_addrlen); + if (e < 0) { perror("bind"); goto error; } @@ -1355,14 +1375,17 @@ rfb_init(const char *hostname, int port, int wait, const char *password) DPRINTF(("rfb client connected")); } - freeaddrinfo(ai); + if (family != AF_UNIX) + freeaddrinfo(ai); return (0); error: if (rc->pixfmt_mtx) pthread_mutex_destroy(&rc->pixfmt_mtx); - if (ai != NULL) + if (ai != NULL) { + assert(family != AF_UNIX); freeaddrinfo(ai); + } if (rc->sfd != -1) close(rc->sfd); free(rc->crc); diff --git a/usr.sbin/bhyve/rfb.h b/usr.sbin/bhyve/rfb.h index 347ced083a22..c11d40f031af 100644 --- a/usr.sbin/bhyve/rfb.h +++ b/usr.sbin/bhyve/rfb.h @@ -29,9 +29,11 @@ #ifndef _RFB_H_ #define _RFB_H_ +#include + #define RFB_PORT 5900 -int rfb_init(const char *hostname, int port, int wait, +int rfb_init(sa_family_t family, const char *hostname, int port, int wait, const char *password); #endif /* _RFB_H_ */ From nobody Thu Jan 8 16:17:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dn96468mYz6GSCq for ; Thu, 08 Jan 2026 16:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dn96456Zzz3cQd for ; Thu, 08 Jan 2026 16:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767889036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GQq6gFZliL5MbotOF9XQZsvBNziiV6TK+tN4EZ2S04=; b=UbO+huGT+N/oT5sptsshinb2LO5LAvxgHKyCtHhHL29DKOBync5KRIQrBMy7WN0QHQ8zmy n66Nf+Fuox2nDVZXZBlmJK9gAV9PnjU87GEzewY+WPfbkltbD54RPZq2f7vAjBnDG/BXIS DxxbGwbzoFkm40Jfo/e8pUXMr1Qg63Q8F0HR3j+ejaC5ZV9zWPjF0SsBei7Kv9lSXk+iUO wxRNRvYq+6ml8PmwTDunETxiVGnfDU4HoxdnFNUPUjc0ZTn7we6SOE4ILJPqLity+cFcHl xytASQKtU2KV+raaOHVPsxH9VZAdrTtuQtfzR/zqVzLEW3gYrEcgZfelWqCMJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767889036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GQq6gFZliL5MbotOF9XQZsvBNziiV6TK+tN4EZ2S04=; b=caPh+LtqbkU+vPVLMHWJUJMmrpu0dGtmXUjMcUQ0gcSHkeudgdU/04vA071qYxq4nV1Wtd ABZCvKT+ykJ72rYduDQakl5Y2IJ0GftBTOBWh9mlPdBftaD5U9cp2GQCdL8gWpbHRry7nd 968USxkuRLtZX/u4cj6/ZrGiumRetw03u1++M6gB2D2+7/A5gkAuyXEVut9AahX5+ecS2e lS9i3l31azvINLJaF74Xg/LwVAwdFpNkG3hGdNGBzKbyXZLSuRQRHUtbgkl1/AotUf13lP hTLGY4celX6j4LCtVaIcEHatHZ1i4IMr87ZIqW3bvxpXJSIbP7kOZpwjaA+Ttg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767889036; a=rsa-sha256; cv=none; b=ZZjf52n/KjJSeanoi12IP7SOeZfGG+Q/I7rMhEXGfPcXkjguUVdsKr9n2YejNAYIa5TLRS AAs/UiAO9PMDyMRIAvBc/bJDFWJ0TuGzq4k1T97QiZXjdEKV2Xeqy8kHcjhT4fV/QcvXO/ 486LJY5mtOF+08RhuPmDPVId6esuMNemfz80ivglDwApAax6iPrL2IcvJnFuii/Yccf/x5 rLO4Talmowag68rp+umEvZFHXZIqO178sIbx+AaGANZx1BudPKgA5BGGiVhFRtC7gKpc1Y 7xK0CsSW1BAuM5cNL3obrRb6hG6W2r06rk6ZKBZWIHJ6LT0mLia/z8mP/qsyoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dn9644dqSzlZr for ; Thu, 08 Jan 2026 16:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22a63 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 16:17:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Johan=?utf-8?Q? S=C3=B6llv?=ander Subject: git: bf98d6775d7f - main - sesutil: Remove width modifier on encoded "Desc" field List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: js X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf98d6775d7f18c3596b7d3423db0cc11232bd64 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 16:17:16 +0000 Message-Id: <695fd88c.22a63.7e843575@gitrepo.freebsd.org> The branch main has been updated by js: URL: https://cgit.FreeBSD.org/src/commit/?id=bf98d6775d7f18c3596b7d3423db0cc11232bd64 commit bf98d6775d7f18c3596b7d3423db0cc11232bd64 Author: Johan Söllvander AuthorDate: 2026-01-08 16:15:54 +0000 Commit: Johan Söllvander CommitDate: 2026-01-08 16:15:54 +0000 sesutil: Remove width modifier on encoded "Desc" field Remove the width modifier to remove white space padding added to "description" field when running `sesutil --libxo:JP show`. Reviewed by: asomers Approved by: asomers (mentor) MFC after: 1w Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D54536 --- usr.sbin/sesutil/sesutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/sesutil/sesutil.c b/usr.sbin/sesutil/sesutil.c index 1fedaab39a64..feba0c5a3acb 100644 --- a/usr.sbin/sesutil/sesutil.c +++ b/usr.sbin/sesutil/sesutil.c @@ -650,7 +650,7 @@ show_device(int fd, int elm_idx, encioc_elm_status_t e_status, encioc_elm_desc_t xo_open_instance("elements"); xo_emit("{e:type/device_slot}"); xo_emit("{d:description/%-15s} ", e_desc.elm_desc_len > 0 ? e_desc.elm_desc_str : "-"); - xo_emit("{e:description/%-15s}", e_desc.elm_desc_len > 0 ? e_desc.elm_desc_str : ""); + xo_emit("{e:description/%s}", e_desc.elm_desc_len > 0 ? e_desc.elm_desc_str : ""); xo_emit("{d:device_names/%-7s} ", e_devname.elm_names_len > 0 ? e_devname.elm_devnames : "-"); xo_emit("{e:device_names/%s}", e_devname.elm_names_len > 0 ? e_devname.elm_devnames : ""); xo_emit("{d:model/%-25s} ", model ? model : "-"); From nobody Thu Jan 8 17:09:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnBGV1Wm6z6GWZw for ; Thu, 08 Jan 2026 17:09: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnBGV0mWnz3hYF for ; Thu, 08 Jan 2026 17:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfoLJYED1TJjXqlcYGy7awxZp2AVaWR8yRlJI+nOlrY=; b=x/O//GCnDKudie1DeaHw4oQaZ2JihdfjT2mU1pFVQQqmCl+y77VdRKzbGSAUTNdRacMNNK kS4TxJUZl0jW9yTCkRWkU4rgyR5PMywgAM7p3Oix5ad44heVuR48NKrYSvuuJBASqsdZ0u p7kCNXK8dPsSIKXDls/xXnXJns1ZvrfGQ5R+Csd8BU1Ws5wENkOHhDuMuk2mbkjDXTnEjh mGCBOE/piGOqlTc1KYwN/fzjMMMYmyeWuff65A1CbdC7v6E7ceLRoM/fq+UiPAa8qhMfTa J7qO9IM+Cj9juB8VCiF8ItGdW2aC8XuoCjRET5Wqh4cYPVibZbdlg3WzEY/Y+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfoLJYED1TJjXqlcYGy7awxZp2AVaWR8yRlJI+nOlrY=; b=SXFomQE+i0YYkKMlrT1gKqdnJA3iT7XcR6HMNiuYQrx3jpMkSpPcfoPxKPA9NO9iDdi0OL UJXNDK0hkglX2/cSdc1ouoHDINhzxn59RrK27dHv6qV3F77lRwDzvc3qvs8X8UGcdET06P B3ha3cWKsilciQNsZpXC8R86jix4DqPGGWLgD+4hcO59/HtOWNPftDS56RmR12Z9tjcBnE 6Vm+843U7iZwdwAqm0PRQgzvlhoUaoSDjGVV+AIsfTL1h/j4KiGuQiPE0HEqyQgphWoBTP 5WkUPhN6koTs33VWdGekXjY0YmlGv2fQsOwVxRcaqZ6Ortlbze4P6qiv12vwag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767892178; a=rsa-sha256; cv=none; b=vZ5O7wZQnJBdFyu7kalYEv4c/ITB4hO7AlDRoc90RPhBO0m2ycnQk+DiW5UOEfLzFVSuJv VnBGTIHPG+TKlBzDFd513p9rDrGgmFL3Jd1uvI9aiDsuo5TZQ0LVeOAi0udk+bNcLz/o6U 0dBwFFQmkra7v+vnMyrHoUKbNM7pSAMyTMWr6jX4sIqC4RUgSOr98NaIfgsy77dKVoVbRC qoy0SbpwptiMYjWPnAdhV+2jhZ0pKGHn1dEjusfxSFU11LnTEL4339M/pMLTfkMuITjpQ1 H3t0NvR6SEsljOyJriGF+j93tZP1vscEjjqJlA3bRy9eQawdvBychcXKs3P5OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnBGV05ClznC2 for ; Thu, 08 Jan 2026 17:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d55 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 17:09:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roman Bogorodskiy Subject: git: 90b9a77ebeb8 - main - bhyve: support MTU configuration for SLIRP net backend List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90b9a77ebeb8019fbd22b3cf992370cd9b0004a2 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 17:09:32 +0000 Message-Id: <695fe4cc.26d55.132a22e2@gitrepo.freebsd.org> The branch main has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=90b9a77ebeb8019fbd22b3cf992370cd9b0004a2 commit 90b9a77ebeb8019fbd22b3cf992370cd9b0004a2 Author: Roman Bogorodskiy AuthorDate: 2025-12-08 17:37:09 +0000 Commit: Roman Bogorodskiy CommitDate: 2026-01-08 17:01:13 +0000 bhyve: support MTU configuration for SLIRP net backend Support configuring MTU for the SLIRP net backend, for example: -s 1:0,virtio-net,slirp,mtu=2048,open Update the manual page accordingly. While here, also document MAC address configuration. Reviewed by: markj Approved by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D54133 --- usr.sbin/bhyve/bhyve.8 | 4 +++- usr.sbin/bhyve/net_backend_slirp.c | 35 ++++++++++++++++++++++++++++++----- usr.sbin/bhyve/slirp/slirp-helper.c | 22 ++++++++++++++-------- 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 496539f30885..4c73a119b1ed 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 26, 2025 +.Dd January 5, 2026 .Dt BHYVE 8 .Os .Sh NAME @@ -542,6 +542,8 @@ considered unconnected. .Cm slirp .Op Cm \&,open .Op Cm \&,hostfwd= Ar proto : Ar hostaddr : Ar hostport - Ar guestaddr : Ar guestport +.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx +.Op Cm \&,mtu= Ar N .Xc .El .Sm on diff --git a/usr.sbin/bhyve/net_backend_slirp.c b/usr.sbin/bhyve/net_backend_slirp.c index f2b483c5e314..6084ca31966d 100644 --- a/usr.sbin/bhyve/net_backend_slirp.c +++ b/usr.sbin/bhyve/net_backend_slirp.c @@ -62,15 +62,18 @@ #include "config.h" #include "debug.h" #include "mevent.h" +#include "net_utils.h" #include "net_backends.h" #include "net_backends_priv.h" -#define SLIRP_MTU 2048 +#define DEFAULT_MTU 2048 struct slirp_priv { int s; pid_t helper; struct mevent *mevp; + size_t mtu; + uint8_t *buf; }; extern char **environ; @@ -86,6 +89,8 @@ slirp_init(struct net_backend *be, const char *devname __unused, const char **argv; char sockname[32]; int error, s[2]; + const char *mtu_value; + size_t mtu; if (socketpair(PF_LOCAL, SOCK_SEQPACKET | SOCK_NONBLOCK, 0, s) != 0) { EPRINTLN("socketpair"); @@ -124,6 +129,25 @@ slirp_init(struct net_backend *be, const char *devname __unused, EPRINTLN("nvlist_clone"); goto err; } + + mtu_value = get_config_value_node(config, "mtu"); + if (mtu_value != NULL) { + if (net_parsemtu(mtu_value, &mtu)) { + EPRINTLN("Could not parse MTU"); + goto err; + } + } else { + mtu = DEFAULT_MTU; + } + nvlist_add_number(config, "mtui", mtu); + + priv->mtu = mtu; + priv->buf = malloc(mtu); + if (priv->buf == NULL) { + EPRINTLN("Could not allocate buffer"); + goto err; + } + nvlist_add_string(config, "vmname", get_config_value("name")); error = nvlist_send(s[0], config); nvlist_destroy(config); @@ -146,6 +170,7 @@ slirp_init(struct net_backend *be, const char *devname __unused, return (0); err: + free(priv->buf); (void)close(s[0]); (void)close(s[1]); return (-1); @@ -168,6 +193,8 @@ slirp_cleanup(struct net_backend *be) { struct slirp_priv *priv = NET_BE_PRIV(be); + free(priv->buf); + if (priv->helper > 0) { int status; @@ -184,17 +211,15 @@ static ssize_t slirp_peek_recvlen(struct net_backend *be) { struct slirp_priv *priv = NET_BE_PRIV(be); - uint8_t buf[SLIRP_MTU]; ssize_t n; /* * Copying into the buffer is totally unnecessary, but we don't * implement MSG_TRUNC for SEQPACKET sockets. */ - n = recv(priv->s, buf, sizeof(buf), MSG_PEEK | MSG_DONTWAIT); + n = recv(priv->s, priv->buf, priv->mtu, MSG_PEEK | MSG_DONTWAIT); if (n < 0) return (errno == EWOULDBLOCK ? 0 : -1); - assert((size_t)n <= SLIRP_MTU); return (n); } @@ -218,7 +243,7 @@ slirp_recv(struct net_backend *be, const struct iovec *iov, int iovcnt) return (0); return (-1); } - assert(n <= SLIRP_MTU); + assert((size_t)n <= priv->mtu); return (n); } diff --git a/usr.sbin/bhyve/slirp/slirp-helper.c b/usr.sbin/bhyve/slirp/slirp-helper.c index 9fb9784662fe..36192c590eb1 100644 --- a/usr.sbin/bhyve/slirp/slirp-helper.c +++ b/usr.sbin/bhyve/slirp/slirp-helper.c @@ -38,8 +38,6 @@ #include "config.h" #include "libslirp.h" -#define SLIRP_MTU 2048 - struct slirp_priv { Slirp *slirp; /* libslirp handle */ int sock; /* data and control socket */ @@ -47,6 +45,8 @@ struct slirp_priv { struct pollfd *pollfds; size_t npollfds; size_t lastpollfd; + size_t mtu; + uint8_t *buf; }; typedef int (*slirp_add_hostxfwd_p_t)(Slirp *, @@ -104,7 +104,7 @@ slirp_cb_send_packet(const void *buf, size_t len, void *param) priv = param; - assert(len <= SLIRP_MTU); + assert(len <= priv->mtu); n = send(priv->sock, buf, len, MSG_EOR); if (n < 0) { warn("slirp_cb_send_packet: send"); @@ -289,16 +289,14 @@ slirp_pollfd_loop(struct slirp_priv *priv) ssize_t n; do { - uint8_t buf[SLIRP_MTU]; - - n = recv(priv->sock, buf, sizeof(buf), + n = recv(priv->sock, priv->buf, priv->mtu, MSG_DONTWAIT); if (n < 0) { if (errno == EWOULDBLOCK) break; err(1, "recv"); } - slirp_input_p(priv->slirp, buf, (int)n); + slirp_input_p(priv->slirp, priv->buf, (int)n); } while (n >= 0); } } @@ -464,6 +462,7 @@ main(int argc, char **argv) const char *hostfwd, *vmname; int ch, fd, sd; bool restricted; + size_t mtu; sd = -1; while ((ch = getopt(argc, argv, "S:")) != -1) { @@ -514,6 +513,13 @@ main(int argc, char **argv) config = nvlist_recv(sd, 0); if (config == NULL) err(1, "nvlist_recv"); + + mtu = nvlist_get_number(config, "mtui"); + priv.mtu = mtu; + priv.buf = malloc(mtu); + if (priv.buf == NULL) + err(1, "malloc"); + vmname = get_config_value_node(config, "vmname"); if (vmname != NULL) setproctitle("%s", vmname); @@ -521,7 +527,7 @@ main(int argc, char **argv) slirpconfig = (SlirpConfig){ .version = 4, - .if_mtu = SLIRP_MTU, + .if_mtu = mtu, .restricted = restricted, .in_enabled = true, .vnetwork.s_addr = htonl(0x0a000200), /* 10.0.2.0/24 */ From nobody Thu Jan 8 21:58:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnJgP24sHz6MpqC for ; Thu, 08 Jan 2026 21:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnJgP0vmpz3FhR for ; Thu, 08 Jan 2026 21:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767909489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qp8p+wkg3S1Xbbf19lBTMawLvWgp4HH7g9dQ6pgRJMY=; b=uoK6hTqLpkDaXs7sZYWYkC7Lj1o9dPrnw9F6nTr7CAgubuzd0PHsbs8XzB6YeLXgMziC7v NN+kYfIqD+ng2PqMmYC91OhjtFW5oJHyQzE2nNl/gmCvMFThDVgTa5tt0dTim4Xp4jXIgc yKUdLRUpCG42CD6z4mi3B+vAYArRHoB41L6SYSU8HCQOGXRJ2jLfx0JRz6oPEcauDQuUyj /PQ+9hbGab0xtc0VxVWns7VGC66WnUM8+mbSX6+dT8csR/dv8N8WEy9cNnye2YY7ksq+SO nJJLiufta7hjPJizslbQvm139rlelhjw5/TmIs8W3bwvjb3QxqEFGVncB6ng0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767909489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qp8p+wkg3S1Xbbf19lBTMawLvWgp4HH7g9dQ6pgRJMY=; b=JHMgoFx1mqLda0OSFps34ZTrDtOvDyVJIpx1kniW5W81/FJ6tkpY8VMWakwuZG1A6TBKo6 15Bduhph/Ea9l4W8PSP9KytIVWjEvgzmh78mOpNVYzjfyDdcpRrERCCl7QHK+tzlTiwz4u DAZ/y9lnh6OTqKdjmVBZxJtIFTjPGzJSF1ObWci59UfZHQjcCZkqkHldg17H/KOVpWxISZ +B/IodLJOsEuqNpTZZhJXQ3voY6/4C37SFsyaguHbOVigJ0gT3YwAyqLorqrkQV0EiFg+n wiDbliCSf8zC27T1s8IO57TTJ7BjxHtj0nc6VEbxljzbbqTfAHyeuNfouB4DNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767909489; a=rsa-sha256; cv=none; b=utU0W6mTSay/HAkzGRYsve4E2bqum7O4/U6XsA0CoRyIJZWkYqxo+NDdxnuL+S6900VB2Z m1Ph3RLicEOf/V4CTTbju9lPW7AAHEpBhZFpmVwGARFo3Ve13zAzQMvTefSFiMefFSedri S2bh6jDLmrHfSsSXftPieyDq1UUByY5IbYN2nIlaCv/flFekAxmtIBORgNLueH+oQPjLKl R1z1iwcfAye2gKQriqb/WOP9s9P8zPfV94GloZOqE9JULUzZKAkub46/toSOx3MwXjF0D4 Baue8+HTeK1E4jpiobxOOjp/V6Xz/ZE80zcljYoN4XO7bvstko9pZTMrnSYn2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnJgP0CqszxCB for ; Thu, 08 Jan 2026 21:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24594 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 21:58:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ed85203fb7a0 - main - vmm: Deduplicate VM and vCPU state management code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed85203fb7a0334041db6da07e45ddda4caef13d Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 21:58:09 +0000 Message-Id: <69602871.24594.50721050@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ed85203fb7a0334041db6da07e45ddda4caef13d commit ed85203fb7a0334041db6da07e45ddda4caef13d Author: Mark Johnston AuthorDate: 2026-01-08 21:54:06 +0000 Commit: Mark Johnston CommitDate: 2026-01-08 21:54:06 +0000 vmm: Deduplicate VM and vCPU state management code Now that the machine-independent fields of struct vm and struct vcpu are available in a header, we can move lots of duplicated code into sys/dev/vmm/vmm_vm.c. This change does exactly that. No functional change intended. MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53585 --- sys/amd64/include/vmm.h | 37 ---- sys/amd64/vmm/io/vioapic.c | 1 + sys/amd64/vmm/io/vlapic.c | 1 + sys/amd64/vmm/vmm.c | 483 +-------------------------------------------- sys/amd64/vmm/vmm_lapic.c | 1 + sys/amd64/vmm/x86.c | 1 + sys/arm64/include/vmm.h | 26 --- sys/arm64/vmm/io/vgic_v3.c | 1 + sys/arm64/vmm/vmm.c | 317 +---------------------------- sys/dev/vmm/vmm_dev.c | 32 --- sys/dev/vmm/vmm_vm.c | 476 ++++++++++++++++++++++++++++++++++++++++++++ sys/dev/vmm/vmm_vm.h | 49 ++++- sys/modules/vmm/Makefile | 3 +- sys/riscv/include/vmm.h | 28 +-- sys/riscv/vmm/vmm.c | 317 +---------------------------- sys/riscv/vmm/vmm_aplic.c | 1 + sys/riscv/vmm/vmm_sbi.c | 2 + sys/riscv/vmm/vmm_vtimer.c | 2 + 18 files changed, 551 insertions(+), 1227 deletions(-) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index e1df85aa91b6..baf2cf42ad6c 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -233,19 +233,7 @@ struct vmm_ops { extern const struct vmm_ops vmm_ops_intel; extern const struct vmm_ops vmm_ops_amd; -int vm_create(const char *name, struct vm **retvm); -struct vcpu *vm_alloc_vcpu(struct vm *vm, int vcpuid); -void vm_disable_vcpu_creation(struct vm *vm); -void vm_lock_vcpus(struct vm *vm); -void vm_unlock_vcpus(struct vm *vm); -void vm_destroy(struct vm *vm); -int vm_reinit(struct vm *vm); const char *vm_name(struct vm *vm); -uint16_t vm_get_maxcpus(struct vm *vm); -void vm_get_topology(struct vm *vm, uint16_t *sockets, uint16_t *cores, - uint16_t *threads, uint16_t *maxcpus); -int vm_set_topology(struct vm *vm, uint16_t sockets, uint16_t cores, - uint16_t threads, uint16_t maxcpus); int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); int vm_unmap_mmio(struct vm *vm, vm_paddr_t gpa, size_t len); @@ -259,7 +247,6 @@ int vm_get_seg_desc(struct vcpu *vcpu, int reg, int vm_set_seg_desc(struct vcpu *vcpu, int reg, struct seg_desc *desc); int vm_run(struct vcpu *vcpu); -int vm_suspend(struct vm *vm, enum vm_suspend_how how); int vm_inject_nmi(struct vcpu *vcpu); int vm_nmi_pending(struct vcpu *vcpu); void vm_nmi_clear(struct vcpu *vcpu); @@ -277,9 +264,6 @@ int vm_set_capability(struct vcpu *vcpu, int type, int val); int vm_get_x2apic_state(struct vcpu *vcpu, enum x2apic_state *state); int vm_set_x2apic_state(struct vcpu *vcpu, enum x2apic_state state); int vm_apicid2vcpuid(struct vm *vm, int apicid); -int vm_activate_cpu(struct vcpu *vcpu); -int vm_suspend_cpu(struct vm *vm, struct vcpu *vcpu); -int vm_resume_cpu(struct vm *vm, struct vcpu *vcpu); int vm_restart_instruction(struct vcpu *vcpu); struct vm_exit *vm_exitinfo(struct vcpu *vcpu); cpuset_t *vm_exitinfo_cpuset(struct vcpu *vcpu); @@ -292,24 +276,6 @@ int vm_snapshot_req(struct vm *vm, struct vm_snapshot_meta *meta); int vm_restore_time(struct vm *vm); #ifdef _SYS__CPUSET_H_ -/* - * Rendezvous all vcpus specified in 'dest' and execute 'func(arg)'. - * The rendezvous 'func(arg)' is not allowed to do anything that will - * cause the thread to be put to sleep. - * - * The caller cannot hold any locks when initiating the rendezvous. - * - * The implementation of this API may cause vcpus other than those specified - * by 'dest' to be stalled. The caller should not rely on any vcpus making - * forward progress when the rendezvous is in progress. - */ -typedef void (*vm_rendezvous_func_t)(struct vcpu *vcpu, void *arg); -int vm_smp_rendezvous(struct vcpu *vcpu, cpuset_t dest, - vm_rendezvous_func_t func, void *arg); - -cpuset_t vm_active_cpus(struct vm *vm); -cpuset_t vm_debug_cpus(struct vm *vm); -cpuset_t vm_suspended_cpus(struct vm *vm); cpuset_t vm_start_cpus(struct vm *vm, const cpuset_t *tostart); void vm_await_start(struct vm *vm, const cpuset_t *waiting); #endif /* _SYS__CPUSET_H_ */ @@ -341,8 +307,6 @@ vcpu_reqidle(struct vm_eventinfo *info) return (*info->iptr); } -int vcpu_debugged(struct vcpu *vcpu); - /* * Return true if device indicated by bus/slot/func is supposed to be a * pci passthrough device. @@ -354,7 +318,6 @@ bool vmm_is_pptdev(int bus, int slot, int func); void *vm_iommu_domain(struct vm *vm); void *vcpu_stats(struct vcpu *vcpu); -void vcpu_notify_event(struct vcpu *vcpu); void vcpu_notify_lapic(struct vcpu *vcpu); struct vm_mem *vm_mem(struct vm *vm); struct vatpic *vm_atpic(struct vm *vm); diff --git a/sys/amd64/vmm/io/vioapic.c b/sys/amd64/vmm/io/vioapic.c index 7df6193d6dc0..a3956785d049 100644 --- a/sys/amd64/vmm/io/vioapic.c +++ b/sys/amd64/vmm/io/vioapic.c @@ -43,6 +43,7 @@ #include #include +#include #include "vmm_lapic.h" #include "vlapic.h" diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c index afd5045de574..6849ef7aa589 100644 --- a/sys/amd64/vmm/io/vlapic.c +++ b/sys/amd64/vmm/io/vlapic.c @@ -47,6 +47,7 @@ #include #include +#include #include "vmm_lapic.h" #include "vmm_stat.h" diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 4b93e020f8dc..b0712c3eb6ac 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -161,8 +161,7 @@ static MALLOC_DEFINE(M_VM, "vm", "vm"); /* statistics */ static VMM_STAT(VCPU_TOTAL_RUNTIME, "vcpu total runtime"); -SYSCTL_NODE(_hw, OID_AUTO, vmm, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, - NULL); +SYSCTL_DECL(_hw_vmm); /* * Halt the guest if all vcpus are executing a HLT instruction with @@ -173,10 +172,6 @@ SYSCTL_INT(_hw_vmm, OID_AUTO, halt_detection, CTLFLAG_RDTUN, &halt_detection_enabled, 0, "Halt VM if all vcpus execute HLT with interrupts disabled"); -static int vmm_ipinum; -SYSCTL_INT(_hw_vmm, OID_AUTO, ipinum, CTLFLAG_RD, &vmm_ipinum, 0, - "IPI vector used for vcpu notifications"); - static int trace_guest_exceptions; SYSCTL_INT(_hw_vmm, OID_AUTO, trace_guest_exceptions, CTLFLAG_RDTUN, &trace_guest_exceptions, 0, @@ -186,8 +181,6 @@ static int trap_wbinvd; SYSCTL_INT(_hw_vmm, OID_AUTO, trap_wbinvd, CTLFLAG_RDTUN, &trap_wbinvd, 0, "WBINVD triggers a VM-exit"); -static void vcpu_notify_event_locked(struct vcpu *vcpu); - /* global statistics */ VMM_STAT(VCPU_MIGRATIONS, "vcpu migration across host cpus"); VMM_STAT(VMEXIT_COUNT, "total number of vm exits"); @@ -284,7 +277,6 @@ vcpu_init(struct vcpu *vcpu) int vcpu_trace_exceptions(struct vcpu *vcpu) { - return (trace_guest_exceptions); } @@ -364,14 +356,6 @@ vm_init(struct vm *vm, bool create) } } -void -vm_disable_vcpu_creation(struct vm *vm) -{ - sx_xlock(&vm->vcpus_init_lock); - vm->dying = true; - sx_xunlock(&vm->vcpus_init_lock); -} - struct vcpu * vm_alloc_vcpu(struct vm *vm, int vcpuid) { @@ -402,18 +386,6 @@ vm_alloc_vcpu(struct vm *vm, int vcpuid) return (vcpu); } -void -vm_lock_vcpus(struct vm *vm) -{ - sx_xlock(&vm->vcpus_init_lock); -} - -void -vm_unlock_vcpus(struct vm *vm) -{ - sx_unlock(&vm->vcpus_init_lock); -} - int vm_create(const char *name, struct vm **retvm) { @@ -443,35 +415,6 @@ vm_create(const char *name, struct vm **retvm) return (0); } -void -vm_get_topology(struct vm *vm, uint16_t *sockets, uint16_t *cores, - uint16_t *threads, uint16_t *maxcpus) -{ - *sockets = vm->sockets; - *cores = vm->cores; - *threads = vm->threads; - *maxcpus = vm->maxcpus; -} - -uint16_t -vm_get_maxcpus(struct vm *vm) -{ - return (vm->maxcpus); -} - -int -vm_set_topology(struct vm *vm, uint16_t sockets, uint16_t cores, - uint16_t threads, uint16_t maxcpus __unused) -{ - /* Ignore maxcpus. */ - if ((sockets * cores * threads) > vm->maxcpus) - return (EINVAL); - vm->sockets = sockets; - vm->cores = cores; - vm->threads = threads; - return(0); -} - static void vm_cleanup(struct vm *vm, bool destroy) { @@ -520,23 +463,11 @@ vm_destroy(struct vm *vm) free(vm, M_VM); } -int -vm_reinit(struct vm *vm) +void +vm_reset(struct vm *vm) { - int error; - - /* - * A virtual machine can be reset only if all vcpus are suspended. - */ - if (CPU_CMP(&vm->suspended_cpus, &vm->active_cpus) == 0) { - vm_cleanup(vm, false); - vm_init(vm, false); - error = 0; - } else { - error = EBUSY; - } - - return (error); + vm_cleanup(vm, false); + vm_init(vm, false); } const char * @@ -810,210 +741,6 @@ save_guest_fpustate(struct vcpu *vcpu) static VMM_STAT(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); -/* - * Invoke the rendezvous function on the specified vcpu if applicable. Return - * true if the rendezvous is finished, false otherwise. - */ -static bool -vm_rendezvous(struct vcpu *vcpu) -{ - struct vm *vm = vcpu->vm; - int vcpuid; - - mtx_assert(&vcpu->vm->rendezvous_mtx, MA_OWNED); - KASSERT(vcpu->vm->rendezvous_func != NULL, - ("vm_rendezvous: no rendezvous pending")); - - /* 'rendezvous_req_cpus' must be a subset of 'active_cpus' */ - CPU_AND(&vm->rendezvous_req_cpus, &vm->rendezvous_req_cpus, - &vm->active_cpus); - - vcpuid = vcpu->vcpuid; - if (CPU_ISSET(vcpuid, &vm->rendezvous_req_cpus) && - !CPU_ISSET(vcpuid, &vm->rendezvous_done_cpus)) { - VMM_CTR0(vcpu, "Calling rendezvous func"); - (*vm->rendezvous_func)(vcpu, vm->rendezvous_arg); - CPU_SET(vcpuid, &vm->rendezvous_done_cpus); - } - if (CPU_CMP(&vm->rendezvous_req_cpus, - &vm->rendezvous_done_cpus) == 0) { - VMM_CTR0(vcpu, "Rendezvous completed"); - CPU_ZERO(&vm->rendezvous_req_cpus); - vm->rendezvous_func = NULL; - wakeup(&vm->rendezvous_func); - return (true); - } - return (false); -} - -static void -vcpu_wait_idle(struct vcpu *vcpu) -{ - KASSERT(vcpu->state != VCPU_IDLE, ("vcpu already idle")); - - vcpu->reqidle = 1; - vcpu_notify_event_locked(vcpu); - VMM_CTR1(vcpu, "vcpu state change from %s to " - "idle requested", vcpu_state2str(vcpu->state)); - msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", hz); -} - -static int -vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate, - bool from_idle) -{ - int error; - - vcpu_assert_locked(vcpu); - - /* - * State transitions from the vmmdev_ioctl() must always begin from - * the VCPU_IDLE state. This guarantees that there is only a single - * ioctl() operating on a vcpu at any point. - */ - if (from_idle) { - while (vcpu->state != VCPU_IDLE) - vcpu_wait_idle(vcpu); - } else { - KASSERT(vcpu->state != VCPU_IDLE, ("invalid transition from " - "vcpu idle state")); - } - - if (vcpu->state == VCPU_RUNNING) { - KASSERT(vcpu->hostcpu == curcpu, ("curcpu %d and hostcpu %d " - "mismatch for running vcpu", curcpu, vcpu->hostcpu)); - } else { - KASSERT(vcpu->hostcpu == NOCPU, ("Invalid hostcpu %d for a " - "vcpu that is not running", vcpu->hostcpu)); - } - - /* - * The following state transitions are allowed: - * IDLE -> FROZEN -> IDLE - * FROZEN -> RUNNING -> FROZEN - * FROZEN -> SLEEPING -> FROZEN - */ - switch (vcpu->state) { - case VCPU_IDLE: - case VCPU_RUNNING: - case VCPU_SLEEPING: - error = (newstate != VCPU_FROZEN); - break; - case VCPU_FROZEN: - error = (newstate == VCPU_FROZEN); - break; - default: - error = 1; - break; - } - - if (error) - return (EBUSY); - - VMM_CTR2(vcpu, "vcpu state changed from %s to %s", - vcpu_state2str(vcpu->state), vcpu_state2str(newstate)); - - vcpu->state = newstate; - if (newstate == VCPU_RUNNING) - vcpu->hostcpu = curcpu; - else - vcpu->hostcpu = NOCPU; - - if (newstate == VCPU_IDLE) - wakeup(&vcpu->state); - - return (0); -} - -/* - * Try to lock all of the vCPUs in the VM while taking care to avoid deadlocks - * with vm_smp_rendezvous(). - * - * The complexity here suggests that the rendezvous mechanism needs a rethink. - */ -int -vcpu_set_state_all(struct vm *vm, enum vcpu_state newstate) -{ - cpuset_t locked; - struct vcpu *vcpu; - int error, i; - uint16_t maxcpus; - - KASSERT(newstate != VCPU_IDLE, - ("vcpu_set_state_all: invalid target state %d", newstate)); - - error = 0; - CPU_ZERO(&locked); - maxcpus = vm->maxcpus; - - mtx_lock(&vm->rendezvous_mtx); -restart: - if (vm->rendezvous_func != NULL) { - /* - * If we have a pending rendezvous, then the initiator may be - * blocked waiting for other vCPUs to execute the callback. The - * current thread may be a vCPU thread so we must not block - * waiting for the initiator, otherwise we get a deadlock. - * Thus, execute the callback on behalf of any idle vCPUs. - */ - for (i = 0; i < maxcpus; i++) { - vcpu = vm_vcpu(vm, i); - if (vcpu == NULL) - continue; - vcpu_lock(vcpu); - if (vcpu->state == VCPU_IDLE) { - (void)vcpu_set_state_locked(vcpu, VCPU_FROZEN, - true); - CPU_SET(i, &locked); - } - if (CPU_ISSET(i, &locked)) { - /* - * We can safely execute the callback on this - * vCPU's behalf. - */ - vcpu_unlock(vcpu); - (void)vm_rendezvous(vcpu); - vcpu_lock(vcpu); - } - vcpu_unlock(vcpu); - } - } - - /* - * Now wait for remaining vCPUs to become idle. This may include the - * initiator of a rendezvous that is currently blocked on the rendezvous - * mutex. - */ - CPU_FOREACH_ISCLR(i, &locked) { - if (i >= maxcpus) - break; - vcpu = vm_vcpu(vm, i); - if (vcpu == NULL) - continue; - vcpu_lock(vcpu); - while (vcpu->state != VCPU_IDLE) { - mtx_unlock(&vm->rendezvous_mtx); - vcpu_wait_idle(vcpu); - vcpu_unlock(vcpu); - mtx_lock(&vm->rendezvous_mtx); - if (vm->rendezvous_func != NULL) - goto restart; - vcpu_lock(vcpu); - } - error = vcpu_set_state_locked(vcpu, newstate, true); - vcpu_unlock(vcpu); - if (error != 0) { - /* Roll back state changes. */ - CPU_FOREACH_ISSET(i, &locked) - (void)vcpu_set_state(vcpu, VCPU_IDLE, false); - break; - } - CPU_SET(i, &locked); - } - mtx_unlock(&vm->rendezvous_mtx); - return (error); -} - static void vcpu_require_state(struct vcpu *vcpu, enum vcpu_state newstate) { @@ -1032,37 +759,6 @@ vcpu_require_state_locked(struct vcpu *vcpu, enum vcpu_state newstate) panic("Error %d setting state to %d", error, newstate); } -static int -vm_handle_rendezvous(struct vcpu *vcpu) -{ - struct vm *vm; - struct thread *td; - - td = curthread; - vm = vcpu->vm; - - mtx_lock(&vm->rendezvous_mtx); - while (vm->rendezvous_func != NULL) { - if (vm_rendezvous(vcpu)) - break; - - VMM_CTR0(vcpu, "Wait for rendezvous completion"); - mtx_sleep(&vm->rendezvous_func, &vm->rendezvous_mtx, 0, - "vmrndv", hz); - if (td_ast_pending(td, TDA_SUSPEND)) { - int error; - - mtx_unlock(&vm->rendezvous_mtx); - error = thread_check_susp(td, true); - if (error != 0) - return (error); - mtx_lock(&vm->rendezvous_mtx); - } - } - mtx_unlock(&vm->rendezvous_mtx); - return (0); -} - /* * Emulate a guest 'hlt' by sleeping until the vcpu is ready to run. */ @@ -1386,33 +1082,6 @@ vm_handle_db(struct vcpu *vcpu, struct vm_exit *vme, bool *retu) return (0); } -int -vm_suspend(struct vm *vm, enum vm_suspend_how how) -{ - int i; - - if (how <= VM_SUSPEND_NONE || how >= VM_SUSPEND_LAST) - return (EINVAL); - - if (atomic_cmpset_int(&vm->suspend, 0, how) == 0) { - VM_CTR2(vm, "virtual machine already suspended %d/%d", - vm->suspend, how); - return (EALREADY); - } - - VM_CTR1(vm, "virtual machine successfully suspended %d", how); - - /* - * Notify all active vcpus that they are now suspended. - */ - for (i = 0; i < vm->maxcpus; i++) { - if (CPU_ISSET(i, &vm->active_cpus)) - vcpu_notify_event(vm_vcpu(vm, i)); - } - - return (0); -} - void vm_exit_suspended(struct vcpu *vcpu, uint64_t rip) { @@ -2039,107 +1708,6 @@ vm_iommu_domain(struct vm *vm) return (vm->iommu); } -int -vcpu_set_state(struct vcpu *vcpu, enum vcpu_state newstate, bool from_idle) -{ - int error; - - vcpu_lock(vcpu); - error = vcpu_set_state_locked(vcpu, newstate, from_idle); - vcpu_unlock(vcpu); - - return (error); -} - -enum vcpu_state -vcpu_get_state(struct vcpu *vcpu, int *hostcpu) -{ - enum vcpu_state state; - - vcpu_lock(vcpu); - state = vcpu->state; - if (hostcpu != NULL) - *hostcpu = vcpu->hostcpu; - vcpu_unlock(vcpu); - - return (state); -} - -int -vm_activate_cpu(struct vcpu *vcpu) -{ - struct vm *vm = vcpu->vm; - - if (CPU_ISSET(vcpu->vcpuid, &vm->active_cpus)) - return (EBUSY); - - VMM_CTR0(vcpu, "activated"); - CPU_SET_ATOMIC(vcpu->vcpuid, &vm->active_cpus); - return (0); -} - -int -vm_suspend_cpu(struct vm *vm, struct vcpu *vcpu) -{ - if (vcpu == NULL) { - vm->debug_cpus = vm->active_cpus; - for (int i = 0; i < vm->maxcpus; i++) { - if (CPU_ISSET(i, &vm->active_cpus)) - vcpu_notify_event(vm_vcpu(vm, i)); - } - } else { - if (!CPU_ISSET(vcpu->vcpuid, &vm->active_cpus)) - return (EINVAL); - - CPU_SET_ATOMIC(vcpu->vcpuid, &vm->debug_cpus); - vcpu_notify_event(vcpu); - } - return (0); -} - -int -vm_resume_cpu(struct vm *vm, struct vcpu *vcpu) -{ - - if (vcpu == NULL) { - CPU_ZERO(&vm->debug_cpus); - } else { - if (!CPU_ISSET(vcpu->vcpuid, &vm->debug_cpus)) - return (EINVAL); - - CPU_CLR_ATOMIC(vcpu->vcpuid, &vm->debug_cpus); - } - return (0); -} - -int -vcpu_debugged(struct vcpu *vcpu) -{ - - return (CPU_ISSET(vcpu->vcpuid, &vcpu->vm->debug_cpus)); -} - -cpuset_t -vm_active_cpus(struct vm *vm) -{ - - return (vm->active_cpus); -} - -cpuset_t -vm_debug_cpus(struct vm *vm) -{ - - return (vm->debug_cpus); -} - -cpuset_t -vm_suspended_cpus(struct vm *vm) -{ - - return (vm->suspended_cpus); -} - /* * Returns the subset of vCPUs in tostart that are awaiting startup. * These vCPUs are also marked as no longer awaiting startup. @@ -2192,47 +1760,6 @@ vm_set_x2apic_state(struct vcpu *vcpu, enum x2apic_state state) return (0); } -/* - * This function is called to ensure that a vcpu "sees" a pending event - * as soon as possible: - * - If the vcpu thread is sleeping then it is woken up. - * - If the vcpu is running on a different host_cpu then an IPI will be directed - * to the host_cpu to cause the vcpu to trap into the hypervisor. - */ -static void -vcpu_notify_event_locked(struct vcpu *vcpu) -{ - int hostcpu; - - hostcpu = vcpu->hostcpu; - if (vcpu->state == VCPU_RUNNING) { - KASSERT(hostcpu != NOCPU, ("vcpu running on invalid hostcpu")); - if (hostcpu != curcpu) { - ipi_cpu(hostcpu, vmm_ipinum); - } else { - /* - * If the 'vcpu' is running on 'curcpu' then it must - * be sending a notification to itself (e.g. SELF_IPI). - * The pending event will be picked up when the vcpu - * transitions back to guest context. - */ - } - } else { - KASSERT(hostcpu == NOCPU, ("vcpu state %d not consistent " - "with hostcpu %d", vcpu->state, hostcpu)); - if (vcpu->state == VCPU_SLEEPING) - wakeup_one(vcpu); - } -} - -void -vcpu_notify_event(struct vcpu *vcpu) -{ - vcpu_lock(vcpu); - vcpu_notify_event_locked(vcpu); - vcpu_unlock(vcpu); -} - void vcpu_notify_lapic(struct vcpu *vcpu) { diff --git a/sys/amd64/vmm/vmm_lapic.c b/sys/amd64/vmm/vmm_lapic.c index 63bdee69bb59..44bae5da31e5 100644 --- a/sys/amd64/vmm/vmm_lapic.c +++ b/sys/amd64/vmm/vmm_lapic.c @@ -34,6 +34,7 @@ #include #include +#include #include #include "vmm_lapic.h" diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 2e2224595ab4..f32107124eb8 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -39,6 +39,7 @@ #include #include +#include #include "vmm_host.h" #include "vmm_util.h" diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index 16292dd42f28..14b4d1be10a3 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -181,24 +181,11 @@ DECLARE_VMMOPS_FUNC(int, restore_tsc, (void *vcpui, uint64_t now)); #endif #endif -int vm_create(const char *name, struct vm **retvm); -struct vcpu *vm_alloc_vcpu(struct vm *vm, int vcpuid); -void vm_disable_vcpu_creation(struct vm *vm); -void vm_lock_vcpus(struct vm *vm); -void vm_unlock_vcpus(struct vm *vm); -void vm_destroy(struct vm *vm); -int vm_reinit(struct vm *vm); const char *vm_name(struct vm *vm); -uint16_t vm_get_maxcpus(struct vm *vm); -void vm_get_topology(struct vm *vm, uint16_t *sockets, uint16_t *cores, - uint16_t *threads, uint16_t *maxcpus); -int vm_set_topology(struct vm *vm, uint16_t sockets, uint16_t cores, - uint16_t threads, uint16_t maxcpus); int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval); int vm_set_register(struct vcpu *vcpu, int reg, uint64_t val); int vm_run(struct vcpu *vcpu); -int vm_suspend(struct vm *vm, enum vm_suspend_how how); void* vm_get_cookie(struct vm *vm); int vcpu_vcpuid(struct vcpu *vcpu); void *vcpu_get_cookie(struct vcpu *vcpu); @@ -206,9 +193,6 @@ struct vm *vcpu_vm(struct vcpu *vcpu); struct vcpu *vm_vcpu(struct vm *vm, int cpu); int vm_get_capability(struct vcpu *vcpu, int type, int *val); int vm_set_capability(struct vcpu *vcpu, int type, int val); -int vm_activate_cpu(struct vcpu *vcpu); -int vm_suspend_cpu(struct vm *vm, struct vcpu *vcpu); -int vm_resume_cpu(struct vm *vm, struct vcpu *vcpu); int vm_inject_exception(struct vcpu *vcpu, uint64_t esr, uint64_t far); int vm_attach_vgic(struct vm *vm, struct vm_vgic_descr *descr); int vm_assert_irq(struct vm *vm, uint32_t irq); @@ -218,13 +202,8 @@ int vm_raise_msi(struct vm *vm, uint64_t msg, uint64_t addr, int bus, int slot, struct vm_exit *vm_exitinfo(struct vcpu *vcpu); void vm_exit_suspended(struct vcpu *vcpu, uint64_t pc); void vm_exit_debug(struct vcpu *vcpu, uint64_t pc); -void vm_exit_rendezvous(struct vcpu *vcpu, uint64_t pc); void vm_exit_astpending(struct vcpu *vcpu, uint64_t pc); -cpuset_t vm_active_cpus(struct vm *vm); -cpuset_t vm_debug_cpus(struct vm *vm); -cpuset_t vm_suspended_cpus(struct vm *vm); - static __inline int vcpu_rendezvous_pending(struct vm_eventinfo *info) { @@ -239,14 +218,9 @@ vcpu_suspended(struct vm_eventinfo *info) return (*info->sptr); } -int vcpu_debugged(struct vcpu *vcpu); - void *vcpu_stats(struct vcpu *vcpu); -void vcpu_notify_event(struct vcpu *vcpu); struct vm_mem *vm_mem(struct vm *vm); -enum vm_reg_name vm_segment_name(int seg_encoding); - struct vm_copyinfo { uint64_t gpa; size_t len; diff --git a/sys/arm64/vmm/io/vgic_v3.c b/sys/arm64/vmm/io/vgic_v3.c index e4f7bb2af3ee..22cd06b09d7d 100644 --- a/sys/arm64/vmm/io/vgic_v3.c +++ b/sys/arm64/vmm/io/vgic_v3.c @@ -69,6 +69,7 @@ #include #include +#include #include "vgic.h" #include "vgic_v3.h" diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c index 75f7f2fcaaf7..92500aa9febc 100644 --- a/sys/arm64/vmm/vmm.c +++ b/sys/arm64/vmm/vmm.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -74,20 +73,11 @@ #include "io/vgic.h" #include "io/vtimer.h" -static int vm_handle_wfi(struct vcpu *vcpu, - struct vm_exit *vme, bool *retu); - static MALLOC_DEFINE(M_VMM, "vmm", "vmm"); /* statistics */ static VMM_STAT(VCPU_TOTAL_RUNTIME, "vcpu total runtime"); -SYSCTL_NODE(_hw, OID_AUTO, vmm, CTLFLAG_RW, NULL, NULL); - -static int vmm_ipinum; -SYSCTL_INT(_hw_vmm, OID_AUTO, ipinum, CTLFLAG_RD, &vmm_ipinum, 0, - "IPI vector used for vcpu notifications"); - struct vmm_regs { uint64_t id_aa64afr0; uint64_t id_aa64afr1; @@ -142,8 +132,6 @@ static const struct vmm_regs vmm_arch_regs_masks = { /* Host registers masked by vmm_arch_regs_masks. */ static struct vmm_regs vmm_arch_regs; -static void vcpu_notify_event_locked(struct vcpu *vcpu); - /* global statistics */ VMM_STAT(VMEXIT_COUNT, "total number of vm exits"); VMM_STAT(VMEXIT_UNKNOWN, "number of vmexits for the unknown exception"); @@ -294,14 +282,6 @@ vm_init(struct vm *vm, bool create) } } -void -vm_disable_vcpu_creation(struct vm *vm) -{ - sx_xlock(&vm->vcpus_init_lock); - vm->dying = true; - sx_xunlock(&vm->vcpus_init_lock); -} - struct vcpu * vm_alloc_vcpu(struct vm *vm, int vcpuid) { @@ -338,18 +318,6 @@ vm_alloc_vcpu(struct vm *vm, int vcpuid) return (vcpu); } -void -vm_lock_vcpus(struct vm *vm) -{ - sx_xlock(&vm->vcpus_init_lock); -} - -void -vm_unlock_vcpus(struct vm *vm) -{ - sx_unlock(&vm->vcpus_init_lock); -} - int vm_create(const char *name, struct vm **retvm) { @@ -363,6 +331,7 @@ vm_create(const char *name, struct vm **retvm) return (error); } strcpy(vm->name, name); + mtx_init(&vm->rendezvous_mtx, "vm rendezvous lock", 0, MTX_DEF); sx_init(&vm->vcpus_init_lock, "vm vcpus"); vm->sockets = 1; @@ -379,35 +348,6 @@ vm_create(const char *name, struct vm **retvm) return (0); } -void -vm_get_topology(struct vm *vm, uint16_t *sockets, uint16_t *cores, - uint16_t *threads, uint16_t *maxcpus) -{ - *sockets = vm->sockets; - *cores = vm->cores; - *threads = vm->threads; - *maxcpus = vm->maxcpus; -} - -uint16_t -vm_get_maxcpus(struct vm *vm) -{ - return (vm->maxcpus); -} - -int -vm_set_topology(struct vm *vm, uint16_t sockets, uint16_t cores, - uint16_t threads, uint16_t maxcpus) -{ - /* Ignore maxcpus. */ - if ((sockets * cores * threads) > vm->maxcpus) - return (EINVAL); - vm->sockets = sockets; - vm->cores = cores; - vm->threads = threads; - return(0); -} - static void vm_cleanup(struct vm *vm, bool destroy) { @@ -452,23 +392,11 @@ vm_destroy(struct vm *vm) free(vm, M_VMM); } -int -vm_reinit(struct vm *vm) +void +vm_reset(struct vm *vm) { - int error; - - /* - * A virtual machine can be reset only if all vcpus are suspended. - */ - if (CPU_CMP(&vm->suspended_cpus, &vm->active_cpus) == 0) { - vm_cleanup(vm, false); - vm_init(vm, false); - error = 0; - } else { - error = EBUSY; - } - - return (error); + vm_cleanup(vm, false); + vm_init(vm, false); } const char * @@ -765,33 +693,6 @@ out_user: return (0); } -int *** 1405 LINES SKIPPED *** From nobody Thu Jan 8 21:58:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnJgQ45L2z6Mpwk for ; Thu, 08 Jan 2026 21:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnJgQ29Z3z3FYk for ; Thu, 08 Jan 2026 21:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767909490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmGJNvSHKGjhVjN2/fUf7bjqrfcQrRkRW+mwp3NpvtE=; b=h1OpIlCzGUsks0333JxGbwFF3Z/0o7oKlkOq1oL6cBi6o7ZkWp4CuERSvlmNyEiAJBORcf bYzsNHT9+KjbH4omV1gVdCNMBmID4w/pz24Ip/pEZn2XlexcakK+SaAtPCYO5aQdADUIRf 9br4bkqnR/l9YB9LvRsdXR7EmGEi7CRejNg5kuhv9A7tfV/IS4U0pO4mbwFtf2rjCGzRc0 TDZfvynnWnvQIPu9Mhljd/Is866IpmPScaWUH91CG0F4dO1LSZ63syMlZQiayA81C98fJi CkMKBDLfSqSJU6kOSnp6TsDe8VOf/Q/9fbnRJyw8dkd9y5Sv9RPmhaREbRUBZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767909490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmGJNvSHKGjhVjN2/fUf7bjqrfcQrRkRW+mwp3NpvtE=; b=hXkXuMkM+C8tjvRmf9ajR5LGI8LU84oDy5RZubTaJMUB/H9lq5j3ZrzjZ6YMM46qXSUAyX 0MxL1R/wsCXt8E4Q5TaAdInzRNE/B3ks+9nI8+zxFnzdv86YNWbbaO3LRazdev5qOqz/Eg lGZPuCyTvYns/L6SlWwkUFCoTxTSlGv2c8GpeYwYbdCExMBZsPswyH+QUeCU0UfyaoR6+u JZVqlKF68T2Rrv7cHb3YCPBc/A5t4EG3+MynWUrZrelgQnIX8lviOk3pPk8GpJBOczli5k wxdU721vwD7FgpvS6iyv/yXg7qqcF+VAjV4Zk97qPhJ8rf+pEPLOFsBELrBWIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767909490; a=rsa-sha256; cv=none; b=pOUY289RoSyDjnTvKAqV3p0O+MUa+UK62NBhSC72ME8xyDt5FGdUS+kPnHBt/piN5t8+wK neBvwVlrDhZFfzEotI0zxdKjvr4mdU5lFXf/KxAw4WFyP8XuaoTPsPkG7xTLxsbeCNGfE7 EMa7S4N+r2aYSNrnu3Hh+Nzkt/yWX40KZDDh680DbQDxUaDcFCt9Wysx1kjcAeH7OUFDwj aXr1wra61vLt3V4n1bU2v4AKFCw4RbxSSUqETQRveYJ2ZDvqGpKXuZbPKqnem+diS9JsZV TJlFebGusQNwgcQF0VAdXbDUxfxM6QXIQZRIIAcihI5B5y7jtFuOBtn84d0ImA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnJgQ12Khzx2q for ; Thu, 08 Jan 2026 21:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25111 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 21:58:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5f13d6b60740 - main - vmm: Move common accessors and vm_eventinfo into sys/dev/vmm List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f13d6b60740c021951ae0e4d096903cfa1679e2 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 21:58:10 +0000 Message-Id: <69602872.25111.6c3261f@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5f13d6b60740c021951ae0e4d096903cfa1679e2 commit 5f13d6b60740c021951ae0e4d096903cfa1679e2 Author: Mark Johnston AuthorDate: 2026-01-08 21:54:16 +0000 Commit: Mark Johnston CommitDate: 2026-01-08 21:54:16 +0000 vmm: Move common accessors and vm_eventinfo into sys/dev/vmm Now that struct vm and struct vcpu are defined in headers, provide inline accessors. We could just remove the accessors outright, but they don't hurt and it would result in unneeded churn. As a part of this, consolidate definitions related to struct vm_eventinfo as well. I'm not sure if struct vm_eventinfo is really needed anymore, now that vmmops_run implementations can directly access vm and vcpu fields, but this can be resolved later. No functional change intended. MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53586 --- sys/amd64/include/vmm.h | 41 +--------------------------- sys/amd64/vmm/io/vhpet.c | 1 + sys/amd64/vmm/vmm.c | 37 ------------------------- sys/amd64/vmm/vmm_ioport.c | 1 + sys/arm64/include/vmm.h | 29 +------------------- sys/arm64/vmm/io/vtimer.c | 2 ++ sys/arm64/vmm/vmm.c | 37 ------------------------- sys/arm64/vmm/vmm_reset.c | 2 ++ sys/dev/vmm/vmm_stat.h | 2 ++ sys/dev/vmm/vmm_vm.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++ sys/riscv/include/vmm.h | 30 +-------------------- sys/riscv/vmm/vmm.c | 40 --------------------------- 12 files changed, 78 insertions(+), 211 deletions(-) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index baf2cf42ad6c..eef8e6760fd6 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -160,17 +160,12 @@ struct vhpet; struct vioapic; struct vlapic; struct vmspace; +struct vm_eventinfo; struct vm_object; struct vm_guest_paging; struct pmap; enum snapshot_req; -struct vm_eventinfo { - cpuset_t *rptr; /* rendezvous cookie */ - int *sptr; /* suspend cookie */ - int *iptr; /* reqidle cookie */ -}; - #define DECLARE_VMMOPS_FUNC(ret_type, opname, args) \ typedef ret_type (*vmmops_##opname##_t) args; \ ret_type vmmops_##opname args @@ -233,8 +228,6 @@ struct vmm_ops { extern const struct vmm_ops vmm_ops_intel; extern const struct vmm_ops vmm_ops_amd; -const char *vm_name(struct vm *vm); - int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); int vm_unmap_mmio(struct vm *vm, vm_paddr_t gpa, size_t len); int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); @@ -253,9 +246,6 @@ void vm_nmi_clear(struct vcpu *vcpu); int vm_inject_extint(struct vcpu *vcpu); int vm_extint_pending(struct vcpu *vcpu); void vm_extint_clear(struct vcpu *vcpu); -int vcpu_vcpuid(struct vcpu *vcpu); -struct vm *vcpu_vm(struct vcpu *vcpu); -struct vcpu *vm_vcpu(struct vm *vm, int cpu); struct vlapic *vm_lapic(struct vcpu *vcpu); struct vioapic *vm_ioapic(struct vm *vm); struct vhpet *vm_hpet(struct vm *vm); @@ -280,33 +270,6 @@ cpuset_t vm_start_cpus(struct vm *vm, const cpuset_t *tostart); void vm_await_start(struct vm *vm, const cpuset_t *waiting); #endif /* _SYS__CPUSET_H_ */ -static __inline int -vcpu_rendezvous_pending(struct vcpu *vcpu, struct vm_eventinfo *info) -{ - /* - * This check isn't done with atomic operations or under a lock because - * there's no need to. If the vcpuid bit is set, the vcpu is part of a - * rendezvous and the bit won't be cleared until the vcpu enters the - * rendezvous. On rendezvous exit, the cpuset is cleared and the vcpu - * will see an empty cpuset. So, the races are harmless. - */ - return (CPU_ISSET(vcpu_vcpuid(vcpu), info->rptr)); -} - -static __inline int -vcpu_suspended(struct vm_eventinfo *info) -{ - - return (*info->sptr); -} - -static __inline int -vcpu_reqidle(struct vm_eventinfo *info) -{ - - return (*info->iptr); -} - /* * Return true if device indicated by bus/slot/func is supposed to be a * pci passthrough device. @@ -317,9 +280,7 @@ bool vmm_is_pptdev(int bus, int slot, int func); void *vm_iommu_domain(struct vm *vm); -void *vcpu_stats(struct vcpu *vcpu); void vcpu_notify_lapic(struct vcpu *vcpu); -struct vm_mem *vm_mem(struct vm *vm); struct vatpic *vm_atpic(struct vm *vm); struct vatpit *vm_atpit(struct vm *vm); struct vpmtmr *vm_pmtmr(struct vm *vm); diff --git a/sys/amd64/vmm/io/vhpet.c b/sys/amd64/vmm/io/vhpet.c index cdeb5e059128..b01736a56c00 100644 --- a/sys/amd64/vmm/io/vhpet.c +++ b/sys/amd64/vmm/io/vhpet.c @@ -44,6 +44,7 @@ #include #include +#include #include "vmm_lapic.h" #include "vatpic.h" diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index b0712c3eb6ac..6312fafa2975 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -470,12 +470,6 @@ vm_reset(struct vm *vm) vm_init(vm, false); } -const char * -vm_name(struct vm *vm) -{ - return (vm->name); -} - int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa) { @@ -1621,24 +1615,6 @@ vm_set_capability(struct vcpu *vcpu, int type, int val) return (vmmops_setcap(vcpu->cookie, type, val)); } -struct vm * -vcpu_vm(struct vcpu *vcpu) -{ - return (vcpu->vm); -} - -int -vcpu_vcpuid(struct vcpu *vcpu) -{ - return (vcpu->vcpuid); -} - -struct vcpu * -vm_vcpu(struct vm *vm, int vcpuid) -{ - return (vm->vcpu[vcpuid]); -} - struct vlapic * vm_lapic(struct vcpu *vcpu) { @@ -1732,13 +1708,6 @@ vm_await_start(struct vm *vm, const cpuset_t *waiting) mtx_unlock(&vm->rendezvous_mtx); } -void * -vcpu_stats(struct vcpu *vcpu) -{ - - return (vcpu->stats); -} - int vm_get_x2apic_state(struct vcpu *vcpu, enum x2apic_state *state) { @@ -1771,12 +1740,6 @@ vcpu_notify_lapic(struct vcpu *vcpu) vcpu_unlock(vcpu); } -struct vm_mem * -vm_mem(struct vm *vm) -{ - return (&vm->mem); -} - int vm_apicid2vcpuid(struct vm *vm, int apicid) { diff --git a/sys/amd64/vmm/vmm_ioport.c b/sys/amd64/vmm/vmm_ioport.c index 8aab28f5e68e..65710c8de717 100644 --- a/sys/amd64/vmm/vmm_ioport.c +++ b/sys/amd64/vmm/vmm_ioport.c @@ -33,6 +33,7 @@ #include #include +#include #include "vatpic.h" #include "vatpit.h" diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index 14b4d1be10a3..f076bd07f323 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -135,16 +135,11 @@ struct vmm_special_reg { }; #define VM_MAX_SPECIAL_REGS 16 -struct vm_eventinfo { - void *rptr; /* rendezvous cookie */ - int *sptr; /* suspend cookie */ - int *iptr; /* reqidle cookie */ -}; - #define DECLARE_VMMOPS_FUNC(ret_type, opname, args) \ ret_type vmmops_##opname args struct vm; +struct vm_eventinfo; struct vm_exception; struct vm_exit; struct vm_run; @@ -181,16 +176,11 @@ DECLARE_VMMOPS_FUNC(int, restore_tsc, (void *vcpui, uint64_t now)); #endif #endif -const char *vm_name(struct vm *vm); - int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval); int vm_set_register(struct vcpu *vcpu, int reg, uint64_t val); int vm_run(struct vcpu *vcpu); void* vm_get_cookie(struct vm *vm); -int vcpu_vcpuid(struct vcpu *vcpu); void *vcpu_get_cookie(struct vcpu *vcpu); -struct vm *vcpu_vm(struct vcpu *vcpu); -struct vcpu *vm_vcpu(struct vm *vm, int cpu); int vm_get_capability(struct vcpu *vcpu, int type, int *val); int vm_set_capability(struct vcpu *vcpu, int type, int val); int vm_inject_exception(struct vcpu *vcpu, uint64_t esr, uint64_t far); @@ -204,23 +194,6 @@ void vm_exit_suspended(struct vcpu *vcpu, uint64_t pc); void vm_exit_debug(struct vcpu *vcpu, uint64_t pc); void vm_exit_astpending(struct vcpu *vcpu, uint64_t pc); -static __inline int -vcpu_rendezvous_pending(struct vm_eventinfo *info) -{ - - return (*((uintptr_t *)(info->rptr)) != 0); -} - -static __inline int -vcpu_suspended(struct vm_eventinfo *info) -{ - - return (*info->sptr); -} - -void *vcpu_stats(struct vcpu *vcpu); -struct vm_mem *vm_mem(struct vm *vm); - struct vm_copyinfo { uint64_t gpa; size_t len; diff --git a/sys/arm64/vmm/io/vtimer.c b/sys/arm64/vmm/io/vtimer.c index 7c7fbb49e691..d1c489463882 100644 --- a/sys/arm64/vmm/io/vtimer.c +++ b/sys/arm64/vmm/io/vtimer.c @@ -47,6 +47,8 @@ #include +#include + #include "vgic.h" #include "vtimer.h" diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c index 92500aa9febc..031400f3f1d0 100644 --- a/sys/arm64/vmm/vmm.c +++ b/sys/arm64/vmm/vmm.c @@ -399,12 +399,6 @@ vm_reset(struct vm *vm) vm_init(vm, false); } -const char * -vm_name(struct vm *vm) -{ - return (vm->name); -} - int vm_gla2gpa_nofault(struct vcpu *vcpu, struct vm_guest_paging *paging, uint64_t gla, int prot, uint64_t *gpa, int *is_fault) @@ -720,19 +714,6 @@ vm_exit_debug(struct vcpu *vcpu, uint64_t pc) vmexit->exitcode = VM_EXITCODE_DEBUG; } -void * -vcpu_stats(struct vcpu *vcpu) -{ - - return (vcpu->stats); -} - -struct vm_mem * -vm_mem(struct vm *vm) -{ - return (&vm->mem); -} - static void restore_guest_fpustate(struct vcpu *vcpu) { @@ -805,30 +786,12 @@ vm_set_capability(struct vcpu *vcpu, int type, int val) return (vmmops_setcap(vcpu->cookie, type, val)); } -struct vm * -vcpu_vm(struct vcpu *vcpu) -{ - return (vcpu->vm); -} - -int -vcpu_vcpuid(struct vcpu *vcpu) -{ - return (vcpu->vcpuid); -} - void * vcpu_get_cookie(struct vcpu *vcpu) { return (vcpu->cookie); } -struct vcpu * -vm_vcpu(struct vm *vm, int vcpuid) -{ - return (vm->vcpu[vcpuid]); -} - int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval) { diff --git a/sys/arm64/vmm/vmm_reset.c b/sys/arm64/vmm/vmm_reset.c index 0e4910ea87b4..06ac6dec5af8 100644 --- a/sys/arm64/vmm/vmm_reset.c +++ b/sys/arm64/vmm/vmm_reset.c @@ -34,6 +34,8 @@ #include #include +#include + #include "arm64.h" #include "reset.h" diff --git a/sys/dev/vmm/vmm_stat.h b/sys/dev/vmm/vmm_stat.h index 471afd0dd827..469d8ef54829 100644 --- a/sys/dev/vmm/vmm_stat.h +++ b/sys/dev/vmm/vmm_stat.h @@ -32,6 +32,8 @@ #ifndef _DEV_VMM_STAT_H_ #define _DEV_VMM_STAT_H_ +#include + struct vm; #define MAX_VMM_STAT_ELEMS 64 /* arbitrary */ diff --git a/sys/dev/vmm/vmm_vm.h b/sys/dev/vmm/vmm_vm.h index 053eeb11d843..66d3545d1dd5 100644 --- a/sys/dev/vmm/vmm_vm.h +++ b/sys/dev/vmm/vmm_vm.h @@ -62,6 +62,24 @@ void vcpu_notify_event(struct vcpu *vcpu); void vcpu_notify_event_locked(struct vcpu *vcpu); int vcpu_debugged(struct vcpu *vcpu); +static inline void * +vcpu_stats(struct vcpu *vcpu) +{ + return (vcpu->stats); +} + +static inline struct vm * +vcpu_vm(struct vcpu *vcpu) +{ + return (vcpu->vm); +} + +static inline int +vcpu_vcpuid(struct vcpu *vcpu) +{ + return (vcpu->vcpuid); +} + static int __inline vcpu_is_running(struct vcpu *vcpu, int *hostcpu) { @@ -161,6 +179,55 @@ void vm_get_topology(struct vm *vm, uint16_t *sockets, uint16_t *cores, uint16_t *threads, uint16_t *maxcpus); int vm_set_topology(struct vm *vm, uint16_t sockets, uint16_t cores, uint16_t threads, uint16_t maxcpus); + +static inline const char * +vm_name(struct vm *vm) +{ + return (vm->name); +} + +static inline struct vm_mem * +vm_mem(struct vm *vm) +{ + return (&vm->mem); +} + +static inline struct vcpu * +vm_vcpu(struct vm *vm, int vcpuid) +{ + return (vm->vcpu[vcpuid]); +} + +struct vm_eventinfo { + cpuset_t *rptr; /* rendezvous cookie */ + int *sptr; /* suspend cookie */ + int *iptr; /* reqidle cookie */ +}; + +static inline int +vcpu_rendezvous_pending(struct vcpu *vcpu, struct vm_eventinfo *info) +{ + /* + * This check isn't done with atomic operations or under a lock because + * there's no need to. If the vcpuid bit is set, the vcpu is part of a + * rendezvous and the bit won't be cleared until the vcpu enters the + * rendezvous. On rendezvous exit, the cpuset is cleared and the vcpu + * will see an empty cpuset. So, the races are harmless. + */ + return (CPU_ISSET(vcpu_vcpuid(vcpu), info->rptr)); +} + +static inline int +vcpu_suspended(struct vm_eventinfo *info) +{ + return (*info->sptr); +} + +static inline int +vcpu_reqidle(struct vm_eventinfo *info) +{ + return (*info->iptr); +} #endif /* _KERNEL */ #endif /* !_DEV_VMM_VM_H_ */ diff --git a/sys/riscv/include/vmm.h b/sys/riscv/include/vmm.h index 3f321a1a285a..c346f09cc28c 100644 --- a/sys/riscv/include/vmm.h +++ b/sys/riscv/include/vmm.h @@ -115,6 +115,7 @@ enum vm_reg_name { struct vmm_mmio_region mmio_region[VM_MAX_MMIO_REGIONS] struct vm; +struct vm_eventinfo; struct vm_exception; struct vm_exit; struct vm_run; @@ -131,12 +132,6 @@ struct vmm_mmio_region { }; #define VM_MAX_MMIO_REGIONS 4 -struct vm_eventinfo { - void *rptr; /* rendezvous cookie */ - int *sptr; /* suspend cookie */ - int *iptr; /* reqidle cookie */ -}; - #define DECLARE_VMMOPS_FUNC(ret_type, opname, args) \ ret_type vmmops_##opname args @@ -160,16 +155,11 @@ DECLARE_VMMOPS_FUNC(struct vmspace *, vmspace_alloc, (vm_offset_t min, vm_offset_t max)); DECLARE_VMMOPS_FUNC(void, vmspace_free, (struct vmspace *vmspace)); -const char *vm_name(struct vm *vm); - int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval); int vm_set_register(struct vcpu *vcpu, int reg, uint64_t val); int vm_run(struct vcpu *vcpu); void *vm_get_cookie(struct vm *vm); -int vcpu_vcpuid(struct vcpu *vcpu); void *vcpu_get_cookie(struct vcpu *vcpu); -struct vm *vcpu_vm(struct vcpu *vcpu); -struct vcpu *vm_vcpu(struct vm *vm, int cpu); int vm_get_capability(struct vcpu *vcpu, int type, int *val); int vm_set_capability(struct vcpu *vcpu, int type, int val); int vm_inject_exception(struct vcpu *vcpu, uint64_t scause); @@ -182,24 +172,6 @@ struct vm_exit *vm_exitinfo(struct vcpu *vcpu); void vm_exit_suspended(struct vcpu *vcpu, uint64_t pc); void vm_exit_debug(struct vcpu *vcpu, uint64_t pc); void vm_exit_astpending(struct vcpu *vcpu, uint64_t pc); - -static __inline int -vcpu_rendezvous_pending(struct vm_eventinfo *info) -{ - - return (*((uintptr_t *)(info->rptr)) != 0); -} - -static __inline int -vcpu_suspended(struct vm_eventinfo *info) -{ - - return (*info->sptr); -} - -void *vcpu_stats(struct vcpu *vcpu); -struct vm_mem *vm_mem(struct vm *vm); - #endif /* _KERNEL */ #define VM_DIR_READ 0 diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c index b3ba626962f3..1546bde87b41 100644 --- a/sys/riscv/vmm/vmm.c +++ b/sys/riscv/vmm/vmm.c @@ -272,12 +272,6 @@ vm_reset(struct vm *vm) vm_init(vm, false); } -const char * -vm_name(struct vm *vm) -{ - return (vm->name); -} - int vm_gla2gpa_nofault(struct vcpu *vcpu, struct vm_guest_paging *paging, uint64_t gla, int prot, uint64_t *gpa, int *is_fault) @@ -393,19 +387,6 @@ vm_exit_debug(struct vcpu *vcpu, uint64_t pc) vmexit->exitcode = VM_EXITCODE_DEBUG; } -void * -vcpu_stats(struct vcpu *vcpu) -{ - - return (vcpu->stats); -} - -struct vm_mem * -vm_mem(struct vm *vm) -{ - return (&vm->mem); -} - static void restore_guest_fpustate(struct vcpu *vcpu) { @@ -478,20 +459,6 @@ vm_set_capability(struct vcpu *vcpu, int type, int val) return (vmmops_setcap(vcpu->cookie, type, val)); } -struct vm * -vcpu_vm(struct vcpu *vcpu) -{ - - return (vcpu->vm); -} - -int -vcpu_vcpuid(struct vcpu *vcpu) -{ - - return (vcpu->vcpuid); -} - void * vcpu_get_cookie(struct vcpu *vcpu) { @@ -499,13 +466,6 @@ vcpu_get_cookie(struct vcpu *vcpu) return (vcpu->cookie); } -struct vcpu * -vm_vcpu(struct vm *vm, int vcpuid) -{ - - return (vm->vcpu[vcpuid]); -} - int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval) { From nobody Thu Jan 8 21:58:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnJgT1lCMz6Mpmq for ; Thu, 08 Jan 2026 21:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnJgT0QHxz3Fkg for ; Thu, 08 Jan 2026 21:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767909493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhdnuJABl5skitvYxlLK/aIlgsOehwzuK6BLUgMcBnk=; b=DscRQoxlxbRm8w5/UxaEuiQ3b8CxnEfSj8BTvztsE5ckgRhdNqp/ETnDBcUiAROoocgR0q k/CIqcojzsJkIw4vsMK7ed6VBJ0RWuCpwf6XmsoyQeEGiRCrC34o7vyB82huQSsKv1HIVw 5ZuuVmF3TAOWb8oxloaHj2rVGx3mU/OOV74PyR4ZALRVnnFN/bwpE/Db0b3QyCRj4g7m+H lI55ojcWJTa8BH5EJnEKz0TT9BKNm+FI/ykzkjUU6WLiAjspvmzG5KltSeg1WcMerTcyb0 kQfIA05KwqDgtJKmdSQadzRr2uzLaKeZXNl0hfI69vhduboElZ2EE5yuB8+AOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767909493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhdnuJABl5skitvYxlLK/aIlgsOehwzuK6BLUgMcBnk=; b=LDXqMpp2u1aeNGJIfI0XfxgVtag610j4lMMntGDWHSlrDaIMt9mYSkjXn3X2S6c2K4EEdK nD9vu1zwOVoG3k2y0xwj1D0L7vBpuCRiNOE1Zyvu7I1zHzeESmh8VfIviI2zyLfyhPMfEh U5pe7+vb74xOG7YCqoIYABKLj4aNi9jLrCTvLGV16ngCLemomVPSLGETkrjRfW3N5RTAAs tHL04NUx3CZnL4k57l1xmwJ+iL42wYznUgF75rO4QfopF3wAdOM8Des2W7kAp9d8/Jqh6+ 5M2oRfAeTt6GeKUv/vyJU7BOvJuFxXLkds4O+62xWa7BxHxJDkE2w13j0EnNAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767909493; a=rsa-sha256; cv=none; b=bLuQ81vxuJWPxt209rEZ+dpzVAc4PQp3JU+jhzwZ47Y/OkUsW51qt+tN+3wyRO4JKm3Iic DX/QVlMwtiSfo+ItJeS9BHGtk3BVaJr2aVeINicVxRl1TiybRN2Rvjk/PmA+EBwtdKJsIU Ys11YSDBme3LUuMtXMnJChcj1mMmIsvWmfHNQiT9JWRFdLV5aQP6uGD8j4bavpw8sD7Ysf 6VgOGjx546DbD7gxObxSXORvimLuyxxPKFKyj3wdFMEFOw2PkBK1J7FU4G+vBbABXnLyFi f0CeOQVo+/OcJ+fT58IghMz+IYLGgGjRQu9T6oZycCXxvaCaJGmfCVkSkyPMuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnJgS6P4QzxJ0 for ; Thu, 08 Jan 2026 21:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23c48 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 21:58:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a6411f6b7df4 - main - vmm: Consolidate vm and vcpu definitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6411f6b7df46edc7167a7844ed443db7a91a031 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 21:58:07 +0000 Message-Id: <6960286f.23c48.6b4e6cc@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a6411f6b7df46edc7167a7844ed443db7a91a031 commit a6411f6b7df46edc7167a7844ed443db7a91a031 Author: Mark Johnston AuthorDate: 2026-01-08 21:53:31 +0000 Commit: Mark Johnston CommitDate: 2026-01-08 21:53:31 +0000 vmm: Consolidate vm and vcpu definitions There is quite a lot of duplication of code between amd64, arm64 and riscv with respect to VM and vCPU state management. This is a bit tricky to resolve since struct vm and struct vcpu are private to vmm.c and both structures contain a mix of machine-dependent and machine-independent fields. To allow deduplication without also introducing a lot of churn, follow the approach of struct pcpu and 1) lift the definitions of those structures into a new header, sys/dev/vmm/vmm_vm.h, and 2) define machine-dependent macros, VMM_VM_MD_FIELDS and VMM_VCPU_MD_FIELDS which lay out the machine-dependent fields. One disadvantage of this approach is that the two structures are no longer private to vmm.c, but I think this is acceptable. No functional change intended. A follow-up change will move a good deal of machine/vmm/vmm.c into sys/dev/vmm/vmm_vm.c. MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53584 --- sys/amd64/include/vmm.h | 55 +++++++------- sys/amd64/vmm/amd/svm.c | 2 +- sys/amd64/vmm/intel/vmx.c | 2 +- sys/amd64/vmm/io/vhpet.c | 3 +- sys/amd64/vmm/vmm.c | 83 +-------------------- sys/arm64/include/vmm.h | 71 +++++++++--------- sys/arm64/include/vmm_instruction_emul.h | 8 ++ sys/arm64/vmm/io/vgic_v3.c | 3 +- sys/arm64/vmm/vmm.c | 67 +---------------- sys/arm64/vmm/vmm_arm64.c | 2 +- sys/dev/vmm/vmm_dev.c | 1 + sys/dev/vmm/vmm_mem.c | 1 + sys/dev/vmm/vmm_mem.h | 3 + sys/dev/vmm/vmm_vm.h | 121 +++++++++++++++++++++++++++++++ sys/riscv/include/vmm.h | 44 +++++------ sys/riscv/include/vmm_instruction_emul.h | 6 ++ sys/riscv/vmm/vmm.c | 56 +------------- sys/riscv/vmm/vmm_aplic.c | 3 +- sys/riscv/vmm/vmm_fence.c | 8 +- sys/riscv/vmm/vmm_riscv.c | 2 +- 20 files changed, 239 insertions(+), 302 deletions(-) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index 5cf1ae2d769c..e1df85aa91b6 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -123,6 +123,33 @@ enum x2apic_state { #define VM_INTINFO_SWINTR (4 << 8) #ifdef _KERNEL +#define VMM_VCPU_MD_FIELDS \ + struct vlapic *vlapic; /* (i) APIC device model */ \ + enum x2apic_state x2apic_state; /* (i) APIC mode */ \ + uint64_t exitintinfo; /* (i) events pending at VM exit */ \ + int nmi_pending; /* (i) NMI pending */ \ + int extint_pending; /* (i) INTR pending */ \ + int exception_pending; /* (i) exception pending */ \ + int exc_vector; /* (x) exception collateral */ \ + int exc_errcode_valid; \ + uint32_t exc_errcode; \ + struct savefpu *guestfpu; /* (a,i) guest fpu state */ \ + uint64_t guest_xcr0; /* (i) guest %xcr0 register */ \ + struct vm_exit exitinfo; /* (x) exit reason and collateral */ \ + cpuset_t exitinfo_cpuset; /* (x) storage for vmexit handlers */ \ + uint64_t nextrip; /* (x) next instruction to execute */ \ + uint64_t tsc_offset /* (o) TSC offsetting */ + +#define VMM_VM_MD_FIELDS \ + cpuset_t startup_cpus; /* (i) [r] waiting for startup */ \ + void *iommu; /* (x) iommu-specific data */ \ + struct vioapic *vioapic; /* (i) virtual ioapic */ \ + struct vatpic *vatpic; /* (i) virtual atpic */ \ + struct vatpit *vatpit; /* (i) virtual atpit */ \ + struct vpmtmr *vpmtmr; /* (i) virtual ACPI PM timer */ \ + struct vrtc *vrtc; /* (o) virtual RTC */ \ + struct vhpet *vhpet /* (i) virtual HPET */ + struct vm; struct vm_exception; struct vm_mem; @@ -326,34 +353,6 @@ bool vmm_is_pptdev(int bus, int slot, int func); void *vm_iommu_domain(struct vm *vm); -enum vcpu_state { - VCPU_IDLE, - VCPU_FROZEN, - VCPU_RUNNING, - VCPU_SLEEPING, -}; - -int vcpu_set_state(struct vcpu *vcpu, enum vcpu_state state, bool from_idle); -int vcpu_set_state_all(struct vm *vm, enum vcpu_state state); -enum vcpu_state vcpu_get_state(struct vcpu *vcpu, int *hostcpu); - -static int __inline -vcpu_is_running(struct vcpu *vcpu, int *hostcpu) -{ - return (vcpu_get_state(vcpu, hostcpu) == VCPU_RUNNING); -} - -#ifdef _SYS_PROC_H_ -static int __inline -vcpu_should_yield(struct vcpu *vcpu) -{ - struct thread *td; - - td = curthread; - return (td->td_ast != 0 || td->td_owepreempt != 0); -} -#endif - void *vcpu_stats(struct vcpu *vcpu); void vcpu_notify_event(struct vcpu *vcpu); void vcpu_notify_lapic(struct vcpu *vcpu); diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 2fe6a5bc3584..37c950cfbc5f 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -50,12 +50,12 @@ #include #include #include -#include #include #include #include #include +#include #include "vmm_lapic.h" #include "vmm_stat.h" diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 4189c1214b40..7a2d0de6beff 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -53,13 +53,13 @@ #include #include -#include #include #include #include #include #include +#include #include "vmm_lapic.h" #include "vmm_host.h" diff --git a/sys/amd64/vmm/io/vhpet.c b/sys/amd64/vmm/io/vhpet.c index 88063f2952e5..cdeb5e059128 100644 --- a/sys/amd64/vmm/io/vhpet.c +++ b/sys/amd64/vmm/io/vhpet.c @@ -38,10 +38,11 @@ #include #include -#include #include #include + +#include #include #include "vmm_lapic.h" diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index f3f9717129c9..4b93e020f8dc 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -71,6 +71,7 @@ #include #include #include +#include #include "vmm_ioport.h" #include "vmm_host.h" @@ -91,88 +92,6 @@ struct vlapic; -/* - * Initialization: - * (a) allocated when vcpu is created - * (i) initialized when vcpu is created and when it is reinitialized - * (o) initialized the first time the vcpu is created - * (x) initialized before use - */ -struct vcpu { - struct mtx mtx; /* (o) protects 'state' and 'hostcpu' */ - enum vcpu_state state; /* (o) vcpu state */ - int vcpuid; /* (o) */ - int hostcpu; /* (o) vcpu's host cpu */ - int reqidle; /* (i) request vcpu to idle */ - struct vm *vm; /* (o) */ - void *cookie; /* (i) cpu-specific data */ - struct vlapic *vlapic; /* (i) APIC device model */ - enum x2apic_state x2apic_state; /* (i) APIC mode */ - uint64_t exitintinfo; /* (i) events pending at VM exit */ - int nmi_pending; /* (i) NMI pending */ - int extint_pending; /* (i) INTR pending */ - int exception_pending; /* (i) exception pending */ - int exc_vector; /* (x) exception collateral */ - int exc_errcode_valid; - uint32_t exc_errcode; - struct savefpu *guestfpu; /* (a,i) guest fpu state */ - uint64_t guest_xcr0; /* (i) guest %xcr0 register */ - void *stats; /* (a,i) statistics */ - struct vm_exit exitinfo; /* (x) exit reason and collateral */ - cpuset_t exitinfo_cpuset; /* (x) storage for vmexit handlers */ - uint64_t nextrip; /* (x) next instruction to execute */ - uint64_t tsc_offset; /* (o) TSC offsetting */ -}; - -#define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) -#define vcpu_lock_destroy(v) mtx_destroy(&((v)->mtx)) -#define vcpu_lock(v) mtx_lock_spin(&((v)->mtx)) -#define vcpu_unlock(v) mtx_unlock_spin(&((v)->mtx)) -#define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) - -/* - * Initialization: - * (o) initialized the first time the VM is created - * (i) initialized when VM is created and when it is reinitialized - * (x) initialized before use - * - * Locking: - * [m] mem_segs_lock - * [r] rendezvous_mtx - * [v] reads require one frozen vcpu, writes require freezing all vcpus - */ -struct vm { - void *cookie; /* (i) cpu-specific data */ - void *iommu; /* (x) iommu-specific data */ - struct vhpet *vhpet; /* (i) virtual HPET */ - struct vioapic *vioapic; /* (i) virtual ioapic */ - struct vatpic *vatpic; /* (i) virtual atpic */ - struct vatpit *vatpit; /* (i) virtual atpit */ - struct vpmtmr *vpmtmr; /* (i) virtual ACPI PM timer */ - struct vrtc *vrtc; /* (o) virtual RTC */ - volatile cpuset_t active_cpus; /* (i) active vcpus */ - volatile cpuset_t debug_cpus; /* (i) vcpus stopped for debug */ - cpuset_t startup_cpus; /* (i) [r] waiting for startup */ - int suspend; /* (i) stop VM execution */ - bool dying; /* (o) is dying */ - volatile cpuset_t suspended_cpus; /* (i) suspended vcpus */ - volatile cpuset_t halted_cpus; /* (x) cpus in a hard halt */ - cpuset_t rendezvous_req_cpus; /* (x) [r] rendezvous requested */ - cpuset_t rendezvous_done_cpus; /* (x) [r] rendezvous finished */ - void *rendezvous_arg; /* (x) [r] rendezvous func/arg */ - vm_rendezvous_func_t rendezvous_func; - struct mtx rendezvous_mtx; /* (o) rendezvous lock */ - struct vm_mem mem; /* (i) [m+v] guest memory */ - char name[VM_MAX_NAMELEN+1]; /* (o) virtual machine name */ - struct vcpu **vcpu; /* (o) guest vcpus */ - /* The following describe the vm cpu topology */ - uint16_t sockets; /* (o) num of sockets */ - uint16_t cores; /* (o) num of cores/socket */ - uint16_t threads; /* (o) num of threads/core */ - uint16_t maxcpus; /* (o) max pluggable cpus */ - struct sx vcpus_init_lock; /* (o) */ -}; - #define VMM_CTR0(vcpu, format) \ VCPU_CTR0((vcpu)->vm, (vcpu)->vcpuid, format) diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index e67540eac66d..16292dd42f28 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -107,14 +107,33 @@ enum vm_reg_name { #define VM_GUEST_BASE_IPA 0x80000000UL /* Guest kernel start ipa */ #ifdef _KERNEL -struct vm; -struct vm_exception; -struct vm_exit; -struct vm_run; -struct vm_object; -struct vm_guest_paging; -struct vm_vgic_descr; -struct pmap; +#include + +#define VMM_VCPU_MD_FIELDS \ + struct vm_exit exitinfo; \ + uint64_t nextpc; /* (x) next instruction to execute */ \ + struct vfpstate *guestfpu /* (a,i) guest fpu state */ + +#define VMM_VM_MD_FIELDS \ + struct vmm_mmio_region mmio_region[VM_MAX_MMIO_REGIONS]; \ + struct vmm_special_reg special_reg[VM_MAX_SPECIAL_REGS] + +struct vmm_mmio_region { + uint64_t start; + uint64_t end; + mem_region_read_t read; + mem_region_write_t write; +}; +#define VM_MAX_MMIO_REGIONS 4 + +struct vmm_special_reg { + uint32_t esr_iss; + uint32_t esr_mask; + reg_read_t reg_read; + reg_write_t reg_write; + void *arg; +}; +#define VM_MAX_SPECIAL_REGS 16 struct vm_eventinfo { void *rptr; /* rendezvous cookie */ @@ -125,6 +144,15 @@ struct vm_eventinfo { #define DECLARE_VMMOPS_FUNC(ret_type, opname, args) \ ret_type vmmops_##opname args +struct vm; +struct vm_exception; +struct vm_exit; +struct vm_run; +struct vm_object; +struct vm_guest_paging; +struct vm_vgic_descr; +struct pmap; + DECLARE_VMMOPS_FUNC(int, modinit, (int ipinum)); DECLARE_VMMOPS_FUNC(int, modcleanup, (void)); DECLARE_VMMOPS_FUNC(void *, init, (struct vm *vm, struct pmap *pmap)); @@ -213,33 +241,6 @@ vcpu_suspended(struct vm_eventinfo *info) int vcpu_debugged(struct vcpu *vcpu); -enum vcpu_state { - VCPU_IDLE, - VCPU_FROZEN, - VCPU_RUNNING, - VCPU_SLEEPING, -}; - -int vcpu_set_state(struct vcpu *vcpu, enum vcpu_state state, bool from_idle); -enum vcpu_state vcpu_get_state(struct vcpu *vcpu, int *hostcpu); - -static int __inline -vcpu_is_running(struct vcpu *vcpu, int *hostcpu) -{ - return (vcpu_get_state(vcpu, hostcpu) == VCPU_RUNNING); -} - -#ifdef _SYS_PROC_H_ -static int __inline -vcpu_should_yield(struct vcpu *vcpu) -{ - struct thread *td; - - td = curthread; - return (td->td_ast != 0 || td->td_owepreempt != 0); -} -#endif - void *vcpu_stats(struct vcpu *vcpu); void vcpu_notify_event(struct vcpu *vcpu); struct vm_mem *vm_mem(struct vm *vm); diff --git a/sys/arm64/include/vmm_instruction_emul.h b/sys/arm64/include/vmm_instruction_emul.h index a295f7cce127..dc281f442543 100644 --- a/sys/arm64/include/vmm_instruction_emul.h +++ b/sys/arm64/include/vmm_instruction_emul.h @@ -27,6 +27,14 @@ #ifndef _VMM_INSTRUCTION_EMUL_H_ #define _VMM_INSTRUCTION_EMUL_H_ +#include + +struct vcpu; +struct vm; +struct vie; +struct vre; +struct vm_guest_paging; + /* * Callback functions to read and write memory regions. */ diff --git a/sys/arm64/vmm/io/vgic_v3.c b/sys/arm64/vmm/io/vgic_v3.c index 023406c64182..e4f7bb2af3ee 100644 --- a/sys/arm64/vmm/io/vgic_v3.c +++ b/sys/arm64/vmm/io/vgic_v3.c @@ -57,7 +57,6 @@ #include #include #include -#include #include #include @@ -69,6 +68,8 @@ #include #include +#include + #include "vgic.h" #include "vgic_v3.h" #include "vgic_v3_reg.h" diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c index 31d2fb3f516b..75f7f2fcaaf7 100644 --- a/sys/arm64/vmm/vmm.c +++ b/sys/arm64/vmm/vmm.c @@ -61,10 +61,12 @@ #include #include + #include #include #include #include +#include #include "arm64.h" #include "mmu.h" @@ -72,71 +74,6 @@ #include "io/vgic.h" #include "io/vtimer.h" -struct vcpu { - int flags; - enum vcpu_state state; - struct mtx mtx; - int hostcpu; /* host cpuid this vcpu last ran on */ - int vcpuid; - void *stats; - struct vm_exit exitinfo; - uint64_t nextpc; /* (x) next instruction to execute */ - struct vm *vm; /* (o) */ - void *cookie; /* (i) cpu-specific data */ - struct vfpstate *guestfpu; /* (a,i) guest fpu state */ -}; - -#define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) -#define vcpu_lock_destroy(v) mtx_destroy(&((v)->mtx)) -#define vcpu_lock(v) mtx_lock_spin(&((v)->mtx)) -#define vcpu_unlock(v) mtx_unlock_spin(&((v)->mtx)) -#define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) - -struct vmm_mmio_region { - uint64_t start; - uint64_t end; - mem_region_read_t read; - mem_region_write_t write; -}; -#define VM_MAX_MMIO_REGIONS 4 - -struct vmm_special_reg { - uint32_t esr_iss; - uint32_t esr_mask; - reg_read_t reg_read; - reg_write_t reg_write; - void *arg; -}; -#define VM_MAX_SPECIAL_REGS 16 - -/* - * Initialization: - * (o) initialized the first time the VM is created - * (i) initialized when VM is created and when it is reinitialized - * (x) initialized before use - */ -struct vm { - void *cookie; /* (i) cpu-specific data */ - volatile cpuset_t active_cpus; /* (i) active vcpus */ - volatile cpuset_t debug_cpus; /* (i) vcpus stopped for debug */ - int suspend; /* (i) stop VM execution */ - bool dying; /* (o) is dying */ - volatile cpuset_t suspended_cpus; /* (i) suspended vcpus */ - volatile cpuset_t halted_cpus; /* (x) cpus in a hard halt */ - struct vm_mem mem; /* (i) guest memory */ - char name[VM_MAX_NAMELEN + 1]; /* (o) virtual machine name */ - struct vcpu **vcpu; /* (i) guest vcpus */ - struct vmm_mmio_region mmio_region[VM_MAX_MMIO_REGIONS]; - /* (o) guest MMIO regions */ - struct vmm_special_reg special_reg[VM_MAX_SPECIAL_REGS]; - /* The following describe the vm cpu topology */ - uint16_t sockets; /* (o) num of sockets */ - uint16_t cores; /* (o) num of cores/socket */ - uint16_t threads; /* (o) num of threads/core */ - uint16_t maxcpus; /* (o) max pluggable cpus */ - struct sx vcpus_init_lock; /* (o) */ -}; - static int vm_handle_wfi(struct vcpu *vcpu, struct vm_exit *vme, bool *retu); diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index aa1361049f49..d529f000b828 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -52,12 +52,12 @@ #include #include #include -#include #include #include #include #include +#include #include "mmu.h" #include "arm64.h" diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index 840e810a39fb..eda15cc88b28 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef __amd64__ #ifdef COMPAT_FREEBSD12 diff --git a/sys/dev/vmm/vmm_mem.c b/sys/dev/vmm/vmm_mem.c index 5ae944713c81..5a73cbf7fc5b 100644 --- a/sys/dev/vmm/vmm_mem.c +++ b/sys/dev/vmm/vmm_mem.c @@ -23,6 +23,7 @@ #include #include +#include static void vm_free_memmap(struct vm *vm, int ident); diff --git a/sys/dev/vmm/vmm_mem.h b/sys/dev/vmm/vmm_mem.h index f3d22058c7b8..64bb29352a55 100644 --- a/sys/dev/vmm/vmm_mem.h +++ b/sys/dev/vmm/vmm_mem.h @@ -34,7 +34,10 @@ enum { #include #include +struct domainset; +struct vcpu; struct vm; +struct vm_guest_paging; struct vm_object; struct vmspace; diff --git a/sys/dev/vmm/vmm_vm.h b/sys/dev/vmm/vmm_vm.h new file mode 100644 index 000000000000..23f40e079da4 --- /dev/null +++ b/sys/dev/vmm/vmm_vm.h @@ -0,0 +1,121 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2011 NetApp, Inc. + * All rights reserved. + */ + +#ifndef _DEV_VMM_VM_H_ +#define _DEV_VMM_VM_H_ + +#ifdef _KERNEL + +#include + +#include +#include + +struct vcpu; + +enum vcpu_state { + VCPU_IDLE, + VCPU_FROZEN, + VCPU_RUNNING, + VCPU_SLEEPING, +}; + +/* + * Initialization: + * (a) allocated when vcpu is created + * (i) initialized when vcpu is created and when it is reinitialized + * (o) initialized the first time the vcpu is created + * (x) initialized before use + */ +struct vcpu { + struct mtx mtx; /* (o) protects 'state' and 'hostcpu' */ + enum vcpu_state state; /* (o) vcpu state */ + int vcpuid; /* (o) */ + int hostcpu; /* (o) vcpu's host cpu */ + int reqidle; /* (i) request vcpu to idle */ + struct vm *vm; /* (o) */ + void *cookie; /* (i) cpu-specific data */ + void *stats; /* (a,i) statistics */ + + VMM_VCPU_MD_FIELDS; +}; + +#define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) +#define vcpu_lock_destroy(v) mtx_destroy(&((v)->mtx)) +#define vcpu_lock(v) mtx_lock_spin(&((v)->mtx)) +#define vcpu_unlock(v) mtx_unlock_spin(&((v)->mtx)) +#define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) + +int vcpu_set_state(struct vcpu *vcpu, enum vcpu_state state, bool from_idle); +#ifdef __amd64__ +int vcpu_set_state_all(struct vm *vm, enum vcpu_state state); +#endif +enum vcpu_state vcpu_get_state(struct vcpu *vcpu, int *hostcpu); + +static int __inline +vcpu_is_running(struct vcpu *vcpu, int *hostcpu) +{ + return (vcpu_get_state(vcpu, hostcpu) == VCPU_RUNNING); +} + +#ifdef _SYS_PROC_H_ +static int __inline +vcpu_should_yield(struct vcpu *vcpu) +{ + struct thread *td; + + td = curthread; + return (td->td_ast != 0 || td->td_owepreempt != 0); +} +#endif + +typedef void (*vm_rendezvous_func_t)(struct vcpu *vcpu, void *arg); + +/* + * Initialization: + * (o) initialized the first time the VM is created + * (i) initialized when VM is created and when it is reinitialized + * (x) initialized before use + * + * Locking: + * [m] mem_segs_lock + * [r] rendezvous_mtx + * [v] reads require one frozen vcpu, writes require freezing all vcpus + */ +struct vm { + void *cookie; /* (i) cpu-specific data */ + struct vcpu **vcpu; /* (o) guest vcpus */ + struct vm_mem mem; /* (i) [m+v] guest memory */ + + char name[VM_MAX_NAMELEN + 1]; /* (o) virtual machine name */ + struct sx vcpus_init_lock; /* (o) */ + + bool dying; /* (o) is dying */ + int suspend; /* (i) stop VM execution */ + + volatile cpuset_t active_cpus; /* (i) active vcpus */ + volatile cpuset_t debug_cpus; /* (i) vcpus stopped for debug */ + volatile cpuset_t suspended_cpus; /* (i) suspended vcpus */ + volatile cpuset_t halted_cpus; /* (x) cpus in a hard halt */ + + cpuset_t rendezvous_req_cpus; /* (x) [r] rendezvous requested */ + cpuset_t rendezvous_done_cpus; /* (x) [r] rendezvous finished */ + void *rendezvous_arg; /* (x) [r] rendezvous func/arg */ + vm_rendezvous_func_t rendezvous_func; + struct mtx rendezvous_mtx; /* (o) rendezvous lock */ + + uint16_t sockets; /* (o) num of sockets */ + uint16_t cores; /* (o) num of cores/socket */ + uint16_t threads; /* (o) num of threads/core */ + uint16_t maxcpus; /* (o) max pluggable cpus */ + + VMM_VM_MD_FIELDS; +}; + +#endif /* _KERNEL */ + +#endif /* !_DEV_VMM_VM_H_ */ diff --git a/sys/riscv/include/vmm.h b/sys/riscv/include/vmm.h index 361140834805..a7318294464c 100644 --- a/sys/riscv/include/vmm.h +++ b/sys/riscv/include/vmm.h @@ -104,6 +104,15 @@ enum vm_reg_name { #define VM_INTINFO_SWINTR (4 << 8) #ifdef _KERNEL +#include + +#define VMM_VCPU_MD_FIELDS \ + struct vm_exit exitinfo; \ + uint64_t nextpc; /* (x) next instruction to execute */ \ + struct fpreg *guestfpu /* (a,i) guest fpu state */ + +#define VMM_VM_MD_FIELDS \ + struct vmm_mmio_region mmio_region[VM_MAX_MMIO_REGIONS] struct vm; struct vm_exception; @@ -114,6 +123,14 @@ struct vm_guest_paging; struct vm_aplic_descr; struct pmap; +struct vmm_mmio_region { + uint64_t start; + uint64_t end; + mem_region_read_t read; + mem_region_write_t write; +}; +#define VM_MAX_MMIO_REGIONS 4 + struct vm_eventinfo { void *rptr; /* rendezvous cookie */ int *sptr; /* suspend cookie */ @@ -203,33 +220,6 @@ vcpu_suspended(struct vm_eventinfo *info) int vcpu_debugged(struct vcpu *vcpu); -enum vcpu_state { - VCPU_IDLE, - VCPU_FROZEN, - VCPU_RUNNING, - VCPU_SLEEPING, -}; - -int vcpu_set_state(struct vcpu *vcpu, enum vcpu_state state, bool from_idle); -enum vcpu_state vcpu_get_state(struct vcpu *vcpu, int *hostcpu); - -static int __inline -vcpu_is_running(struct vcpu *vcpu, int *hostcpu) -{ - return (vcpu_get_state(vcpu, hostcpu) == VCPU_RUNNING); -} - -#ifdef _SYS_PROC_H_ -static int __inline -vcpu_should_yield(struct vcpu *vcpu) -{ - struct thread *td; - - td = curthread; - return (td->td_ast != 0 || td->td_owepreempt != 0); -} -#endif - void *vcpu_stats(struct vcpu *vcpu); void vcpu_notify_event(struct vcpu *vcpu); struct vm_mem *vm_mem(struct vm *vm); diff --git a/sys/riscv/include/vmm_instruction_emul.h b/sys/riscv/include/vmm_instruction_emul.h index bee63d2f86ba..5041b10569f5 100644 --- a/sys/riscv/include/vmm_instruction_emul.h +++ b/sys/riscv/include/vmm_instruction_emul.h @@ -29,6 +29,12 @@ #ifndef _VMM_INSTRUCTION_EMUL_H_ #define _VMM_INSTRUCTION_EMUL_H_ +struct vcpu; +struct vie; +struct vre; +struct vm; +struct vm_guest_paging; + /* * Callback functions to read and write memory regions. */ diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c index 23b57ad3b7aa..fea6421962dc 100644 --- a/sys/riscv/vmm/vmm.c +++ b/sys/riscv/vmm/vmm.c @@ -71,67 +71,13 @@ #include #include #include +#include #include "vmm_stat.h" #include "riscv.h" #include "vmm_aplic.h" -struct vcpu { - int flags; - enum vcpu_state state; - struct mtx mtx; - int hostcpu; /* host cpuid this vcpu last ran on */ - int vcpuid; - void *stats; - struct vm_exit exitinfo; - uint64_t nextpc; /* (x) next instruction to execute */ - struct vm *vm; /* (o) */ - void *cookie; /* (i) cpu-specific data */ - struct fpreg *guestfpu; /* (a,i) guest fpu state */ -}; - -#define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) -#define vcpu_lock_destroy(v) mtx_destroy(&((v)->mtx)) -#define vcpu_lock(v) mtx_lock_spin(&((v)->mtx)) -#define vcpu_unlock(v) mtx_unlock_spin(&((v)->mtx)) -#define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) - -struct vmm_mmio_region { - uint64_t start; - uint64_t end; - mem_region_read_t read; - mem_region_write_t write; -}; -#define VM_MAX_MMIO_REGIONS 4 - -/* - * Initialization: - * (o) initialized the first time the VM is created - * (i) initialized when VM is created and when it is reinitialized - * (x) initialized before use - */ -struct vm { - void *cookie; /* (i) cpu-specific data */ - volatile cpuset_t active_cpus; /* (i) active vcpus */ - volatile cpuset_t debug_cpus; /* (i) vcpus stopped for debug*/ - int suspend; /* (i) stop VM execution */ - bool dying; /* (o) is dying */ - volatile cpuset_t suspended_cpus; /* (i) suspended vcpus */ - volatile cpuset_t halted_cpus; /* (x) cpus in a hard halt */ - struct vm_mem mem; /* (i) [m+v] guest memory */ - char name[VM_MAX_NAMELEN + 1]; /* (o) virtual machine name */ - struct vcpu **vcpu; /* (i) guest vcpus */ - struct vmm_mmio_region mmio_region[VM_MAX_MMIO_REGIONS]; - /* (o) guest MMIO regions */ - /* The following describe the vm cpu topology */ - uint16_t sockets; /* (o) num of sockets */ - uint16_t cores; /* (o) num of cores/socket */ - uint16_t threads; /* (o) num of threads/core */ - uint16_t maxcpus; /* (o) max pluggable cpus */ - struct sx vcpus_init_lock; /* (o) */ -}; - static MALLOC_DEFINE(M_VMM, "vmm", "vmm"); /* statistics */ diff --git a/sys/riscv/vmm/vmm_aplic.c b/sys/riscv/vmm/vmm_aplic.c index 74cb4fef4273..eaf2caa4d313 100644 --- a/sys/riscv/vmm/vmm_aplic.c +++ b/sys/riscv/vmm/vmm_aplic.c @@ -46,7 +46,8 @@ #include #include -#include + +#include MALLOC_DEFINE(M_APLIC, "RISC-V VMM APLIC", "RISC-V AIA APLIC"); diff --git a/sys/riscv/vmm/vmm_fence.c b/sys/riscv/vmm/vmm_fence.c index f8b69aac77a9..ff7eabdb3d50 100644 --- a/sys/riscv/vmm/vmm_fence.c +++ b/sys/riscv/vmm/vmm_fence.c @@ -39,6 +39,10 @@ #include #include +#include + +#include + #include "riscv.h" #include "vmm_fence.h" @@ -145,7 +149,6 @@ vmm_fence_add(struct vm *vm, cpuset_t *cpus, struct vmm_fence *fence) struct vcpu *vcpu; uint16_t maxcpus; int hostcpu; - int state; bool enq; int i; @@ -193,8 +196,7 @@ vmm_fence_add(struct vm *vm, cpuset_t *cpus, struct vmm_fence *fence) mb(); - state = vcpu_get_state(vcpu, &hostcpu); - if (state == VCPU_RUNNING) + if (vcpu_is_running(vcpu, &hostcpu)) CPU_SET(hostcpu, &running_cpus); } diff --git a/sys/riscv/vmm/vmm_riscv.c b/sys/riscv/vmm/vmm_riscv.c index 0e46aca60fdf..cfd3decd8cfa 100644 --- a/sys/riscv/vmm/vmm_riscv.c +++ b/sys/riscv/vmm/vmm_riscv.c @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -67,6 +66,7 @@ #include #include +#include #include "riscv.h" #include "vmm_aplic.h" From nobody Thu Jan 8 23:31:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnLlH710zz6MwVm for ; Thu, 08 Jan 2026 23:31: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnLlH5szFz3Qr5 for ; Thu, 08 Jan 2026 23:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767915099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqbUQITqNqTI0h+lXeH+z0LJhgcGRtUJGYeY8ViCm2U=; b=wU5S0GEAqwiqPoKUrT2D5A+2lNV+0d4IuJgJoSDsxpRIaOagTZA5NFbnhzDqjlVqeWsm0u PJlLyE3pCKaj6nG3d3QGUrWpAtFEbLvjIyF9y6e9jpNOsREEDfJgjOh4Sv/oflh89oi1Uc rQ1U/XCuQuOjRQUt6OM4XiXfeEmeoa1e3HpD/0bar6/PDg4jzB9fy1EUBXdF5UOL279iV1 ySlKTYTBXeDdHOxpo4EWFiSpNGWGzfEM+Yp/NFQUvWogKPxfJ9OC9iyuCNcadmmpEIEpbs gPQYHn6B86tXLvUTrpzknmkITq2kIFp7KCOhyy8Wu5QYUf0yJRHqU8Pp9rzjpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767915099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqbUQITqNqTI0h+lXeH+z0LJhgcGRtUJGYeY8ViCm2U=; b=lKJOWEFYwkiFUu10+TwTQIdFCFNU11Z/IlpxEC+BDLSdjjBJ53eFTQLvkN7A2UEvQqQY11 jIKbFDAgw0szrdejOmyzFFV3+ei1qILYZ4CVMo7VjQo+zSLDUQg5vft6HUvV8Ow/bg6NhG U0nk1H9QuxWp4ISJ8pyTW4Ej41qdZYfZC5texC7BIcGGY9RvR9DJuBjaBaLjNIEfQUtxez MBoHvMqx1Il+k2B8FBN6OCGcWmF34o3dXbke/iodjSxsdUf9gXBKLPdYCidh3vUIuUgm4X Yc+4fcc1rHR1uyWhCS9g5IOKxx93vlGB7J1I1gkLl0+zxVCBkbk4eaGhR1JkNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767915099; a=rsa-sha256; cv=none; b=FCLJS5EYIr0wrNb5ek6NdR8UmnXKedI3vPV8/5iefT2/u8YQdZO69EKMFmb+iAIV84eDZ0 aeIkxd/QHFqqJiGQ0rMw5haj/0DKdUyyK4P8aqO7qz3aGL0Wx15V/UDQi4GeCXnDsdZQCw /mJrSsbkMkp0MsKmAHRUlKCw5lSLaeAKvE+uGSbRB8HB4Riv3hRL+Htn44/38chEP2WWeZ RrsQ41HfDh5vGDOd0m6pJbgf2BeqnsFrua8JPhwK3kHkJ1uWe7rruGh1PylrHtv0UoIulO FKxA2gtRaL8YzdBCLo+aKy5rOKblx7Qgl7RPwdnooGpU01hAqe1CHCEg+rnZRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnLlH5PFbz10WW for ; Thu, 08 Jan 2026 23:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3503d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 23:31:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0aaa95ae0280 - main - vmm: Add an include to vmm_ktr.h for vm_name() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0aaa95ae02803ba0195c5da695ffbb17a79135bc Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 23:31:34 +0000 Message-Id: <69603e56.3503d.53c93aef@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0aaa95ae02803ba0195c5da695ffbb17a79135bc commit 0aaa95ae02803ba0195c5da695ffbb17a79135bc Author: Mark Johnston AuthorDate: 2026-01-08 23:29:06 +0000 Commit: Mark Johnston CommitDate: 2026-01-08 23:29:06 +0000 vmm: Add an include to vmm_ktr.h for vm_name() Required when KTR is configured. Remove the pcpu.h include while here, as it seems to be unneeded. Reported by: Jenkins Fixes: 5f13d6b60740 ("vmm: Move common accessors and vm_eventinfo into sys/dev/vmm") --- sys/dev/vmm/vmm_ktr.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/vmm/vmm_ktr.h b/sys/dev/vmm/vmm_ktr.h index 20370a229530..afd9831e4225 100644 --- a/sys/dev/vmm/vmm_ktr.h +++ b/sys/dev/vmm/vmm_ktr.h @@ -30,7 +30,9 @@ #define _VMM_KTR_H_ #include -#include +#ifdef KTR +#include +#endif #ifndef KTR_VMM #define KTR_VMM KTR_GEN From nobody Fri Jan 9 00:33:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnN6b3Qwsz6N11k for ; Fri, 09 Jan 2026 00:33: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnN6b1G8Kz3WFG for ; Fri, 09 Jan 2026 00:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767918807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acrlZNdxPzH7BYesYB1oIob4VOgeMAvr88rItBTkECA=; b=nj1eqYrqaGQLISAoAmn9W//tmy7ReJQxDH8SKe9yRJJ6j8UsINoK//aP4yUPh8/jfEHa6d PyfxRF1tMn1f/JZx4CX2VBrxyhP2pn50QA6BpfzwU/GlEinpuIWXifimAjAIlpTMm59ubT Xk9z6oeTb+qTEX4FqKkU5xIz0/kUF3fYsjEVB8wcwnjsg+oLPrULDXYNpTysDryOfh3Nun BT9Z2k8uJk7sjvrDtWCU//D5oVI7aNx0TPJbvahOt5HAGLQAW6Rqw8g2bZVW/l6K/iq7+f fYVcs1JLpaNqBUn3hb0chC8n1pFtOjnhQmQMa+bF+wMyyUSg9iJEV6Z9uYfksw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767918807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acrlZNdxPzH7BYesYB1oIob4VOgeMAvr88rItBTkECA=; b=OxQcaUsOfEUgpc4H44O9G7+A15T7OGkF018EBJ3JokaWHuP16yTH/cOwYOpjJf9vl1/URd XpA6k7HNADb5zAkPffT9lo9bBjmX2/Atp0FNdNEtXLfbiiZOHT9IsRRnfbN/DXTN2wnd1y RM0jgRlyxSvM3Mct8uWVNWsFkXwaORq5unYv+1NmUw57FNZXK7e7fNDnAmYlaJjOiLZ80k lZlsdbhxGInDrF+LocWTUBMblDsoXmjNfjyWInhDusz6RkGgsrpMN20pPq7U2q4xtWSLb4 tiWL+HWm4UFhgpjBnOgqeXz3t5Fuq8ulW/aIdVS7ys3VB5u8aa7hUpc1qvLKag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767918807; a=rsa-sha256; cv=none; b=EZnXh85KMysPsOzbdtlFk3+O336yl9XkBwK3Cz/blIJv8CmYsyau4hKdFbCUq09nmWsNG/ XD3bSPrUQwQ75/gYL4A2Ycrhx0+PENn+lcGkz4F5jDQA+/2YVbOIUbDxWMQpRCJsanj04/ k8bxuuyyKmUnI9N2zvdXvngSqD3awngKwbYJG5xcaPVEJrOTY9w87wv5jTH2fPtr5Y1XSQ VsbcT3jI8seMMNCl9ToNBrg3oi8X5K8IrolBgsBw++AHR1Ud2ALkCfNv8PBjISfXWmGFuf 7M636RB3ZA3HjpBM1q/ZRrw8ZUhFS1m4RG6ETd+MNH5HotDOgwCfqj0reDfv9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnN6b0jVBz12Bt for ; Fri, 09 Jan 2026 00:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3aebd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 00:33:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: a6d57f312f18 - main - nfsd: Fix handling of hidden/system during Open/Create List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a6d57f312f18bbeeda8a34e99d0a662b0db9a190 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 00:33:27 +0000 Message-Id: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a6d57f312f18bbeeda8a34e99d0a662b0db9a190 commit a6d57f312f18bbeeda8a34e99d0a662b0db9a190 Author: Rick Macklem AuthorDate: 2026-01-08 16:27:32 +0000 Commit: Rick Macklem CommitDate: 2026-01-08 16:27:32 +0000 nfsd: Fix handling of hidden/system during Open/Create When an NFSv4.n client specifies settings for the archive, hidden and/or system attributes during a Open/Create, the Open/Create fails for ZFS. This is caused by ZFS doing a secpolicy_xvattr() call, which fails for non-root. If this check is bypassed, ZFS panics. This patch resolves the problem by disabling va_flags for the VOP_CREATE() call in the NFSv4.n server and then setting the flags with a subsequent VOP_SETATTR(). This problem only affects FreeBSD-15 and main, since the archive, system and hidden attributes are not enabled for FreeBSD-14. I think a similar problem exists for the NFSv4.n Open/Create/Exclusive_41, but that will be resolved in a future commit. Note that the Linux, Solaris and FreeBSD clients do not set archive, hidden or system for Open/Create, so the bug does not affect mounts from those clients. PR: 292283 Reported by: Aurelien Couderc Tested by: Aurelien Couderc MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdport.c | 11 +++++++++++ sys/fs/nfsserver/nfs_nfsdsubs.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 7d64f211b058..1e215b52e835 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -1977,6 +1977,7 @@ nfsvno_open(struct nfsrv_descript *nd, struct nameidata *ndp, struct nfsexstuff nes; struct thread *p = curthread; uint32_t oldrepstat; + u_long savflags; if (ndp->ni_vp == NULL) { /* @@ -1991,6 +1992,15 @@ nfsvno_open(struct nfsrv_descript *nd, struct nameidata *ndp, } if (!nd->nd_repstat) { if (ndp->ni_vp == NULL) { + /* + * Most file systems ignore va_flags for + * VOP_CREATE(), however setting va_flags + * for VOP_CREATE() causes problems for ZFS. + * So disable them and let nfsrv_fixattr() + * do them, as required. + */ + savflags = nvap->na_flags; + nvap->na_flags = VNOVAL; nd->nd_repstat = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, &nvap->na_vattr); /* For a pNFS server, create the data file on a DS. */ @@ -2003,6 +2013,7 @@ nfsvno_open(struct nfsrv_descript *nd, struct nameidata *ndp, nfsrv_pnfscreate(ndp->ni_vp, &nvap->na_vattr, cred, p); } + nvap->na_flags = savflags; VOP_VPUT_PAIR(ndp->ni_dvp, nd->nd_repstat == 0 ? &ndp->ni_vp : NULL, false); nfsvno_relpathbuf(ndp); diff --git a/sys/fs/nfsserver/nfs_nfsdsubs.c b/sys/fs/nfsserver/nfs_nfsdsubs.c index ea8382e4282a..c8c78d98be72 100644 --- a/sys/fs/nfsserver/nfs_nfsdsubs.c +++ b/sys/fs/nfsserver/nfs_nfsdsubs.c @@ -1697,6 +1697,44 @@ nfsrv_fixattr(struct nfsrv_descript *nd, vnode_t vp, NFSCLRBIT_ATTRBIT(attrbitp, NFSATTRBIT_OWNERGROUP); } } + + /* + * For archive, ZFS sets it by default for new files, + * so if specified, it must be set or cleared. + * For hidden and system, no file system sets them + * by default upon creation, so they only need to be + * set and not cleared. + */ + if (NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_ARCHIVE)) { + if (nva.na_flags == VNOVAL) + nva.na_flags = 0; + if ((nvap->na_flags & UF_ARCHIVE) != 0) + nva.na_flags |= UF_ARCHIVE; + change++; + NFSSETBIT_ATTRBIT(&nattrbits, NFSATTRBIT_ARCHIVE); + } + if (NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_HIDDEN)) { + if ((nvap->na_flags & UF_HIDDEN) != 0) { + if (nva.na_flags == VNOVAL) + nva.na_flags = 0; + nva.na_flags |= UF_HIDDEN; + change++; + NFSSETBIT_ATTRBIT(&nattrbits, NFSATTRBIT_HIDDEN); + } else { + NFSCLRBIT_ATTRBIT(attrbitp, NFSATTRBIT_HIDDEN); + } + } + if (NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_SYSTEM)) { + if ((nvap->na_flags & UF_SYSTEM) != 0) { + if (nva.na_flags == VNOVAL) + nva.na_flags = 0; + nva.na_flags |= UF_SYSTEM; + change++; + NFSSETBIT_ATTRBIT(&nattrbits, NFSATTRBIT_SYSTEM); + } else { + NFSCLRBIT_ATTRBIT(attrbitp, NFSATTRBIT_SYSTEM); + } + } if (change) { error = nfsvno_setattr(vp, &nva, nd->nd_cred, p, exp); if (error) { From nobody Fri Jan 9 04:43:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnTg05YmTz6NGyj for ; Fri, 09 Jan 2026 04:43: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnTg04FGGz3sMb for ; Fri, 09 Jan 2026 04:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767933804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kkyfKBBqRxntbpvjqDLi5VTBMvz7uXVJkMHz7z7U0WU=; b=aU0RReMQt978mvWFFNZIRDqjbtX4qXem3fMA888ZiLkUbHrcfRwdh8RcsDmEqJ5dhTbu/U Ya9Lir49Y0ehBfn/d2JmJmvVojibH4BwrxkSACpyoqLIZaIAcvSl4owHHtiyVn4HfndYch ke3EPK5nDVRCKvzRVoFvhvlQ5EpvBiHvJxPLxWa3AfpO+Poss5tnUigaB/dDEIj+EE97iH A2Tcti318ZwScLrgstTRYklRcKgOA0HUwcMBavWdSAFQiJ6dOWEe3JFWoeAxXVMp5ORjbl OTiSHzL60opmUQQhzx7ze5zP9xcNbSOzHtaXhMiCY9l7fdwHTwCbPq64mimALg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767933804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kkyfKBBqRxntbpvjqDLi5VTBMvz7uXVJkMHz7z7U0WU=; b=bYXKUZ24RHKObK6UZbTNdlBQl0eDPw8ReKGc2vCvuKIsrsYae455oTx3mQmQmNETfWvYeR 5eq8Qxo1oPKKj/1y/rW1G1yJUhK0rIUi8oO1hYFjEgk9OMgnijcBANbFcMWrGAzdvbMa3o +b3jUD2Ugx2fiuNUPbVssGqg9xVG1w0mVdtNPXLqOs3wUnjn3/9Pqxdj7L/a16aqzxWOUc 0Zzi/jlnS7i2sfn+ILCCZ4RdDO6CHEVv5FDPbJ3YChOQEJcfdAejePxRKmc9RR9AQTUtC9 JafWFJg4YE4cINT3XAGWw0bfXL+hzxlm+Ps5BiTh+hVDiQMXFKReWBBjG0HYfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767933804; a=rsa-sha256; cv=none; b=Cs0Ep3aICGCpOujIqmbPRF3vdhdVDc/FJoq5ISLz/7uAslQRVTPDXLl9m+5twrT1ptiKS9 XEOQ8lA/4scnSGRRYdln2ka1dnez8ydzNaH/2s6XzQIhmeQX/f4QmarI5zZuGBYk+HRDSV FIx3mOB1IaaZODkBZMJNXuO41rB+IPO/mQI9F6JrBnLeC13CejE5P6VQjldvd7qc2la4AO +KZkSq3FtELfAUM8p/166cI39Q7LluI0dTS/nFWBMnP2y13e1vA4ZUsIXI/Gu2/ArnIiRV Ew2IHLEhIFAP9y34hAexn5lBFLNsFlY1pFu4LAz5P7PafqZdT1zqzeCvQf+3uQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnTg03bM7z18nP for ; Fri, 09 Jan 2026 04:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32adc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 04:43:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b258282ecce3 - main - kshim/usb: Prefer memset to bzero List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b258282ecce3e2ad7ece6bec4f1507f70b85de87 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 04:43:24 +0000 Message-Id: <6960876c.32adc.584a9f8d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b258282ecce3e2ad7ece6bec4f1507f70b85de87 commit b258282ecce3e2ad7ece6bec4f1507f70b85de87 Author: Warner Losh AuthorDate: 2026-01-02 19:55:28 +0000 Commit: Warner Losh CommitDate: 2026-01-09 04:42:34 +0000 kshim/usb: Prefer memset to bzero Replace bzero with the equivalent memset(x,0,x) since the latter is available in the kshim environment and we have a soft goal of migrating to standard interfaces when there's a reason... Sponsored by: Netflix --- sys/dev/usb/usb_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index f0989972f49f..4e0268110787 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -3127,7 +3127,7 @@ usbd_fill_deviceinfo(struct usb_device *udev, struct usb_device_info *di) { struct usb_device *hub; - bzero(di, sizeof(di[0])); + memset(di, 0, sizeof(di[0])); di->udi_bus = device_get_unit(udev->bus->bdev); di->udi_addr = udev->address; From nobody Fri Jan 9 05:36:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnVrY16q0z6NKTd for ; Fri, 09 Jan 2026 05:36: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnVrY0VMqz3vpQ for ; Fri, 09 Jan 2026 05:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767937005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g7QpBv2NkV+EY/TsnFFl7dUmQZlSHFQQSb9lT1T/bJc=; b=DE4uA2BMB1+Fx9VdQiLqM/wXCE6bBrcIzqvLNIjSEVegxATodXLqqR/NxmfQa/sFjBCi63 GFfcKddTEQNAcMdcCU+E23TVSblvAuxiFwE42wta+G7e2hGuItHqeGBOPzGJ/Zd5nSL/W6 fLiQpSmy3pS46bKX//BIPGFbKXo4FEob/Dg7nTLCKqhl7U7XAs6RuqxEMPGI1c6Q+GZ5De SeAXqYzZqYryS8MEMwsOA/UEqdQOPkOB06pL5E4vh0FXdl1/BbhA+Cp3/kJmgSqefHeqPY cL+JzmWGeWPbn4X51hW9fWqB/VPkFKK5s5ItcbC+ZjJorx3SPpVP2FIkznMCyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767937005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g7QpBv2NkV+EY/TsnFFl7dUmQZlSHFQQSb9lT1T/bJc=; b=sx4pTFytzE4mGtcJNwfcD5t4eD1d2tGUoQh/pNDsjRZa/9vM73xD+YtJh4KJSFnq6Is97T 8gpxfJqvI7zlK09+7Ya3uzlqaomVZIudmv1j6dyk8+FGieUYk+EkV8RGzRC4romhI+cNby Ar0CWocTM4ujbWnDaGfOD+3ZC0wIweBtliFIjSsjMOOPIxL8CXNvEQ4J5Es4qkKXBWGnu+ nVFakdTAo6eX0I3FrnrRZV7GtvhN8rXRGuCk6TdzN0xhaMeEkKEUPWU8J+mMzPL8ipp7nR mUe5jTrDL7sXaBWHqEpLrNIs8elqxHpRuJxQt0zZ/GNC64xnRV1d5liApDjv0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767937005; a=rsa-sha256; cv=none; b=ERqN+qEXLBxQIR/NzAW3CUxkYVXrxmUcZVdA8BDByO9Ui2BUBQzVGonGnETiczJ7U+LPjE xGEO/HeRIPMJl5Gz8YJ4kRNh3949V1Sq5Yj7yOPxgh3m5jWGLki48cv0MMEq+RSsqRsui4 rSW47YYg6nOf2fr8pl7su0/N6BkKaifLzyEZCA0x7Tj+EZmg5C+b4OndNV9etOWJ2qzK5u jnA6u23DLJI9spOQtXFPAzy8vo0+w3qTOFq5Z2ckhkiZfNOpEadNxeMWgZc891tGKloOSL bWey13KXifpcyKOb6Oc/n3Ya/9husPjoQcqgyT0EX3UfkAHqNQS4dVtp+dj8TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnVrX6XHWz19qG for ; Fri, 09 Jan 2026 05:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38cda by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 05:36:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Graham Perrin From: Alexander Ziaee Subject: git: d1f93ea2e164 - main - pkgbase.7: Show pkg upgrade to apply updates List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1f93ea2e1646f1a844f37a855a70de1b186dbd7 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 05:36:44 +0000 Message-Id: <696093ec.38cda.11864489@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=d1f93ea2e1646f1a844f37a855a70de1b186dbd7 commit d1f93ea2e1646f1a844f37a855a70de1b186dbd7 Author: Graham Perrin AuthorDate: 2026-01-09 04:45:29 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-09 04:49:40 +0000 pkgbase.7: Show pkg upgrade to apply updates MFC after: 3 days Reviewed by: ziaee Closes: https://github.com/freebsd/freebsd-src/pull/1945 --- share/man/man7/freebsd-base.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 index 9844d7d5063d..610ac0b16717 100644 --- a/share/man/man7/freebsd-base.7 +++ b/share/man/man7/freebsd-base.7 @@ -206,7 +206,7 @@ pkg install FreeBSD-set-devel .Pp Apply available updates to the running system: .Bd -literal -offset indent -pkg update -r FreeBSD-base +pkg upgrade -r FreeBSD-base .Ed .Pp Install the development toolchain for FreeBSD/powerpc64le in an From nobody Fri Jan 9 05:53:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnWDM6db7z6NL49 for ; Fri, 09 Jan 2026 05:53:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-8.consmr.mail.gq1.yahoo.com (sonic316-8.consmr.mail.gq1.yahoo.com [98.137.69.32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnWDM3Ddtz3xww for ; Fri, 09 Jan 2026 05:53:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1767938027; bh=DA4T0xk54OpnKUn2rxk3emOgzHCYLqzYD9XD3gBVwn4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=E+lxdl1cIiD8X8122CjUaankJ+L2COyGUefbQRH+GPwhop3qYFMMj+5rPas0yMk2i0WsVwuUXejvc/0PhliqXWazqvpkKW/j/K1nmKMHzl4LHH4CmGZoFDdYzff21bFrtvDFIbGK3Zz2et5CLm+bzT1z94AROoCBumnZ288Xv2t5WX6kCg+aOf7skPoBIN/TZQC8GQLECzQr5X8sN7TLs6CctLCFur46YlyckcMRN+a9deYB73LtbXprF3aooMZCbT+T4gDhiZQHK27eGsPiNZTqHDBsRztfNsY8Dv3ZBQzIJqb9JGGMwhxkjblhBmFzwBbsTqxdDHzJNeSWAKC8JA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1767938027; bh=yGxwehQf5QbcRUBj5NnQJCmE5DXqvVfD0qa1hcOnsgp=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=iqPH9mkiuZqpUbVhAReZ45Z9A+W7RZ4Xff/UIsOX5d4ncJWm1hC6g5EXEjjwqR+lN9nVwZHSuPubMGPqcgvCN72uu4ZKHdUgOcmpj/lov8pBUIy9JUTp1XBbQJv1dE3cQh+Wmcv5L6UEtV8Dkj1kcpBJVbAy5rSarKZlYjAj9Z4ryJkUM9mjJvmIbLT+YDNzgVNlZDxmGv0jfBUsl+a/k6NYL3jjr6qKGg36ifa912YWGSEooFus/OfVIrf0Jye9WfXm9RqZV/2u8aiDy7zMUZw67EzkCoUaY9p8ZKl7GCLROS8bgrtTQdRgdmmA1YDA3Q9nA3UYAWKA/LQE/2+sHg== X-YMail-OSG: CEW.zg0VM1kdEunQzDuiAK7yXOjbwwdezB9_Mk06gznm0_EwiGSlUIkoOf6BnlG Zlk3mNJLKviuzcNTmpV9AmPQ0LLazR3okegiHOhOlV7BaA3C6xRSpUDfVf9qleem8zmK06tdZSeY .u30xOCcXlic6Q4DX0Yc8wudDwXarCkqCKNuuacggkHjX9zg5o7vpDT081lFooGu608jIeOP7JfS DIzS2WWaCssQLGZRTR_ppaUW0lu92wP.sFryzV2yorLGD2uhhTSXNOCiXxRUozfC66u04F.KVUXe .U_Cb5Fnj6Yo_W6IT9VxRegZi3_vLEH_896phb_BfsCeEfonS6_088BDpOeqbXd8dgcEqZesT5eI hs_MvtTQndKnWe8iSE_Fja2284Ke2BoL.Ga5hGlPFOZeIaVokWeLA_91dXFEB3iOZ__s73IY8lay qSfpDAOwG4TCnxSeYVQlKtI_8oDGyxESjzbhRmCF2lBYRU4FJz1H376u1B6sL5SADcc._1SzEBU1 O_YLAlojKhUwvbz05y28RTi1UZTXwcsH41VBKZCDjgFiNjBMTCR1a7EE3Z5i3QroIwQfDkVqUedO S5u0dPOkqeX7343H7gPj3i0arN9TjejnuxePmcCt7f5dufRUjTOkH5wVJSEf2_ih8qO3srf1vMQa o6CpqRMpqtMLra_Ba5o17I_M0j_JHBvrA62Dv7oZaFgbT0kMzk1H1YBC5zr6_TakOcykt0uoTs3e XTdNWefgk2xkI7s5NyTANUG1kSzWMuA1Uji1Uoif8.OIy6Br39.mr6xAPa1oM2YF5ovlbkKlijPa lsv7mQQ.Epb0WNl1CIblRY.CDvd90AlM9WNZahyiaZr.p.hxRdkMb4FLdKBCTzpfyC7AwPJ1gQLB bfHjWZF08u1bogzePlIY0DjTn0E8GUalnhfFSlO_tS_DB5QN_.CLpXAtVLnSNiGlq_ipawZfk8Zf ZNIVh5wDJQd.Uuip6_LgcRefzQikCMLKQ6_kTRA4hMRHnwQlDluQycXehZo.tGNtUtZvyzYlf18U hsMAXs.erYv.TM3.qcKFtsb.Onfy9clg3.qWpklZguwZ1GHy04gQdW1ff5wYDf9KCqHEZ2lG2.OI hSBMG_PKSoBHyxAr5xeFte4oulJXdaHH5okUu3NFgkjrice4Ex9Fern04Da3MHI9TC_SQ0HY1EaH 5pguTVfXbQbOMPDQVSIdXzewouPlf6EuhzxZlfrw9kZ.WWiSpSVKMAGSzurCXDf28QXn2UK_pjEt .OwKB3rai4fS_bV4DepNY74KYfLTgAz6RLbEkeGyM1kIdxiryLNVoOc_9t3RoKjZWZDAhAJM5sHI yPpirMMwxYoG6HWUitpb_7Zxv0AubBU3nU66oDfef4Tue1BJA8sR3VMU3Y.YhCroMNV1fnHGrrpK Z4wBefbhCwUzeNABNC7eNoywTpcJORkwZkIFNxRRXrnzGPPDb5w5tbom0egWEdPtw3SxOuEGf8Ry M06kSH2Lm4lm_gdbVU1I8gLGVFMW8RWuslcRyolR4LYqoSNI_IljimU5nANH9c3pOIg28oefy.ew ry8gpxIP2.qUIR0myMI2rn2jDkUIoqVMmbS2Y1cW9HIUY_oCl.Ff5mHQsL6Z3qIv2EusL4TwlXbh rbD4r6Zsdbq.0kLh8LWIbX41a9XR.w_gkwB0_mZWCUoDZ2T_cmldos1MowCfqRYjmXY6GfhEeB_T GmrxDBiEBxFA30pt7Vod.Dhi1zZf8NazzKNNhknD3.c9re1ybHOZF8QTgaKVgmnQolemiKYEmswb 1UmePYnmR5eQod6WeqLi0SIbJuLrk4um9Z68.1JV7jRQFHlOpwyqpT8VYaRmUagUb1FcnxROupOX 4R6d7b8gvqHSO_Ts7qEc9MsobPs4SXTx_7jVCdcwCuuq8QXJqQfdXduClYvQ_FcGfrGf8uWtPERl 6CG5aVWCpel6S8JVhHxlX91cYSZ4R_A16LyW9fdfNv7hpikde7AtriAhl6n1ODVZLV4fdbaOOgwE cZMHj3vy5OnHWlGmJW3PYyB26cDkB.y7sJsSF07cc380CndSgN_ByhB6bulCUyHYL1F.dSO3kp_k ipXGFwzFxuOrIrmxiBchJC.3Z2lz0AGj4KH3du9R5akAP5cUoEN6OJFyHZIJOfLwsiZxHQVVlE3s MA.DJBTjQtD7574DUHpJhxm2BiSw2tciSJzSbpoHFnEF6m3lEy3jnQ9d3NCHfY2YgbL3dAYe2fX3 kCvPB0x6sEM05Li4fwL5WjOb6V1ibkzj1yImpyPEYFKKz_kTRKRHUoJnsfttoPLOVWaPhIyyQGrN oNsjULvkgOWao.qr0ZTz.gBRoRg-- X-Sonic-MF: X-Sonic-ID: 08589a0f-3718-4fad-b6a2-af059829d395 Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Fri, 9 Jan 2026 05:53:47 +0000 Received: by hermes--production-gq1-86969b76cd-f4c4c (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 22e42d7393498496b413c93779d0376d; Fri, 09 Jan 2026 05:53:45 +0000 (UTC) Message-ID: <807f3dc8-cebd-451e-9460-2cc70b358584@yahoo.com> Date: Thu, 8 Jan 2026 21:53:44 -0800 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: d1f93ea2e164 - main - pkgbase.7: Show pkg upgrade to apply updates To: Alexander Ziaee , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Graham Perrin Newsgroups: gmane.os.freebsd.current.scm References: <696093ec.38cda.11864489@gitrepo.freebsd.org> Content-Language: en-US From: Mark Millard In-Reply-To: <696093ec.38cda.11864489@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.24866 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dnWDM3Ddtz3xww On 1/8/26 21:36, Alexander Ziaee wrote: > The branch main has been updated by ziaee: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d1f93ea2e1646f1a844f37a855a70de1b186dbd7 > > commit d1f93ea2e1646f1a844f37a855a70de1b186dbd7 > Author: Graham Perrin > AuthorDate: 2026-01-09 04:45:29 +0000 > Commit: Alexander Ziaee > CommitDate: 2026-01-09 04:49:40 +0000 > > pkgbase.7: Show pkg upgrade to apply updates > > MFC after: 3 days > Reviewed by: ziaee > Closes: https://github.com/freebsd/freebsd-src/pull/1945 > --- > share/man/man7/freebsd-base.7 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 > index 9844d7d5063d..610ac0b16717 100644 > --- a/share/man/man7/freebsd-base.7 > +++ b/share/man/man7/freebsd-base.7 > @@ -206,7 +206,7 @@ pkg install FreeBSD-set-devel > .Pp > Apply available updates to the running system: > .Bd -literal -offset indent > -pkg update -r FreeBSD-base > +pkg upgrade -r FreeBSD-base The behavior of such a upgrade command strongly depends on if the FreeBSD-base status is enabled vs. not. Enabled, the command does a "pkg update -r FreeBSD-base" first (implicitly) that is effective; disabled, that implicit activity is not done, making it likely that the upgrade command will report that FreeBSD-base is up to date unless prior activity caused such an effective update earlier. > .Ed > .Pp > Install the development toolchain for FreeBSD/powerpc64le in an > > -- === Mark Millard marklmi at yahoo.com From nobody Fri Jan 9 05:53:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnWMT0MT7z6NLJm for ; Fri, 09 Jan 2026 06:00:05 +0000 (UTC) (envelope-from gofcs-svn-src-head@m.gmane-mx.org) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnWMS3jBWz3ytr for ; Fri, 09 Jan 2026 06:00:04 +0000 (UTC) (envelope-from gofcs-svn-src-head@m.gmane-mx.org) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=yahoo.com (policy=reject); spf=pass (mx1.freebsd.org: domain of gofcs-svn-src-head@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gofcs-svn-src-head@m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ve5XW-0008AS-AL for dev-commits-src-main@freebsd.org; Fri, 09 Jan 2026 07:00:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev-commits-src-main@freebsd.org From: Mark Millard Subject: Re: git: d1f93ea2e164 - main - pkgbase.7: Show pkg upgrade to apply updates Date: Thu, 8 Jan 2026 21:53:44 -0800 Message-ID: <807f3dc8-cebd-451e-9460-2cc70b358584@yahoo.com> References: <696093ec.38cda.11864489@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit User-Agent: Mozilla Thunderbird Cc: Graham Perrin Content-Language: en-US In-Reply-To: <696093ec.38cda.11864489@gitrepo.freebsd.org> X-Spamd-Bar: +++ X-Spamd-Result: default: False [3.93 / 15.00]; DMARC_POLICY_REJECT(2.00)[yahoo.com : SPF not aligned (relaxed), No valid DKIM,reject]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_LONG(1.00)[0.999]; NEURAL_HAM_SHORT(-0.77)[-0.772]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[marklmi@yahoo.com,gofcs-svn-src-head@m.gmane-mx.org]; R_SPF_ALLOW(-0.20)[+mx]; ONCE_RECEIVED(0.20)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:24940, ipnet:116.202.0.0/16, country:DE]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FREEMAIL_FROM(0.00)[yahoo.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[marklmi@yahoo.com,gofcs-svn-src-head@m.gmane-mx.org]; FREEMAIL_CC(0.00)[gmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4dnWMS3jBWz3ytr On 1/8/26 21:36, Alexander Ziaee wrote: > The branch main has been updated by ziaee: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d1f93ea2e1646f1a844f37a855a70de1b186dbd7 > > commit d1f93ea2e1646f1a844f37a855a70de1b186dbd7 > Author: Graham Perrin > AuthorDate: 2026-01-09 04:45:29 +0000 > Commit: Alexander Ziaee > CommitDate: 2026-01-09 04:49:40 +0000 > > pkgbase.7: Show pkg upgrade to apply updates > > MFC after: 3 days > Reviewed by: ziaee > Closes: https://github.com/freebsd/freebsd-src/pull/1945 > --- > share/man/man7/freebsd-base.7 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 > index 9844d7d5063d..610ac0b16717 100644 > --- a/share/man/man7/freebsd-base.7 > +++ b/share/man/man7/freebsd-base.7 > @@ -206,7 +206,7 @@ pkg install FreeBSD-set-devel > .Pp > Apply available updates to the running system: > .Bd -literal -offset indent > -pkg update -r FreeBSD-base > +pkg upgrade -r FreeBSD-base The behavior of such a upgrade command strongly depends on if the FreeBSD-base status is enabled vs. not. Enabled, the command does a "pkg update -r FreeBSD-base" first (implicitly) that is effective; disabled, that implicit activity is not done, making it likely that the upgrade command will report that FreeBSD-base is up to date unless prior activity caused such an effective update earlier. > .Ed > .Pp > Install the development toolchain for FreeBSD/powerpc64le in an > > -- === Mark Millard marklmi at yahoo.com From nobody Fri Jan 9 06:14:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhC1Fslz6NN0G for ; Fri, 09 Jan 2026 06:14: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnWhC0Mbmz4100 for ; Fri, 09 Jan 2026 06:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aYGHq+lUzEZYSq1AfW/iX1ucdi9iLYpGSITf6Z5k9ng=; b=mchiOlpertwebjRUyaMlZI0ajkekKenv7FK6y7plTVngAfSeYQhth8xNhilt/GuykGZUqW HNKxTw+StpRelyGwW+N+nLQuAad0ILQ77H/C0U5DSECgVlqJd7Yn3wlg4q+x8k4iIC7/cq c3FjmgFNfCXTOPO9bywaoLiIqSpj9/3IhKG91uyjTwTssMNELLzijxzq19Li85pUzqGO4l TPEHiCj/RmxxeSY3wu/m5lm1h/wYHLdlibsYTvZABqKa9OaJCk60Ms6PpoUIGqaB4H5EUX 757PK0qv7s5EiopQcQ7UR7k+avt7yHzyb2WEkVBHEssI+eNS39dNwxnZCZrtdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aYGHq+lUzEZYSq1AfW/iX1ucdi9iLYpGSITf6Z5k9ng=; b=d00XsBLd2KUo6d2BUyhA5Nu7x1PwBlznhGpBzZ4EGockzh+TUDcGvCUlwXk3bpMZ1SOkev ncP3V960sqDW6PUx5DxmeMZNATg50vvSi7FQrbhmkcYGaj5bpC5UhtuKtRgv5MJUSAYujw oIZxqENUgUU9irvlFUZH3ua2CiX/h32KVqpXPj6D1PE6fvul6NBoE/YLtrehxWzIyOwejK 8kOvPrl/c3RXvS7DwXHftb54pA6R3C5JX0FEEpYxtgpnv1wrGovJXOpiWuCmzqZxGdtvVd jRPWPV04ZZHirPF4PhPrU0qK+5K0cvQg4Q4bC1jxPc3tuaFcXqeWDwpJ8jHX0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767939275; a=rsa-sha256; cv=none; b=SD6GbrBTEb5d4j08xdH/EAdGeGcD2qwtEoeRYMe8x3+kHdi9iqJc1FQ5bCu53T5mITAs9k IzG7vrwXL42t41GdXqiTP3Kv6V/GZyhBMhDF7sAJxor9j2ZT6F7kQQ5W9qrSU1PZyk6YdL ro/XxCNRe5T8EPEawGhuODJrpLbWOiw3B9mYoWKE2xkPmRND8W/3VLk/uFToG8xkh1nArX idB1urQRCE8wb4Gy/BpQjDIfMiD7cHAcRF8NP1o0XA54mty5hnp+/xHugZUvLD1HeetpoW TI57micTE3N9tE9eMhDhgiOCiEXOvp3yg8R8Zno1GzluJV/mlMJ7/0O8lpk8uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhB6pgYz1BWV for ; Fri, 09 Jan 2026 06:14:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d223 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 06:14:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d650b2ceda46 - main - mps/mpr: Remove bogus sys/cdefs.h includes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d650b2ceda4641475e90ba1f6d349eac98aaa963 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 06:14:34 +0000 Message-Id: <69609cca.3d223.5c362242@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d650b2ceda4641475e90ba1f6d349eac98aaa963 commit d650b2ceda4641475e90ba1f6d349eac98aaa963 Author: Warner Losh AuthorDate: 2026-01-09 05:48:13 +0000 Commit: Warner Losh CommitDate: 2026-01-09 05:54:44 +0000 mps/mpr: Remove bogus sys/cdefs.h includes These are left over from the $FreeBSD$ stuff. Sponsored by: Netflix --- sys/dev/mpr/mpr.c | 1 - sys/dev/mpr/mpr_config.c | 1 - sys/dev/mpr/mpr_mapping.c | 1 - sys/dev/mpr/mpr_pci.c | 1 - sys/dev/mpr/mpr_sas.c | 1 - sys/dev/mpr/mpr_sas_lsi.c | 1 - sys/dev/mpr/mpr_table.c | 1 - sys/dev/mpr/mpr_user.c | 1 - sys/dev/mps/mps.c | 1 - sys/dev/mps/mps_config.c | 1 - sys/dev/mps/mps_mapping.c | 1 - sys/dev/mps/mps_pci.c | 1 - sys/dev/mps/mps_sas.c | 1 - sys/dev/mps/mps_sas_lsi.c | 1 - sys/dev/mps/mps_table.c | 1 - sys/dev/mps/mps_user.c | 1 - 16 files changed, 16 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 262d6b58b705..9bceabe637b5 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -30,7 +30,6 @@ * */ -#include /* Communications core for Avago Technologies (LSI) MPT3 */ /* TODO Move headers to mprvar */ diff --git a/sys/dev/mpr/mpr_config.c b/sys/dev/mpr/mpr_config.c index b7882feed158..8a36a12a225c 100644 --- a/sys/dev/mpr/mpr_config.c +++ b/sys/dev/mpr/mpr_config.c @@ -28,7 +28,6 @@ * Broadcom Inc. (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* TODO Move headers to mprvar */ #include #include diff --git a/sys/dev/mpr/mpr_mapping.c b/sys/dev/mpr/mpr_mapping.c index 38aa4dfc7ef2..a907ebafe2ff 100644 --- a/sys/dev/mpr/mpr_mapping.c +++ b/sys/dev/mpr/mpr_mapping.c @@ -28,7 +28,6 @@ * Broadcom Inc. (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* TODO Move headers to mprvar */ #include #include diff --git a/sys/dev/mpr/mpr_pci.c b/sys/dev/mpr/mpr_pci.c index 6b74f7e38811..a04ef7c6fb4d 100644 --- a/sys/dev/mpr/mpr_pci.c +++ b/sys/dev/mpr/mpr_pci.c @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include /* PCI/PCI-X/PCIe bus interface for the Avago Tech (LSI) MPT3 controllers */ /* TODO Move headers to mprvar */ diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 5f3a27a468b0..6338a19b1984 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -30,7 +30,6 @@ * */ -#include /* Communications core for Avago Technologies (LSI) MPT3 */ /* TODO Move headers to mprvar */ diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index 9ba776e49e7a..6529b38cc5f1 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -28,7 +28,6 @@ * Broadcom Inc. (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* Communications core for Avago Technologies (LSI) MPT3 */ /* TODO Move headers to mprvar */ diff --git a/sys/dev/mpr/mpr_table.c b/sys/dev/mpr/mpr_table.c index 910f47bb2937..b47b5259c63d 100644 --- a/sys/dev/mpr/mpr_table.c +++ b/sys/dev/mpr/mpr_table.c @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include /* Debugging tables for MPT2 */ /* TODO Move headers to mprvar */ diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index 5245129ce8c1..826528a3aeaf 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -59,7 +59,6 @@ * Broadcom Inc. (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* TODO Move headers to mprvar */ #include #include diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 357eacf28925..cb82045356fc 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -30,7 +30,6 @@ * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* Communications core for Avago Technologies (LSI) MPT2 */ /* TODO Move headers to mpsvar */ diff --git a/sys/dev/mps/mps_config.c b/sys/dev/mps/mps_config.c index 47f9fe573a2b..cfb96c3e9bee 100644 --- a/sys/dev/mps/mps_config.c +++ b/sys/dev/mps/mps_config.c @@ -29,7 +29,6 @@ * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* TODO Move headers to mpsvar */ #include #include diff --git a/sys/dev/mps/mps_mapping.c b/sys/dev/mps/mps_mapping.c index 25d17d575970..9e069a3a924d 100644 --- a/sys/dev/mps/mps_mapping.c +++ b/sys/dev/mps/mps_mapping.c @@ -29,7 +29,6 @@ * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* TODO Move headers to mpsvar */ #include #include diff --git a/sys/dev/mps/mps_pci.c b/sys/dev/mps/mps_pci.c index 7a0c577eb72a..8855c186754a 100644 --- a/sys/dev/mps/mps_pci.c +++ b/sys/dev/mps/mps_pci.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include /* PCI/PCI-X/PCIe bus interface for the Avago Tech (LSI) MPT2 controllers */ /* TODO Move headers to mpsvar */ diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index fa0f817ed67b..8631cc6cf9f3 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -30,7 +30,6 @@ * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* Communications core for Avago Technologies (LSI) MPT2 */ /* TODO Move headers to mpsvar */ diff --git a/sys/dev/mps/mps_sas_lsi.c b/sys/dev/mps/mps_sas_lsi.c index 42119b5c0a43..c48c8e15d4a4 100644 --- a/sys/dev/mps/mps_sas_lsi.c +++ b/sys/dev/mps/mps_sas_lsi.c @@ -29,7 +29,6 @@ * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* Communications core for Avago Technologies (LSI) MPT2 */ /* TODO Move headers to mpsvar */ diff --git a/sys/dev/mps/mps_table.c b/sys/dev/mps/mps_table.c index f2c6ed9b88c3..e97583ffa3f8 100644 --- a/sys/dev/mps/mps_table.c +++ b/sys/dev/mps/mps_table.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include /* Debugging tables for MPT2 */ /* TODO Move headers to mpsvar */ diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index 01edcbed2609..619eea6e9c69 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -60,7 +60,6 @@ * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ -#include /* TODO Move headers to mpsvar */ #include #include From nobody Fri Jan 9 06:14:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhD5zkgz6NMg0 for ; Fri, 09 Jan 2026 06:14: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnWhD1smvz4106 for ; Fri, 09 Jan 2026 06:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=08smkiiqyLxCwsZnnF5lhSiXjAPUcmRchdr5JqtoRLw=; b=Vh6sl9lt9JH+oYxw4Dedv4cYFQR54DAF9bNlIaOX7qcrgLg2krIs5Bz6RbqOqQRfsJT1w4 DoGciu/3fecVEj1C1EcNp6PbrbAz7vrbahwbgI5D6wwFaHjdZFtXQzmMvWqRXR+tCE/6YP HJuv+hbQqr9RYiuz97Lq23M5K7Dh/FkaZJWrP9JTdCwAW4x7s0deTWtjxP2jilfVgJAWBC 9HF1Fl9TgsgvJ8nRGdjeB9eWL+GZUX680Zt4QibrC8iZwSteIVtMcf5hLQx08mhTc1KPnD CwHGkG6BK0uhVzQlpwavgC83iNB0zGyQynF8bl46wgNMVQZ1uioVNxcw8GOMQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=08smkiiqyLxCwsZnnF5lhSiXjAPUcmRchdr5JqtoRLw=; b=RL7ksBDY63HNEXLuMQeJnFw6SD83qZ/874D0+7VREVhLD3zpj4vk5Cq3zVyQ4aM70TnZbc 7lxPaY40G5u8yGC8hgA7Z18Ul+0paIViTT0h9s0KUvCRZAfmejrebvdXib35JcZVwgj+xw IAxcZmoNFFux6JMNtZkluT0PMkFhhAHa2hlR8Kz3Z3E6dttM7NNOSkSFYseJoZkFvDyBZY sFNfBIbaXJqaBTF0ncOEO2b8fHXicBHw6PMRQlYBQ6tk58wkqNaERgnUJt3BdVqFSHhsxn S0BBsdq4VfXEgLf4MGa95XHTHKjwqBhlFeZUg9kNFv25BncRZbxDBYp1TtXs8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767939276; a=rsa-sha256; cv=none; b=DM0IsJV5FqDGIz8RTiKem4xhmm2cBWJfFnlYIr9RTs/hP8aiZvkeknuHliJtCaTYLbBUUy 5HTQJGYEr//KiB/l6g6KoKzd8/EgxQft9EetnB3DSL48uPwr2sx/Td/ZXlZwMXX2+nSeih oTVtP9yAmOBCCK3MChbv9/bdNmLGbJ+H1ei4dXq+8POPbp1JxqyLIcbCZWrjgxvMOOt56Y ZPB02iOnncMpDeqIwXWXdtgaiMSt2YgrxUHDemVqgxPg3zCY5K53bUdvdfO9kCS8IcA6EG 038FCzmNAr1mnqc1kFWEtF7+e1KlR8uKno4dN69mpuaLpypg4ZM4u64oPGo+Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhD0Mf1z1Bcv for ; Fri, 09 Jan 2026 06:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d4a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 06:14:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6f8e117e5d78 - main - mps: Add a probe on completion List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f8e117e5d78709ff70c19e5286949b35099fa9a Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 06:14:36 +0000 Message-Id: <69609ccc.3d4a0.6d806aa9@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6f8e117e5d78709ff70c19e5286949b35099fa9a commit 6f8e117e5d78709ff70c19e5286949b35099fa9a Author: Warner Losh AuthorDate: 2026-01-06 05:13:38 +0000 Commit: Warner Losh CommitDate: 2026-01-09 05:55:32 +0000 mps: Add a probe on completion cam::mps:complete(union ccb *, struct mps_command *, u_int, u32); Where u_int is scsas->flags u32 is the device_info. This can't be done as an fbt because the data needed for it isn't present out a function boundary. Sponsored by: Netflix --- sys/dev/mps/mps_sas.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index 8631cc6cf9f3..fb591391f6a5 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -80,6 +80,12 @@ #include #include +#include + +/* SDT Probes */ +SDT_PROBE_DEFINE4(cam, , mps, complete, "union ccb *", + "struct mps_command *", "u_int", "u32"); + /* * static array to check SCSI OpCode for EEDP protection bits */ @@ -2076,6 +2082,9 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mps_command *cm) sc->SSU_refcount--; } + SDT_PROBE4(cam, , mps, complete, ccb, cm, sassc->flags, + sc->mapping_table[target_id].device_info); + /* Take the fast path to completion */ if (cm->cm_reply == NULL) { if (mpssas_get_ccbstatus(ccb) == CAM_REQ_INPROG) { From nobody Fri Jan 9 06:14:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhF5btfz6NMvv for ; Fri, 09 Jan 2026 06:14: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnWhF1yrsz414q for ; Fri, 09 Jan 2026 06:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yOiGNh341IhPsXdqbBn/88dOLZQG0GQWozrCRIr4lw=; b=x5XA2gp5vqEF4nhfmeby2SPxSA/BV4JjsCsOoliEQti9XLuCTKfMguEZA4VJL84vDgRVfd hDDu4w5MkSFPh4lvh4ogt4eP1mK98eidrLddc8O502s+lTMaPOFEUt/LrT7xEgVhNOa7+3 zrYacmYLCJwJ/aVbQ9A51F/I07uBkGSV6PxU421sBUxHYT5LfxP+XplQmDJmQHUs14ifS/ 2RWCb6WMeTJHvDa6qVU5VxBVXxLM7ks0HRawvyiHGfiQqV7deOxQrS6PX/LmyLJ6m+ekmK zYm4XVYw7I6YKHvPM4Inm9pX6A5USs4doxfDcMEfpVi1D1IlRYmxB7mQr++OYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yOiGNh341IhPsXdqbBn/88dOLZQG0GQWozrCRIr4lw=; b=I4x6IsNQpuDfTvQPgCwhjsUpf3WPUXgX6MZNY2f9fbTgMOeBYdDvGofijWiLWVhwe/QGcV 5AQZgeTQ0n3h7GbtMA9X68ZTrxUq+iU3nSDczmCa0JpUr7BM3Rjea0tdf3XVHU3Nsyd/Bb mEpL1CvJjZ4w8jWgJAeR7OeurNZwsiM169BXcIQ5Uj8uiNOnVdQQkycpbjwiVeYosOUydA Es7LCB/CVDgXD5rDqEIp9HArrdG12c3NVHjcCUyPoRqL4afrOqSrRycE9misHmLVnmLOwD LjfIK4aly0O7guyTM0hekhNX7AdNwb8sHWqjT9u4oJZdNC0S9HUBUkrahatHuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767939277; a=rsa-sha256; cv=none; b=WViMzgbMwIcPV1oRzKEW6cknoEtqcKpNvTWwOXvZmjTbVh3Ez+PdV8Jjy2dAuqjoXsJeTC 0SXQHHpl1xXKOZKRYKDJnunfBqtjLSZ65ddUxkIxCWs4eji2il8i3mhGo5DQa0hNFyn1f6 kcisfN6uHlbdp6x5OdrFVUeu2JgogvDECWnYzaB/SL/Cvqhe3fgJu8WtK+7I4jNoQRd2qt Agfwhul/UrLMHfQp97se8E+RtUnil1LFycAqeopevRrfKv0jng3ZyZKvRL0b14ZpM1A90I ruZ6Ty78wYoYwlrjsoU7ruKy4P+Jocoghf5foyg2SXwdZHYqJAArz38SmY5Pfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhF15SXz1BWX for ; Fri, 09 Jan 2026 06:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a3f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 06:14:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0e80273f0d86 - main - mpr: Add a probe on completion List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e80273f0d864d28bd3c3ae9dafd58e637743910 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 06:14:37 +0000 Message-Id: <69609ccd.3a3f7.57baa47@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e80273f0d864d28bd3c3ae9dafd58e637743910 commit 0e80273f0d864d28bd3c3ae9dafd58e637743910 Author: Warner Losh AuthorDate: 2026-01-06 05:13:38 +0000 Commit: Warner Losh CommitDate: 2026-01-09 06:03:38 +0000 mpr: Add a probe on completion cam::mpr:complete(union ccb *, struct mpr_command *, u_int, u32); Where u_int is scsas->flags u32 is the device_info. This can't be done as an fbt because the data needed for it isn't present out a function boundary. Sponsored by: Netflix --- sys/dev/mpr/mpr_sas.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 6338a19b1984..f0470de3efcf 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -85,6 +85,12 @@ #define MPRSAS_DISCOVERY_TIMEOUT 20 #define MPRSAS_MAX_DISCOVERY_TIMEOUTS 10 /* 200 seconds */ +#include + +/* SDT Probes */ +SDT_PROBE_DEFINE4(cam, , mpr, complete, "union ccb *", + "struct mpr_command *", "u_int", "u32"); + /* * static array to check SCSI OpCode for EEDP protection bits */ @@ -2539,6 +2545,9 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) sc->SSU_refcount--; } + SDT_PROBE4(cam, , mpr, complete, ccb, cm, sassc->flags, + sc->mapping_table[target_id].device_info); + /* Take the fast path to completion */ if (cm->cm_reply == NULL) { if (mprsas_get_ccbstatus(ccb) == CAM_REQ_INPROG) { From nobody Fri Jan 9 06:14:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhG64Tpz6NMg6 for ; Fri, 09 Jan 2026 06:14: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnWhG2hKVz40xB for ; Fri, 09 Jan 2026 06:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNPSMLkVfaWS76oAhL3ZbRvHpJnvDGGOsvvSnpircHw=; b=AX6wWGpfyGinJy4pPXPX0Db0tkfMKwJyZ9A/90C4hIzQbvMB+sO2ix3JxdKGlEsLedg/mU dXbPNK5F4EpcqwQ/emny1df69mNFTyKE2WoBWzbK8c9eisC7TqY7t+XG5VA4ZDSo73m9lO x4OgjaQhNCXaCiO8bFiTiwUAeW9JkOOlq3itPWgXcAvR0nneJs5/c0VYgKG40b4q5H77BJ MVsecy5LA/9oBfqU2btJHXn++LTRKIQIJl1e+a+izGzfnYGTY7A5Z3FvE0tEJaquy0d57t yaVMW2/oGLQ/F2PqSXsi8mEj1ux1tNUjHrTvH4rIK1mgH4H1QwOGmLyXpXIXig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767939278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNPSMLkVfaWS76oAhL3ZbRvHpJnvDGGOsvvSnpircHw=; b=HO7/M0ci22+RElPfomu4GGD7A3Z7X1bXKXeZ7KmT5zpL1vRj0ZzDJqKqcqR0UsbImmY6sU nAIbynxBzx6iQleZLZQ43pCp5UUDDyBqIXvsYLXNHv1tggDsP/UPRog9XkJxpYEOcVMwFt +WfFsns6RiuabAODTKMyMIiB/aB2EIWBHPCHpoe8sEwjP/DGKm7bBziDU6Q0U2kC9D8qZ5 j3YVe0eW28nHcjVfAuEtygppatLYBMJQMNlw0YUuCf2BrKirBUeRSo75kDL3Z2ZPsVK1i7 GMQDtEckzgF2JydUYUvKfpMn3YetmCAliRugEWtqV5n/PtqQEZ+RznZ5dgH1zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767939278; a=rsa-sha256; cv=none; b=Al/ICaF5t7Es/+rI4dYMtnrvYzeKmQNCdYr8lbktsN8Zu3XuKgFI3xixk7GisSwvRwSAFj rzx77E4uKfp7dfHKmcCMHL0W6g18G8dDZRGNqdBavMbtF9yqBDKfEZRM2j1rswAH5QTzn+ b2MV3Tguy01HweSODr3mr1uxrlkF0NSCxP1s1CmoUe7e0yDvFMyiBDR49Dy8KDvjCSZKnr KpHGO//ytv073A3kK1hbRmUWiAN4Pto559tS0VVTPQhOZGFgZ30mtw+XTP9385j3nysr+3 8EJnT3mPL7l+S+8J767CoYAxzXlr0IK7Jn5BQyuapIRsEBvC0IrCrgnspKaHrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnWhG1xQJz1BL7 for ; Fri, 09 Jan 2026 06:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c9e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 06:14:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 92f251f36b31 - main - cam: Dtrace scripts to help diagnose weird things List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92f251f36b31519ed336ac67b768d39b62ebf896 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 06:14:38 +0000 Message-Id: <69609cce.3c9e3.1186cc49@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=92f251f36b31519ed336ac67b768d39b62ebf896 commit 92f251f36b31519ed336ac67b768d39b62ebf896 Author: Warner Losh AuthorDate: 2026-01-09 06:11:10 +0000 Commit: Warner Losh CommitDate: 2026-01-09 06:11:10 +0000 cam: Dtrace scripts to help diagnose weird things These are sample dtrace scripts that likely need to be modified for whatever problem you are chasing. Unfortuneately, you have to read the driver extensively to understand them or how to use them. But studying the completion routine of mpr/mps will help understand many of the error and recovery paths. Sponsored by: Netflix --- tools/cam/README | 8 ++ tools/cam/mpr.d | 331 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/cam/mps.d | 331 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 670 insertions(+) diff --git a/tools/cam/README b/tools/cam/README index fd93ccd15e1f..bc24a76b1ea3 100644 --- a/tools/cam/README +++ b/tools/cam/README @@ -7,3 +7,11 @@ therefore I/O and other traffic to storage media) that written during covid, but with fbp providers that recent clang optimizations make unuseable, hence the shift to the cam provider, but retooling them and finishing the grammar will take some time (but these scripts are useful today). + +mpr.d and mps.d give insight into the completion path for the mpr and mps SIMs. +You really have to read through the driver to understand, but it's the central +point of the driver and most of the I/O already had the proper CAM status code, +but the reset does not. These scripts use the generic completion hook to show +the exceptional cases (many of which have printfs that can be enabled, but often +aren't). The completion hook should give one enough tools to puzzle out what's +going on for weird, but repeatable problems. diff --git a/tools/cam/mpr.d b/tools/cam/mpr.d new file mode 100644 index 000000000000..7750d25e8c98 --- /dev/null +++ b/tools/cam/mpr.d @@ -0,0 +1,331 @@ +inline string scsi_op[int k] = + k == 0x00 ? "TEST UNIT READY" : + k == 0x01 ? "REZERO UNIT" : + k == 0x03 ? "REQUEST SENSE" : + k == 0x04 ? "FORMAT UNIT" : + k == 0x05 ? "READ BLOCK LIMITS" : + k == 0x07 ? "REASSIGN BLOCKS" : + k == 0x08 ? "READ(6)" : + k == 0x0a ? "WRITE(6)" : + k == 0x0b ? "SEEK(6)" : + k == 0x0f ? "READ REVERSE(6)" : + k == 0x10 ? "WRITE FILEMARKS(6)" : + k == 0x11 ? "SPACE(6)" : + k == 0x12 ? "INQUIRY" : + k == 0x14 ? "RECOVER BUFFERED DATA" : + k == 0x15 ? "MODE SELECT(6)" : + k == 0x16 ? "RESERVE(6)" : + k == 0x17 ? "RELEASE(6)" : + k == 0x18 ? "COPY" : + k == 0x19 ? "ERASE(6)" : + k == 0x1a ? "MODE SENSE(6)" : + k == 0x1b ? "START STOP UNIT" : + k == 0x1c ? "RECEIVE DIAGNOSTIC RESULTS" : + k == 0x1d ? "SEND DIAGNOSTIC" : + k == 0x1e ? "PREVENT ALLOW MEDIUM REMOVAL" : + k == 0x24 ? "SET WINDOW" : + k == 0x25 ? "READ CAPACITY(10)" : + k == 0x28 ? "READ(10)" : + k == 0x29 ? "READ GENERATION" : + k == 0x2a ? "WRITE(10)" : + k == 0x2b ? "SEEK(10)" : + k == 0x2c ? "ERASE(10)" : + k == 0x2e ? "WRITE AND VERIFY(10)" : + k == 0x2f ? "VERIFY(10)" : + k == 0x30 ? "SEARCH DATA HIGH(10)" : + k == 0x31 ? "SEARCH DATA EQUAL(10)" : + k == 0x32 ? "SEARCH DATA LOW(10)" : + k == 0x33 ? "SET LIMITS(10)" : + k == 0x35 ? "SYNCHRONIZE CACHE(10)" : + k == 0x36 ? "LOCK UNLOCK CACHE(10)" : + k == 0x37 ? "READ DEFECT DATA(10)" : + k == 0x39 ? "COMPARE" : + k == 0x3a ? "COPY AND VERIFY" : + k == 0x3b ? "WRITE BUFFER" : + k == 0x3c ? "READ BUFFER(10)" : + k == 0x3e ? "READ LONG(10)" : + k == 0x3f ? "WRITE LONG(10)" : + k == 0x40 ? "CHANGE DEFINITION" : + k == 0x41 ? "WRITE SAME(10)" : + k == 0x42 ? "UNMAP" : + k == 0x48 ? "SANITIZE" : + k == 0x4c ? "LOG SELECT" : + k == 0x4d ? "LOG SENSE" : + k == 0x50 ? "XDWRITE(10)" : + k == 0x51 ? "XPWRITE(10)" : + k == 0x52 ? "XDREAD(10)" : + k == 0x53 ? "XDWRITEREAD(10)" : + k == 0x55 ? "MODE SELECT(10)" : + k == 0x56 ? "RESERVE(10)" : + k == 0x57 ? "RELEASE(10)" : + k == 0x5a ? "MODE SENSE(10)" : + k == 0x5e ? "PERSISTENT RESERVE IN" : + k == 0x5f ? "PERSISTENT RESERVE OUT" : + k == 0x7e ? "extended CDB" : + k == 0x7f ? "variable length CDB (more than 16 bytes)" : + k == 0x80 ? "XDWRITE EXTENDED(16)" : + k == 0x81 ? "REBUILD(16)" : + k == 0x82 ? "REGENERATE(16)" : + k == 0x83 ? "Third-party Copy OUT" : + k == 0x84 ? "Third-party Copy IN" : + k == 0x85 ? "ATA PASS-THROUGH(16)" : + k == 0x86 ? "ACCESS CONTROL IN" : + k == 0x87 ? "ACCESS CONTROL OUT" : + k == 0x88 ? "READ(16)" : + k == 0x89 ? "COMPARE AND WRITE" : + k == 0x8a ? "WRITE(16)" : + k == 0x8b ? "ORWRITE" : + k == 0x8c ? "READ ATTRIBUTE" : + k == 0x8d ? "WRITE ATTRIBUTE" : + k == 0x8e ? "WRITE AND VERIFY(16)" : + k == 0x8f ? "VERIFY(16)" : + k == 0x90 ? "PRE-FETCH(16)" : + k == 0x91 ? "SYNCHRONIZE CACHE(16)" : + k == 0x92 ? "LOCK UNLOCK CACHE(16)" : + k == 0x93 ? "WRITE SAME(16)" : + k == 0x94 ? "ZBC OUT" : + k == 0x95 ? "ZBC IN" : + k == 0x9a ? "WRITE STREAM(16)" : + k == 0x9b ? "READ BUFFER(16)" : + k == 0x9c ? "WRITE ATOMIC(16)" : + k == 0x9e ? "SERVICE ACTION IN(16)" : + k == 0xa0 ? "REPORT LUNS" : + k == 0xa1 ? "ATA PASS-THROUGH(12)" : + k == 0xa2 ? "SECURITY PROTOCOL IN" : + k == 0xa3 ? "MAINTENANCE IN" : + k == 0xa4 ? "MAINTENANCE OUT" : + k == 0xa7 ? "MOVE MEDIUM ATTACHED" : + k == 0xa8 ? "READ(12)" : + k == 0xaa ? "WRITE(12)" : + k == 0xae ? "WRITE AND VERIFY(12)" : + k == 0xaf ? "VERIFY(12)" : + k == 0xb3 ? "SET LIMITS(12)" : + k == 0xb4 ? "READ ELEMENT STATUS ATTACHED" : + k == 0xb5 ? "SECURITY PROTOCOL OUT" : + k == 0xb7 ? "READ DEFECT DATA(12)" : + k == 0xba ? "REDUNDANCY GROUP (IN)" : + k == 0xbb ? "REDUNDANCY GROUP (OUT)" : + k == 0xbc ? "SPARE (IN)" : + k == 0xbd ? "SPARE (OUT)" : + k == 0xbe ? "VOLUME SET (IN)" : + k == 0xbf ? "VOLUME SET (OUT)" : + "Unknown"; + +inline string xpt_action_string[int key] = + key == 0 ? "XPT_NOOP" : + key == 1 ? "XPT_SCSI_IO" : + key == 2 ? "XPT_GDEV_TYPE" : + key == 3 ? "XPT_GDEVLIST" : + key == 4 ? "XPT_PATH_INQ" : + key == 5 ? "XPT_REL_SIMQ" : + key == 6 ? "XPT_SASYNC_CB" : + key == 7 ? "XPT_SDEV_TYPE" : + key == 8 ? "XPT_SCAN_BUS" : + key == 9 ? "XPT_DEV_MATCH" : + key == 10 ? "XPT_DEBUG" : + key == 11 ? "XPT_PATH_STATS" : + key == 12 ? "XPT_GDEV_STATS" : + key == 13 ? "XPT_0X0d" : + key == 14 ? "XPT_DEV_ADVINFO" : + key == 15 ? "XPT_ASYNC" : + key == 16 ? "XPT_ABORT" : + key == 17 ? "XPT_RESET_BUS" : + key == 18 ? "XPT_RESET_DEV" : + key == 19 ? "XPT_TERM_IO" : + key == 20 ? "XPT_SCAN_LUN" : + key == 21 ? "XPT_GET_TRAN_SETTINGS" : + key == 22 ? "XPT_SET_TRAN_SETTINGS" : + key == 23 ? "XPT_CALC_GEOMETRY" : + key == 24 ? "XPT_ATA_IO" : + key == 25 ? "XPT_SET_SIM_KNOB" : + key == 26 ? "XPT_GET_SIM_KNOB" : + key == 27 ? "XPT_SMP_IO" : + key == 28 ? "XPT_NVME_IO" : + key == 29 ? "XPT_MMC_IO" : + key == 30 ? "XPT_SCAN_TGT" : + key == 31 ? "XPT_NVME_ADMIN" : + "Too big" ; + +inline int CAM_CDB_POINTER = 1; +inline int XPT_SCSI_IO = 0x01; +inline int XPT_ATA_IO = 0x18; +inline int XPT_NVME_IO = 0x1c; +inline int XPT_NVME_ADMIN = 0x1f; + +/* + * key >> 5 gives the group: + * Group 0: six byte commands + * Group 1: ten byte commands + * Group 2: ten byte commands + * Group 3: reserved (7e and 7f are de-facto 32 bytes though) + * Group 4: sixteen byte commands + * Group 5: twelve byte commands + * Group 6: vendor specific + * Group 7: vendor specific + */ +inline int scsi_cdb_len[int key] = + key == 0 ? 6 : + key == 1 ? 10 : + key == 2 ? 10 : + key == 3 ? 1 : /* reserved */ + key == 4 ? 16 : + key == 5 ? 12 : + key == 6 ? 1 : /* reserved */ + /* key == 7 */ 1; /* reserved */ + +inline int MPI2_IOCSTATUS_MASK =(0x7FFF); +inline int MPI2_IOCSTATUS_SUCCESS =(0x0000); +inline int MPI2_IOCSTATUS_INVALID_FUNCTION =(0x0001); +inline int MPI2_IOCSTATUS_BUSY =(0x0002); +inline int MPI2_IOCSTATUS_INVALID_SGL =(0x0003); +inline int MPI2_IOCSTATUS_INTERNAL_ERROR =(0x0004); +inline int MPI2_IOCSTATUS_INVALID_VPID =(0x0005); +inline int MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES =(0x0006); +inline int MPI2_IOCSTATUS_INVALID_FIELD =(0x0007); +inline int MPI2_IOCSTATUS_INVALID_STATE =(0x0008); +inline int MPI2_IOCSTATUS_OP_STATE_NOT_SUPPORTED =(0x0009); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_ACTION =(0x0020); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_TYPE =(0x0021); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_PAGE =(0x0022); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_DATA =(0x0023); +inline int MPI2_IOCSTATUS_CONFIG_NO_DEFAULTS =(0x0024); +inline int MPI2_IOCSTATUS_CONFIG_CANT_COMMIT =(0x0025); +inline int MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR =(0x0040); +inline int MPI2_IOCSTATUS_SCSI_INVALID_DEVHANDLE =(0x0042); +inline int MPI2_IOCSTATUS_SCSI_DEVICE_NOT_THERE =(0x0043); +inline int MPI2_IOCSTATUS_SCSI_DATA_OVERRUN =(0x0044); +inline int MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN =(0x0045); +inline int MPI2_IOCSTATUS_SCSI_IO_DATA_ERROR =(0x0046); +inline int MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR =(0x0047); +inline int MPI2_IOCSTATUS_SCSI_TASK_TERMINATED =(0x0048); +inline int MPI2_IOCSTATUS_SCSI_RESIDUAL_MISMATCH =(0x0049); +inline int MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED =(0x004A); +inline int MPI2_IOCSTATUS_SCSI_IOC_TERMINATED =(0x004B); +inline int MPI2_IOCSTATUS_SCSI_EXT_TERMINATED =(0x004C); +inline int MPI2_IOCSTATUS_EEDP_GUARD_ERROR =(0x004D); +inline int MPI2_IOCSTATUS_EEDP_REF_TAG_ERROR =(0x004E); +inline int MPI2_IOCSTATUS_EEDP_APP_TAG_ERROR =(0x004F); +inline int MPI2_IOCSTATUS_TARGET_INVALID_IO_INDEX =(0x0062); +inline int MPI2_IOCSTATUS_TARGET_ABORTED =(0x0063); +inline int MPI2_IOCSTATUS_TARGET_NO_CONN_RETRYABLE =(0x0064); +inline int MPI2_IOCSTATUS_TARGET_NO_CONNECTION =(0x0065); +inline int MPI2_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH =(0x006A); +inline int MPI2_IOCSTATUS_TARGET_DATA_OFFSET_ERROR =(0x006D); +inline int MPI2_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA =(0x006E); +inline int MPI2_IOCSTATUS_TARGET_IU_TOO_SHORT =(0x006F); +inline int MPI2_IOCSTATUS_TARGET_ACK_NAK_TIMEOUT =(0x0070); +inline int MPI2_IOCSTATUS_TARGET_NAK_RECEIVED =(0x0071); +inline int MPI2_IOCSTATUS_SAS_SMP_REQUEST_FAILED =(0x0090); +inline int MPI2_IOCSTATUS_SAS_SMP_DATA_OVERRUN =(0x0091); +inline int MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED =(0x00A0); +inline int MPI2_IOCSTATUS_RAID_ACCEL_ERROR =(0x00B0); + +inline int MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE =(0x8000); + +inline string mpi2_iocstatus_str[int key] = + key == MPI2_IOCSTATUS_SUCCESS ? "MPI2_IOCSTATUS_SUCCESS" : + key == MPI2_IOCSTATUS_INVALID_FUNCTION ? "MPI2_IOCSTATUS_INVALID_FUNCTION" : + key == MPI2_IOCSTATUS_BUSY ? "MPI2_IOCSTATUS_BUSY" : + key == MPI2_IOCSTATUS_INVALID_SGL ? "MPI2_IOCSTATUS_INVALID_SGL" : + key == MPI2_IOCSTATUS_INTERNAL_ERROR ? "MPI2_IOCSTATUS_INTERNAL_ERROR" : + key == MPI2_IOCSTATUS_INVALID_VPID ? "MPI2_IOCSTATUS_INVALID_VPID" : + key == MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES ? "MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES" : + key == MPI2_IOCSTATUS_INVALID_FIELD ? "MPI2_IOCSTATUS_INVALID_FIELD" : + key == MPI2_IOCSTATUS_INVALID_STATE ? "MPI2_IOCSTATUS_INVALID_STATE" : + key == MPI2_IOCSTATUS_OP_STATE_NOT_SUPPORTED ? "MPI2_IOCSTATUS_OP_STATE_NOT_SUPPORTED" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_ACTION ? "MPI2_IOCSTATUS_CONFIG_INVALID_ACTION" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_TYPE ? "MPI2_IOCSTATUS_CONFIG_INVALID_TYPE" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ? "MPI2_IOCSTATUS_CONFIG_INVALID_PAGE" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_DATA ? "MPI2_IOCSTATUS_CONFIG_INVALID_DATA" : + key == MPI2_IOCSTATUS_CONFIG_NO_DEFAULTS ? "MPI2_IOCSTATUS_CONFIG_NO_DEFAULTS" : + key == MPI2_IOCSTATUS_CONFIG_CANT_COMMIT ? "MPI2_IOCSTATUS_CONFIG_CANT_COMMIT" : + key == MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR ? "MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR" : + key == MPI2_IOCSTATUS_SCSI_INVALID_DEVHANDLE ? "MPI2_IOCSTATUS_SCSI_INVALID_DEVHANDLE" : + key == MPI2_IOCSTATUS_SCSI_DEVICE_NOT_THERE ? "MPI2_IOCSTATUS_SCSI_DEVICE_NOT_THERE" : + key == MPI2_IOCSTATUS_SCSI_DATA_OVERRUN ? "MPI2_IOCSTATUS_SCSI_DATA_OVERRUN" : + key == MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN ? "MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN" : + key == MPI2_IOCSTATUS_SCSI_IO_DATA_ERROR ? "MPI2_IOCSTATUS_SCSI_IO_DATA_ERROR" : + key == MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR ? "MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR" : + key == MPI2_IOCSTATUS_SCSI_TASK_TERMINATED ? "MPI2_IOCSTATUS_SCSI_TASK_TERMINATED" : + key == MPI2_IOCSTATUS_SCSI_RESIDUAL_MISMATCH ? "MPI2_IOCSTATUS_SCSI_RESIDUAL_MISMATCH" : + key == MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED ? "MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED" : + key == MPI2_IOCSTATUS_SCSI_IOC_TERMINATED ? "MPI2_IOCSTATUS_SCSI_IOC_TERMINATED" : + key == MPI2_IOCSTATUS_SCSI_EXT_TERMINATED ? "MPI2_IOCSTATUS_SCSI_EXT_TERMINATED" : + key == MPI2_IOCSTATUS_EEDP_GUARD_ERROR ? "MPI2_IOCSTATUS_EEDP_GUARD_ERROR" : + key == MPI2_IOCSTATUS_EEDP_REF_TAG_ERROR ? "MPI2_IOCSTATUS_EEDP_REF_TAG_ERROR" : + key == MPI2_IOCSTATUS_EEDP_APP_TAG_ERROR ? "MPI2_IOCSTATUS_EEDP_APP_TAG_ERROR" : + key == MPI2_IOCSTATUS_TARGET_INVALID_IO_INDEX ? "MPI2_IOCSTATUS_TARGET_INVALID_IO_INDEX" : + key == MPI2_IOCSTATUS_TARGET_ABORTED ? "MPI2_IOCSTATUS_TARGET_ABORTED" : + key == MPI2_IOCSTATUS_TARGET_NO_CONN_RETRYABLE ? "MPI2_IOCSTATUS_TARGET_NO_CONN_RETRYABLE" : + key == MPI2_IOCSTATUS_TARGET_NO_CONNECTION ? "MPI2_IOCSTATUS_TARGET_NO_CONNECTION" : + key == MPI2_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH ? "MPI2_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH" : + key == MPI2_IOCSTATUS_TARGET_DATA_OFFSET_ERROR ? "MPI2_IOCSTATUS_TARGET_DATA_OFFSET_ERROR" : + key == MPI2_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA ? "MPI2_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA" : + key == MPI2_IOCSTATUS_TARGET_IU_TOO_SHORT ? "MPI2_IOCSTATUS_TARGET_IU_TOO_SHORT" : + key == MPI2_IOCSTATUS_TARGET_ACK_NAK_TIMEOUT ? "MPI2_IOCSTATUS_TARGET_ACK_NAK_TIMEOUT" : + key == MPI2_IOCSTATUS_TARGET_NAK_RECEIVED ? "MPI2_IOCSTATUS_TARGET_NAK_RECEIVED" : + key == MPI2_IOCSTATUS_SAS_SMP_REQUEST_FAILED ? "MPI2_IOCSTATUS_SAS_SMP_REQUEST_FAILED" : + key == MPI2_IOCSTATUS_SAS_SMP_DATA_OVERRUN ? "MPI2_IOCSTATUS_SAS_SMP_DATA_OVERRUN" : + key == MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED ? "MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED" : + key == MPI2_IOCSTATUS_RAID_ACCEL_ERROR ? "MPI2_IOCSTATUS_RAID_ACCEL_ERROR" : + "MPI2_unknown value"; + + + +/* + * arg0 union *ccb + * arg1 mpr_command *cm + * arg2 sassc->flags + * arg3 device_info + */ +cam::mpr:complete +{ + this->ccb = (union ccb *)arg0; + this->func = this->ccb->ccb_h.func_code & 0xff; + this->periph = this->ccb->ccb_h.path->periph; + this->cm = (struct mpr_command *)arg1; + this->rep = (MPI2_SCSI_IO_REPLY *)this->cm->cm_reply; + this->sassc_flags = arg2; + this->device_info = arg3; + this->trace = 0; + this->do_fast = 0; +} + + +cam::mpr:complete +/this->periph->unit_number == 1 || this->periph->unit_number == 2/ +{ + this->trace = 1; +} + +cam::mpr:complete +/this->trace && this->rep != NULL/ +{ + this->IOCStatus = /* le16toh */ this->rep->IOCStatus & MPI2_IOCSTATUS_MASK; +} + +cam::mpr:complete +/this->trace && this->rep == NULL/ +{ +/* printf("mpr: da%d: FAST", this->periph->unit_number); */ + this->trace = 0 +} + +cam::mpr:complete +/this->func == XPT_SCSI_IO/ +{ + this->hdr = &this->ccb->ccb_h; + this->csio = &this->ccb->csio; + this->cdb = this->hdr->flags & CAM_CDB_POINTER ? + this->csio->cdb_io.cdb_ptr : + &this->csio->cdb_io.cdb_bytes[0]; + this->cdb_len = this->csio->cdb_len ? this->csio->cdb_len : + scsi_cdb_len[this->cdb[0] >> 5]; +} + +cam::mpr:complete +/this->trace && this->rep != NULL && this->func == XPT_SCSI_IO/ +{ + printf("mpr: da%d: SLOW CDB: %s Status: %s", this->periph->unit_number, scsi_op[this->cdb[0]], + mpi2_iocstatus_str[this->IOCStatus]); +} diff --git a/tools/cam/mps.d b/tools/cam/mps.d new file mode 100644 index 000000000000..aa7a8f0c70af --- /dev/null +++ b/tools/cam/mps.d @@ -0,0 +1,331 @@ +inline string scsi_op[int k] = + k == 0x00 ? "TEST UNIT READY" : + k == 0x01 ? "REZERO UNIT" : + k == 0x03 ? "REQUEST SENSE" : + k == 0x04 ? "FORMAT UNIT" : + k == 0x05 ? "READ BLOCK LIMITS" : + k == 0x07 ? "REASSIGN BLOCKS" : + k == 0x08 ? "READ(6)" : + k == 0x0a ? "WRITE(6)" : + k == 0x0b ? "SEEK(6)" : + k == 0x0f ? "READ REVERSE(6)" : + k == 0x10 ? "WRITE FILEMARKS(6)" : + k == 0x11 ? "SPACE(6)" : + k == 0x12 ? "INQUIRY" : + k == 0x14 ? "RECOVER BUFFERED DATA" : + k == 0x15 ? "MODE SELECT(6)" : + k == 0x16 ? "RESERVE(6)" : + k == 0x17 ? "RELEASE(6)" : + k == 0x18 ? "COPY" : + k == 0x19 ? "ERASE(6)" : + k == 0x1a ? "MODE SENSE(6)" : + k == 0x1b ? "START STOP UNIT" : + k == 0x1c ? "RECEIVE DIAGNOSTIC RESULTS" : + k == 0x1d ? "SEND DIAGNOSTIC" : + k == 0x1e ? "PREVENT ALLOW MEDIUM REMOVAL" : + k == 0x24 ? "SET WINDOW" : + k == 0x25 ? "READ CAPACITY(10)" : + k == 0x28 ? "READ(10)" : + k == 0x29 ? "READ GENERATION" : + k == 0x2a ? "WRITE(10)" : + k == 0x2b ? "SEEK(10)" : + k == 0x2c ? "ERASE(10)" : + k == 0x2e ? "WRITE AND VERIFY(10)" : + k == 0x2f ? "VERIFY(10)" : + k == 0x30 ? "SEARCH DATA HIGH(10)" : + k == 0x31 ? "SEARCH DATA EQUAL(10)" : + k == 0x32 ? "SEARCH DATA LOW(10)" : + k == 0x33 ? "SET LIMITS(10)" : + k == 0x35 ? "SYNCHRONIZE CACHE(10)" : + k == 0x36 ? "LOCK UNLOCK CACHE(10)" : + k == 0x37 ? "READ DEFECT DATA(10)" : + k == 0x39 ? "COMPARE" : + k == 0x3a ? "COPY AND VERIFY" : + k == 0x3b ? "WRITE BUFFER" : + k == 0x3c ? "READ BUFFER(10)" : + k == 0x3e ? "READ LONG(10)" : + k == 0x3f ? "WRITE LONG(10)" : + k == 0x40 ? "CHANGE DEFINITION" : + k == 0x41 ? "WRITE SAME(10)" : + k == 0x42 ? "UNMAP" : + k == 0x48 ? "SANITIZE" : + k == 0x4c ? "LOG SELECT" : + k == 0x4d ? "LOG SENSE" : + k == 0x50 ? "XDWRITE(10)" : + k == 0x51 ? "XPWRITE(10)" : + k == 0x52 ? "XDREAD(10)" : + k == 0x53 ? "XDWRITEREAD(10)" : + k == 0x55 ? "MODE SELECT(10)" : + k == 0x56 ? "RESERVE(10)" : + k == 0x57 ? "RELEASE(10)" : + k == 0x5a ? "MODE SENSE(10)" : + k == 0x5e ? "PERSISTENT RESERVE IN" : + k == 0x5f ? "PERSISTENT RESERVE OUT" : + k == 0x7e ? "extended CDB" : + k == 0x7f ? "variable length CDB (more than 16 bytes)" : + k == 0x80 ? "XDWRITE EXTENDED(16)" : + k == 0x81 ? "REBUILD(16)" : + k == 0x82 ? "REGENERATE(16)" : + k == 0x83 ? "Third-party Copy OUT" : + k == 0x84 ? "Third-party Copy IN" : + k == 0x85 ? "ATA PASS-THROUGH(16)" : + k == 0x86 ? "ACCESS CONTROL IN" : + k == 0x87 ? "ACCESS CONTROL OUT" : + k == 0x88 ? "READ(16)" : + k == 0x89 ? "COMPARE AND WRITE" : + k == 0x8a ? "WRITE(16)" : + k == 0x8b ? "ORWRITE" : + k == 0x8c ? "READ ATTRIBUTE" : + k == 0x8d ? "WRITE ATTRIBUTE" : + k == 0x8e ? "WRITE AND VERIFY(16)" : + k == 0x8f ? "VERIFY(16)" : + k == 0x90 ? "PRE-FETCH(16)" : + k == 0x91 ? "SYNCHRONIZE CACHE(16)" : + k == 0x92 ? "LOCK UNLOCK CACHE(16)" : + k == 0x93 ? "WRITE SAME(16)" : + k == 0x94 ? "ZBC OUT" : + k == 0x95 ? "ZBC IN" : + k == 0x9a ? "WRITE STREAM(16)" : + k == 0x9b ? "READ BUFFER(16)" : + k == 0x9c ? "WRITE ATOMIC(16)" : + k == 0x9e ? "SERVICE ACTION IN(16)" : + k == 0xa0 ? "REPORT LUNS" : + k == 0xa1 ? "ATA PASS-THROUGH(12)" : + k == 0xa2 ? "SECURITY PROTOCOL IN" : + k == 0xa3 ? "MAINTENANCE IN" : + k == 0xa4 ? "MAINTENANCE OUT" : + k == 0xa7 ? "MOVE MEDIUM ATTACHED" : + k == 0xa8 ? "READ(12)" : + k == 0xaa ? "WRITE(12)" : + k == 0xae ? "WRITE AND VERIFY(12)" : + k == 0xaf ? "VERIFY(12)" : + k == 0xb3 ? "SET LIMITS(12)" : + k == 0xb4 ? "READ ELEMENT STATUS ATTACHED" : + k == 0xb5 ? "SECURITY PROTOCOL OUT" : + k == 0xb7 ? "READ DEFECT DATA(12)" : + k == 0xba ? "REDUNDANCY GROUP (IN)" : + k == 0xbb ? "REDUNDANCY GROUP (OUT)" : + k == 0xbc ? "SPARE (IN)" : + k == 0xbd ? "SPARE (OUT)" : + k == 0xbe ? "VOLUME SET (IN)" : + k == 0xbf ? "VOLUME SET (OUT)" : + "Unknown"; + +inline string xpt_action_string[int key] = + key == 0 ? "XPT_NOOP" : + key == 1 ? "XPT_SCSI_IO" : + key == 2 ? "XPT_GDEV_TYPE" : + key == 3 ? "XPT_GDEVLIST" : + key == 4 ? "XPT_PATH_INQ" : + key == 5 ? "XPT_REL_SIMQ" : + key == 6 ? "XPT_SASYNC_CB" : + key == 7 ? "XPT_SDEV_TYPE" : + key == 8 ? "XPT_SCAN_BUS" : + key == 9 ? "XPT_DEV_MATCH" : + key == 10 ? "XPT_DEBUG" : + key == 11 ? "XPT_PATH_STATS" : + key == 12 ? "XPT_GDEV_STATS" : + key == 13 ? "XPT_0X0d" : + key == 14 ? "XPT_DEV_ADVINFO" : + key == 15 ? "XPT_ASYNC" : + key == 16 ? "XPT_ABORT" : + key == 17 ? "XPT_RESET_BUS" : + key == 18 ? "XPT_RESET_DEV" : + key == 19 ? "XPT_TERM_IO" : + key == 20 ? "XPT_SCAN_LUN" : + key == 21 ? "XPT_GET_TRAN_SETTINGS" : + key == 22 ? "XPT_SET_TRAN_SETTINGS" : + key == 23 ? "XPT_CALC_GEOMETRY" : + key == 24 ? "XPT_ATA_IO" : + key == 25 ? "XPT_SET_SIM_KNOB" : + key == 26 ? "XPT_GET_SIM_KNOB" : + key == 27 ? "XPT_SMP_IO" : + key == 28 ? "XPT_NVME_IO" : + key == 29 ? "XPT_MMC_IO" : + key == 30 ? "XPT_SCAN_TGT" : + key == 31 ? "XPT_NVME_ADMIN" : + "Too big" ; + +inline int CAM_CDB_POINTER = 1; +inline int XPT_SCSI_IO = 0x01; +inline int XPT_ATA_IO = 0x18; +inline int XPT_NVME_IO = 0x1c; +inline int XPT_NVME_ADMIN = 0x1f; + +/* + * key >> 5 gives the group: + * Group 0: six byte commands + * Group 1: ten byte commands + * Group 2: ten byte commands + * Group 3: reserved (7e and 7f are de-facto 32 bytes though) + * Group 4: sixteen byte commands + * Group 5: twelve byte commands + * Group 6: vendor specific + * Group 7: vendor specific + */ +inline int scsi_cdb_len[int key] = + key == 0 ? 6 : + key == 1 ? 10 : + key == 2 ? 10 : + key == 3 ? 1 : /* reserved */ + key == 4 ? 16 : + key == 5 ? 12 : + key == 6 ? 1 : /* reserved */ + /* key == 7 */ 1; /* reserved */ + +inline int MPI2_IOCSTATUS_MASK =(0x7FFF); +inline int MPI2_IOCSTATUS_SUCCESS =(0x0000); +inline int MPI2_IOCSTATUS_INVALID_FUNCTION =(0x0001); +inline int MPI2_IOCSTATUS_BUSY =(0x0002); +inline int MPI2_IOCSTATUS_INVALID_SGL =(0x0003); +inline int MPI2_IOCSTATUS_INTERNAL_ERROR =(0x0004); +inline int MPI2_IOCSTATUS_INVALID_VPID =(0x0005); +inline int MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES =(0x0006); +inline int MPI2_IOCSTATUS_INVALID_FIELD =(0x0007); +inline int MPI2_IOCSTATUS_INVALID_STATE =(0x0008); +inline int MPI2_IOCSTATUS_OP_STATE_NOT_SUPPORTED =(0x0009); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_ACTION =(0x0020); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_TYPE =(0x0021); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_PAGE =(0x0022); +inline int MPI2_IOCSTATUS_CONFIG_INVALID_DATA =(0x0023); +inline int MPI2_IOCSTATUS_CONFIG_NO_DEFAULTS =(0x0024); +inline int MPI2_IOCSTATUS_CONFIG_CANT_COMMIT =(0x0025); +inline int MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR =(0x0040); +inline int MPI2_IOCSTATUS_SCSI_INVALID_DEVHANDLE =(0x0042); +inline int MPI2_IOCSTATUS_SCSI_DEVICE_NOT_THERE =(0x0043); +inline int MPI2_IOCSTATUS_SCSI_DATA_OVERRUN =(0x0044); +inline int MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN =(0x0045); +inline int MPI2_IOCSTATUS_SCSI_IO_DATA_ERROR =(0x0046); +inline int MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR =(0x0047); +inline int MPI2_IOCSTATUS_SCSI_TASK_TERMINATED =(0x0048); +inline int MPI2_IOCSTATUS_SCSI_RESIDUAL_MISMATCH =(0x0049); +inline int MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED =(0x004A); +inline int MPI2_IOCSTATUS_SCSI_IOC_TERMINATED =(0x004B); +inline int MPI2_IOCSTATUS_SCSI_EXT_TERMINATED =(0x004C); +inline int MPI2_IOCSTATUS_EEDP_GUARD_ERROR =(0x004D); +inline int MPI2_IOCSTATUS_EEDP_REF_TAG_ERROR =(0x004E); +inline int MPI2_IOCSTATUS_EEDP_APP_TAG_ERROR =(0x004F); +inline int MPI2_IOCSTATUS_TARGET_INVALID_IO_INDEX =(0x0062); +inline int MPI2_IOCSTATUS_TARGET_ABORTED =(0x0063); +inline int MPI2_IOCSTATUS_TARGET_NO_CONN_RETRYABLE =(0x0064); +inline int MPI2_IOCSTATUS_TARGET_NO_CONNECTION =(0x0065); +inline int MPI2_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH =(0x006A); +inline int MPI2_IOCSTATUS_TARGET_DATA_OFFSET_ERROR =(0x006D); +inline int MPI2_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA =(0x006E); +inline int MPI2_IOCSTATUS_TARGET_IU_TOO_SHORT =(0x006F); +inline int MPI2_IOCSTATUS_TARGET_ACK_NAK_TIMEOUT =(0x0070); +inline int MPI2_IOCSTATUS_TARGET_NAK_RECEIVED =(0x0071); +inline int MPI2_IOCSTATUS_SAS_SMP_REQUEST_FAILED =(0x0090); +inline int MPI2_IOCSTATUS_SAS_SMP_DATA_OVERRUN =(0x0091); +inline int MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED =(0x00A0); +inline int MPI2_IOCSTATUS_RAID_ACCEL_ERROR =(0x00B0); + +inline int MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE =(0x8000); + +inline string mpi2_iocstatus_str[int key] = + key == MPI2_IOCSTATUS_SUCCESS ? "MPI2_IOCSTATUS_SUCCESS" : + key == MPI2_IOCSTATUS_INVALID_FUNCTION ? "MPI2_IOCSTATUS_INVALID_FUNCTION" : + key == MPI2_IOCSTATUS_BUSY ? "MPI2_IOCSTATUS_BUSY" : + key == MPI2_IOCSTATUS_INVALID_SGL ? "MPI2_IOCSTATUS_INVALID_SGL" : + key == MPI2_IOCSTATUS_INTERNAL_ERROR ? "MPI2_IOCSTATUS_INTERNAL_ERROR" : + key == MPI2_IOCSTATUS_INVALID_VPID ? "MPI2_IOCSTATUS_INVALID_VPID" : + key == MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES ? "MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES" : + key == MPI2_IOCSTATUS_INVALID_FIELD ? "MPI2_IOCSTATUS_INVALID_FIELD" : + key == MPI2_IOCSTATUS_INVALID_STATE ? "MPI2_IOCSTATUS_INVALID_STATE" : + key == MPI2_IOCSTATUS_OP_STATE_NOT_SUPPORTED ? "MPI2_IOCSTATUS_OP_STATE_NOT_SUPPORTED" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_ACTION ? "MPI2_IOCSTATUS_CONFIG_INVALID_ACTION" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_TYPE ? "MPI2_IOCSTATUS_CONFIG_INVALID_TYPE" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ? "MPI2_IOCSTATUS_CONFIG_INVALID_PAGE" : + key == MPI2_IOCSTATUS_CONFIG_INVALID_DATA ? "MPI2_IOCSTATUS_CONFIG_INVALID_DATA" : + key == MPI2_IOCSTATUS_CONFIG_NO_DEFAULTS ? "MPI2_IOCSTATUS_CONFIG_NO_DEFAULTS" : + key == MPI2_IOCSTATUS_CONFIG_CANT_COMMIT ? "MPI2_IOCSTATUS_CONFIG_CANT_COMMIT" : + key == MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR ? "MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR" : + key == MPI2_IOCSTATUS_SCSI_INVALID_DEVHANDLE ? "MPI2_IOCSTATUS_SCSI_INVALID_DEVHANDLE" : + key == MPI2_IOCSTATUS_SCSI_DEVICE_NOT_THERE ? "MPI2_IOCSTATUS_SCSI_DEVICE_NOT_THERE" : + key == MPI2_IOCSTATUS_SCSI_DATA_OVERRUN ? "MPI2_IOCSTATUS_SCSI_DATA_OVERRUN" : + key == MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN ? "MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN" : + key == MPI2_IOCSTATUS_SCSI_IO_DATA_ERROR ? "MPI2_IOCSTATUS_SCSI_IO_DATA_ERROR" : + key == MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR ? "MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR" : + key == MPI2_IOCSTATUS_SCSI_TASK_TERMINATED ? "MPI2_IOCSTATUS_SCSI_TASK_TERMINATED" : + key == MPI2_IOCSTATUS_SCSI_RESIDUAL_MISMATCH ? "MPI2_IOCSTATUS_SCSI_RESIDUAL_MISMATCH" : + key == MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED ? "MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED" : + key == MPI2_IOCSTATUS_SCSI_IOC_TERMINATED ? "MPI2_IOCSTATUS_SCSI_IOC_TERMINATED" : + key == MPI2_IOCSTATUS_SCSI_EXT_TERMINATED ? "MPI2_IOCSTATUS_SCSI_EXT_TERMINATED" : + key == MPI2_IOCSTATUS_EEDP_GUARD_ERROR ? "MPI2_IOCSTATUS_EEDP_GUARD_ERROR" : + key == MPI2_IOCSTATUS_EEDP_REF_TAG_ERROR ? "MPI2_IOCSTATUS_EEDP_REF_TAG_ERROR" : + key == MPI2_IOCSTATUS_EEDP_APP_TAG_ERROR ? "MPI2_IOCSTATUS_EEDP_APP_TAG_ERROR" : + key == MPI2_IOCSTATUS_TARGET_INVALID_IO_INDEX ? "MPI2_IOCSTATUS_TARGET_INVALID_IO_INDEX" : + key == MPI2_IOCSTATUS_TARGET_ABORTED ? "MPI2_IOCSTATUS_TARGET_ABORTED" : + key == MPI2_IOCSTATUS_TARGET_NO_CONN_RETRYABLE ? "MPI2_IOCSTATUS_TARGET_NO_CONN_RETRYABLE" : + key == MPI2_IOCSTATUS_TARGET_NO_CONNECTION ? "MPI2_IOCSTATUS_TARGET_NO_CONNECTION" : + key == MPI2_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH ? "MPI2_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH" : + key == MPI2_IOCSTATUS_TARGET_DATA_OFFSET_ERROR ? "MPI2_IOCSTATUS_TARGET_DATA_OFFSET_ERROR" : + key == MPI2_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA ? "MPI2_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA" : + key == MPI2_IOCSTATUS_TARGET_IU_TOO_SHORT ? "MPI2_IOCSTATUS_TARGET_IU_TOO_SHORT" : + key == MPI2_IOCSTATUS_TARGET_ACK_NAK_TIMEOUT ? "MPI2_IOCSTATUS_TARGET_ACK_NAK_TIMEOUT" : + key == MPI2_IOCSTATUS_TARGET_NAK_RECEIVED ? "MPI2_IOCSTATUS_TARGET_NAK_RECEIVED" : + key == MPI2_IOCSTATUS_SAS_SMP_REQUEST_FAILED ? "MPI2_IOCSTATUS_SAS_SMP_REQUEST_FAILED" : + key == MPI2_IOCSTATUS_SAS_SMP_DATA_OVERRUN ? "MPI2_IOCSTATUS_SAS_SMP_DATA_OVERRUN" : + key == MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED ? "MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED" : + key == MPI2_IOCSTATUS_RAID_ACCEL_ERROR ? "MPI2_IOCSTATUS_RAID_ACCEL_ERROR" : + "MPI2_unknown value"; + + + +/* + * arg0 union *ccb + * arg1 mps_command *cm + * arg2 sassc->flags + * arg3 device_info + */ +cam::mps:complete +{ + this->ccb = (union ccb *)arg0; + this->func = this->ccb->ccb_h.func_code & 0xff; + this->periph = this->ccb->ccb_h.path->periph; + this->cm = (struct mps_command *)arg1; + this->rep = (MPI2_SCSI_IO_REPLY *)this->cm->cm_reply; + this->sassc_flags = arg2; + this->device_info = arg3; + this->trace = 0; + this->do_fast = 0; +} + + +cam::mps:complete +/this->periph->unit_number == 1 || this->periph->unit_number == 2/ +{ + this->trace = 1; +} + +cam::mps:complete +/this->trace && this->rep != NULL/ +{ + this->IOCStatus = /* le16toh */ this->rep->IOCStatus & MPI2_IOCSTATUS_MASK; +} + +cam::mps:complete +/this->trace && this->rep == NULL/ +{ +/* printf("mps: da%d: FAST", this->periph->unit_number); */ + this->trace = 0 +} + +cam::mps:complete +/this->func == XPT_SCSI_IO/ +{ + this->hdr = &this->ccb->ccb_h; + this->csio = &this->ccb->csio; + this->cdb = this->hdr->flags & CAM_CDB_POINTER ? + this->csio->cdb_io.cdb_ptr : + &this->csio->cdb_io.cdb_bytes[0]; + this->cdb_len = this->csio->cdb_len ? this->csio->cdb_len : + scsi_cdb_len[this->cdb[0] >> 5]; +} + +cam::mps:complete +/this->trace && this->rep != NULL && this->func == XPT_SCSI_IO/ +{ + printf("mps: da%d: SLOW CDB: %s Status: %s", this->periph->unit_number, scsi_op[this->cdb[0]], + mpi2_iocstatus_str[this->IOCStatus]); +} From nobody Fri Jan 9 08:07:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnZBY55p7z6NT8G for ; Fri, 09 Jan 2026 08:07: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnZBY4DKxz4CMj for ; Fri, 09 Jan 2026 08:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767946053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LrYtdUqr8uCjWftwj/4DBrQ91uUb70f72sPQ/vcSvu4=; b=fgMP2lylcHu2wFtNVh8mbjf8lt/LrB8H97Z0M9I97NfaNFiU3aIJIY3oLQg9MjKKjpWKQ7 OS6ZfL9Xa276mTxHogGwKkuD08hCHTlWlBZ31c2LTVPA/Ztdgra2s6IPlEw6hfFT5GzWGx J+9IgQW9ZUTFE7/iDbGwZu3vMbK1UyPWpyRrxp++QdCEOfj3PCEQa2ppxMol+LVUfHRx+g HEHPfRRfGiJ8n2n38B3vIzpXpw1isp47UVzhI4YLh3Iuo6WLaHB6IlvyZQWrtDlkRP0T/i GvwBgGXZ02K8POCuLlTCUPPaUupzZfqO0greoV4rbKSgg/k+gWybzdRBFIhwcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767946053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LrYtdUqr8uCjWftwj/4DBrQ91uUb70f72sPQ/vcSvu4=; b=bKNMHvpdN+rNTh/DCxW+CXuZiecuY5EoGaRmGjwWEkQSO+ecSgO+kZVei/M9nJ4P98oMIb dWEWFKGTRKkpJhtdjGmgT0YtNOfLbphjjsik2f2P080BdfDi7U8CAE6br1bMTij+jiWBxw C5TQdqs4vLteAy80SSJJMbBTIQZImntHnU6W3KVHgvRyx3EF6xs82EiHSFVYhYhiuzjrad /ynLI/4TpA8QOU1kUQ5caPyfMxt4QaCN1MlcDZbKkTYryQSVhzyxTtvnwsYI7YDsD4yVqt 5TNW1SRjrX/k+Iv6x0GY+Yb95Tc9V/SbgmAe2BUqSPFBjnOk4TxIrnG9tWDTgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767946053; a=rsa-sha256; cv=none; b=SevNYRd50yWf8vGDd3hH4DP9od6+MjF16nTn8Y0OTHiLjIUoBfFobtk1+GDjim4IB28jg+ 5JwBo+KQD4h2gY4ATc7vlXuHBATAF5UdL6fYq5B4QkkKmyPzDtt/tdzt3pH02ih6Du4ZHA cZXInd6m3nQoE361fXXXTk7ghaSjWM740QeZEPHQj5COwe94MIMCMiUV8dLL4iRIJmyMw2 yWZ5eehI5IQz/97VAR6B0StTeE7mw8U8j/zKR/j6FRzzT1VRFnxcnycbjO4vLuSwtW0ER3 y21ZizsUuO10swyyOQWVZmDJMXnF0M966Tioi7SqjZYvQXKt25DkPiQN/wL32g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnZBY3mK6z1Fkw for ; Fri, 09 Jan 2026 08:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46e4d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 08:07:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: d64db8892f85 - main - release: make sh the default shell List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d64db8892f8519f108d838f8d7e1d3b675ed37cd Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 08:07:33 +0000 Message-Id: <6960b745.46e4d.5273c7fd@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d64db8892f8519f108d838f8d7e1d3b675ed37cd commit d64db8892f8519f108d838f8d7e1d3b675ed37cd Author: Baptiste Daroussin AuthorDate: 2026-01-08 15:28:34 +0000 Commit: Baptiste Daroussin CommitDate: 2026-01-09 08:07:20 +0000 release: make sh the default shell The default shell for root has been changed to sh(1) followup changing in release images sh(1) the shell for the "freebsd" user. MFC After: 1 week Reviewed by: manu, emaste (re) Approved by: manu, emaste (re) Differential Revision: https://reviews.freebsd.org/D54602 --- release/tools/arm.subr | 2 +- release/tools/vagrant.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 55e918e36d97..05436b4f00f6 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -98,7 +98,7 @@ arm_create_user() { chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ - -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' + -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/sh' chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ usermod root -w yes diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index 6f4420bf26cc..37eff7a899ab 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -39,7 +39,7 @@ vagrant_common () { /usr/sbin/pw -R ${DESTDIR} -M ${DESTDIR}/METALOG \ useradd vagrant \ -m -M 0755 -w yes -n vagrant -u 1001 -g 1001 -G 0 \ - -c 'Vagrant User' -d '/home/vagrant' -s '/bin/csh' + -c 'Vagrant User' -d '/home/vagrant' -s '/bin/sh' # Change root's password to vagrant echo 'vagrant' | /usr/sbin/pw -R ${DESTDIR} usermod root -h 0 From nobody Fri Jan 9 09:41:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dncHF5Mvlz6NYw1 for ; Fri, 09 Jan 2026 09:41: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dncHF4ZxFz4Lrl for ; Fri, 09 Jan 2026 09:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767951705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KIpyQpVefP06n08dunM9BnCBxCrElRN6ERm/2vbA4f4=; b=Os/axKSTZ1VM8cDif9AR9+DkK+PAIsVPRtWaNxG4t/7diZYe4SAwak01EWfJkjafZgdZh0 O+hIptlFZxed5DBjcmFWm/fAaDs+kQDJGONaC5q311sKWoD/itcZzXzITTAlVCa2K15FFR kQE2UbNi1hkSewu8u0MaVL7FVVBNP21szfhHEyWxYB5AbSyCg7bdbPK1zYVo9ug6L/HRLL GHRmHAShcHjCEJ+syKaKCVt9lrfMVh+soybNfzdd5ukgcR03ZMrTwMTe9m5dh6fcbJ/dXg iP5BJ8e4Abw0iPreCS/7SoeBiRW5ZRjUXYp51pw1tagV0vB5g8P+Gh7ZkB0s6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767951705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KIpyQpVefP06n08dunM9BnCBxCrElRN6ERm/2vbA4f4=; b=CmNCKGwVGFvR/8lmzW+h5VMkplU+FiQEjQWoZh6lN6fdvLFEGIezVHlYIWTr9P6RSMODKm sjs/rWKaliyrIDnYEjbFC1dQT54mtwZ899EBxjkYz58UTGKz/Jvjh4DeWEQv/u7FqEyMLb V8UwZ+Zjo8Wj7/ZgjgcKxBLpDB2Zn2SL5IIFQ0/8rfyfKDklfgliEGo8N1fRLH4BxzW4c2 5LZ323pmo4mX+goa8eh4RlCiM+48zhaPoOdEvosomej0j5Lu2l34prFqUqDjtAOoXXZRfk cBpxy0Be5kiOhynrvzcSxyMJoKP9iRsViWzCoSrYxT2YjJeRx1QSVl1KgL5UDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767951705; a=rsa-sha256; cv=none; b=AFf0pNRTfbAuEbI5lRuefhFAVB2U0RhlKnYVJS7LatRnsLKLFk6pUWlVtAdbJvc3m4BxpY rpB3TATCj3abQevh3fSK0pHWo3LmL2zAgce6PATQUPeRhKJc6nDfD2+Ywedj5v64xUXi+n w33oIbhug7vPMmy44oFb6ZxdCEZIX5M198IDFMuQhbruKpZwRf9EUmH/c42S5MaO90CIWc oT8bAY9fYao+7w44JgR2aRti++GzD+mHon7glDvt6zThcOyrttwdM6S2+8bqV6aMGQqSCF 4BQPps62TwyQ1j4k4nZxY6Qevuej7Ya/SSW6QSngrV1LRdDc3P2Q4MYM2l1LXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dncHF42MDz1J15 for ; Fri, 09 Jan 2026 09:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21adb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 09:41:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Juraj Lutter Subject: git: a556feb99765 - main - freebsd-base.7: Fix stray -r List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a556feb99765a8eae96b2077067dd482c9dd3f57 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 09:41:45 +0000 Message-Id: <6960cd59.21adb.4a6bdc8c@gitrepo.freebsd.org> The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/src/commit/?id=a556feb99765a8eae96b2077067dd482c9dd3f57 commit a556feb99765a8eae96b2077067dd482c9dd3f57 Author: Juraj Lutter AuthorDate: 2026-01-09 09:41:21 +0000 Commit: Juraj Lutter CommitDate: 2026-01-09 09:41:21 +0000 freebsd-base.7: Fix stray -r Remote stray "-r" from the example of installing a toolchain to alternate root. Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D54611 --- share/man/man7/freebsd-base.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 index 610ac0b16717..383808579487 100644 --- a/share/man/man7/freebsd-base.7 +++ b/share/man/man7/freebsd-base.7 @@ -214,7 +214,7 @@ alternate root (for example, to support cross-compiling software for a different target than the host system): .Bd -literal -offset indent pkg -r /ppcdev -oABI=FreeBSD:16:powerpc64le \e - install -r FreeBSD-set-devel + install FreeBSD-set-devel .Ed .Sh SEE ALSO .Xr build 7 , From nobody Fri Jan 9 10:43:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dndfG0TCbz6Nd86 for ; Fri, 09 Jan 2026 10:43: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dndfF6x1tz3CGG for ; Fri, 09 Jan 2026 10:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767955398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGFJXF4pyaEf1ItWww4SIbRkbCKGKQWHzo1e8i0S+y8=; b=q7uOil1G7rBqcbC6+TTLPvIY1N3ivfeqONCtXgzvsB/w2qVtBrjUG0BKDmp9GpfnKS15Nw O2PyMy6CmEpvaBGUycoA3xUzEv6txMzml4DvHn7I3uPcxbipOl43T0wiAitpFsTKAvXOQf gqr+HgW2s7e2O0en+HcBd2Lty1x70DNY54FiBPXNZ0RhDVjycrTwsY5KXYu4TW9zqyT7B7 0W71n36MJttn+0+aF9i4jmk8HMq8310veO9g9yuRFJ9XXX7X2PGBEK7hJoQTRAqWRBu901 UECQ9Go0OOFJCidy4hTplDXgNOMhWiU4kwrshWl7S9S3KbU6tRi+SjSgO2KkNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767955398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGFJXF4pyaEf1ItWww4SIbRkbCKGKQWHzo1e8i0S+y8=; b=L8iCjqyHjxhjniC10bigYGMeAiBKBfDjd3yI6PYPrh5LPe2WwYUJxWYo7Rr340fEPPGGED bHcOtVwvjjsi2q6cP/iGt3cLCMq2xg69E3DFrziHXHh5B4jzX4KR5UU5LrsNAlTFvYUPD0 m6Lw1zXRWM5F7Z6IzpkBnYsn0DDm53o+8z+F6gVa31eN8dl9Q3MdF9XliUprPcdO+zNaOl pXo0JvWdJ8qBSTkyeBp3zDwNvuewBu0AJs5OxIf28t8Ye+bEj8E2jKqwZib6L0g7QJGt6G olr4NJ1TCC/KASb6UhLJk1mppv2dcDAoWTjTuq5JICYxhrhRKSCoxSTsFFz5WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767955398; a=rsa-sha256; cv=none; b=I79wM8znAIJiqmsQDCpLp2hGSwT2cHGJM4dBDerBWznIiIMADLrftPs6cAyE2IEekOPeb3 CSbxya7E/wS8fKJA5+jkCYHTTVWZKgwF376Olq2J1GKdQEgxqxdDZ35cQ2eS4/XyYk2UJ9 sJIE9en6omRQvqLjEYqcJEGu37F/7esTLIHiyDap/kS1KWWKgCxLzhmaRpc+K9zsA9Gdd4 b/UeGExzXVzLed17aXGHo3K8MReKTbv+sHTlcqV04RAgYfQlcimLNtC7UNFggCgqJDyk3p C4vIJGWdEldy6idGmt416xPIWyC7/soHkqE80OP2MkqXbACJEw1Cw5LRQZVA5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dndfF6WTvz1Jb1 for ; Fri, 09 Jan 2026 10:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30525 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 10:43:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sumit Saxena Subject: git: d53d7b466016 - main - bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_IN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d53d7b466016408229491cfd2f8bdc742ff642e3 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 10:43:12 +0000 Message-Id: <6960dbc0.30525.c2d9dba@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=d53d7b466016408229491cfd2f8bdc742ff642e3 commit d53d7b466016408229491cfd2f8bdc742ff642e3 Author: Sumit Saxena AuthorDate: 2026-01-09 10:28:53 +0000 Commit: Sumit Saxena CommitDate: 2026-01-09 10:40:18 +0000 bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_IN The driver and applications currently use hard-coded numeric ioctl command opcodes. These opcodes are interpreted as having the IOC_IN direction (data copied from the user application to the driver), regardless of the actual packet size. Consequently, when the packet size is zero and the direction is set to IOC_IN, the kernel fails these ioctls if COMPAT is disabled. While the driver and applications should ideally set the direction correctly— for example, using IOC_VOID when the packet size is zero—the driver will now be updated to define ioctl opcodes using the _IOC macro to support both IOC_VOID and IOC_IN. This change ensures backward compatibility with older applications that exclusively use IOC_IN. Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D54601 MFC after: 3 days --- sys/dev/bnxt/bnxt_en/bnxt_mgmt.c | 9 ++++++--- sys/dev/bnxt/bnxt_en/bnxt_mgmt.h | 11 ++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c index bbc12b96d8c6..98ae9848c42b 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c @@ -387,15 +387,18 @@ bnxt_mgmt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, int ret = 0; switch(cmd) { - case BNXT_MGMT_OPCODE_GET_DEV_INFO: + case IO_BNXT_MGMT_OPCODE_GET_DEV_INFO: + case IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO: ret = bnxt_mgmt_get_dev_info(dev, cmd, data, flag, td); break; - case BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM: + case IO_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM: + case IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM: mtx_lock(&mgmt_lock); ret = bnxt_mgmt_process_hwrm(dev, cmd, data, flag, td); mtx_unlock(&mgmt_lock); break; - case BNXT_MGMT_OPCODE_DCB_OPS: + case IO_BNXT_MGMT_OPCODE_DCB_OPS: + case IOW_BNXT_MGMT_OPCODE_DCB_OPS: ret = bnxt_mgmt_process_dcb(dev, cmd, data, flag, td); break; default: diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h index 8489a223adef..5b94184b1646 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h @@ -39,9 +39,14 @@ #define DRIVER_NAME "if_bnxt" -#define BNXT_MGMT_OPCODE_GET_DEV_INFO 0x80000000 -#define BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM 0x80000001 -#define BNXT_MGMT_OPCODE_DCB_OPS 0x80000002 + +#define IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO _IOW(0, 0, 0) +#define IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IOW(0, 1, 0) +#define IOW_BNXT_MGMT_OPCODE_DCB_OPS _IOW(0, 2, 0) + +#define IO_BNXT_MGMT_OPCODE_GET_DEV_INFO _IO(0, 0) +#define IO_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IO(0, 1) +#define IO_BNXT_MGMT_OPCODE_DCB_OPS _IO(0, 2) #define BNXT_MGMT_MAX_HWRM_REQ_LENGTH HWRM_MAX_REQ_LEN #define BNXT_MGMT_MAX_HWRM_RESP_LENGTH (512) From nobody Fri Jan 9 12:35:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnh7L0D6lz6Nkg5 for ; Fri, 09 Jan 2026 12:35: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnh7K5BVbz3NZg for ; Fri, 09 Jan 2026 12:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767962109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PsUmI594AAQfF1mKomR/0KAxfTRF4aO6uiq5NS2SyYU=; b=Gz2RwWWPRKSKeckjKkgnbN6JLlANq/Xmh8EC9YStHm62ZwElDc0/x8Xh5UYUYjpcPIKurC vI3QGOrleXConH7DoFyfRbHULXTeotiXNY9zvAvcfPr+b7cchNbVVuvUJE5RCPT+qdM05N JM2YeclYgo/ueDSd8pLiUkYisEa/KTJj6jMLpXkLAKquJ0BH08m8wc76p0TFgoPI5AkBRG SEEOLq9MyoN2Lrh2E1/Rf5V+MueyHkuv/ajwd2t7XbuYStmESYYLqFeHuY8+YUbSLlrzTP 4qQzpn9RUDbjuxaMoa8H8tbPH6WAiRrkmz3uDPsJs3nwxD9gcJl6lKu9vwz7Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767962109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PsUmI594AAQfF1mKomR/0KAxfTRF4aO6uiq5NS2SyYU=; b=dFMzI3pRFbNhljie5c6BEKupPVw0TU4W1LAylQKy0EOgM5NKpxmFCPpYnydyToqe9TxZPK yc7cpGFWOM7/UKFUY0cRLODyUGrEIGKbWjN5+Uy9KHqlLG0z5zfcRhUn+sbogyM6wU4V3H byvKg01/VEaHW1h2aWGHJm601mgdZF69MqWS0jCYxrIJIkMXbO5/+65zjBZjvVnCipcTXs f0J+R3AhbTvXULicf4GTRRTgFDt7MMv5+lLyXTcKe/IM2dqSYy9X5mhtOCbWnkFdvIn8vd llYBXSQeUCARz6vWZW7Y+eFDY2elSxjonBGR0hBWkwFQ+6SHlgF63sNBAnA15w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767962109; a=rsa-sha256; cv=none; b=j+XXbXb36/MKW+UFDOkzhwfEpXxOM52uGnw4qv62IglZ/JdT4Bh9f0gIzFJaT4R4AOxyMK O/MgMqCU9Vg/QkoJdn8YR9YVdR9vOI37E2gXnSpb0YWd3hv+qIJ9G50vddpa5g10f5NIrt 62XoHATfrv0Nm+uujUBhYek7OeWHVbR7mAKUDJc1IRYkNylbsNOS16q+J8zO/CMBPfmdqu iicN38mafQS6oad2fenWODHhX2h4YuSM+VvXL39WxvTvlRfOXB5DOQF8Pw23bihbPWIIib z99KfGmEmB5Tm4G81wFKi5g6PFwaAq1il6Bgk922WZa9wZJIK5NcO7ezVi9NyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnh7K3k5Rz1NPt for ; Fri, 09 Jan 2026 12:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b705 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 12:35:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sumit Saxena Subject: git: 702b3a9a0359 - main - Revert "librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 702b3a9a0359680b48b9782cb891c584a4ea5073 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 12:35:09 +0000 Message-Id: <6960f5fd.3b705.3230abf4@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=702b3a9a0359680b48b9782cb891c584a4ea5073 commit 702b3a9a0359680b48b9782cb891c584a4ea5073 Author: Sumit Saxena AuthorDate: 2026-01-09 12:01:30 +0000 Commit: Sumit Saxena CommitDate: 2026-01-09 12:33:45 +0000 Revert "librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping" The commit message has to be rewritten as it is not clear and lacks some key details about the change. This reverts commit 35dd53a9e13265f7a479649776453efc5b737a0f. Reported by: jrtc27 --- share/mk/src.libnames.mk | 7 ++----- usr.bin/ofed/libibverbs/Makefile.inc | 2 +- usr.bin/ofed/librdmacm/Makefile.inc | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index df5fdc544959..4369a30acc59 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -283,7 +283,6 @@ _LIBRARIES+= \ irdma \ mlx4 \ mlx5 \ - bnxtre \ rdmacm \ osmcomp \ opensm \ @@ -359,7 +358,7 @@ _DP_cap_sysctl= nv _DP_cap_syslog= nv _DP_crypt= md .if ${MK_OFED} != "no" -_DP_pcap= ibverbs mlx5 bnxtre +_DP_pcap= ibverbs mlx5 .endif _DP_pjdlog= util _DP_usb= pthread @@ -508,12 +507,11 @@ _DP_cxgb4= ibverbs pthread _DP_ibcm= ibverbs _DP_ibmad= ibumad _DP_ibnetdisc= osmcomp ibmad ibumad -_DP_ibumad= +_DP_ibumad= _DP_ibverbs= _DP_irdma= ibverbs pthread _DP_mlx4= ibverbs pthread _DP_mlx5= ibverbs pthread -_DP_bnxtre= ibverbs pthread _DP_rdmacm= ibverbs _DP_osmcomp= pthread _DP_opensm= pthread @@ -806,7 +804,6 @@ LIBIBVERBSDIR= ${_LIB_OBJTOP}/lib/ofed/libibverbs LIBIRDMADIR= ${_LIB_OBJTOP}/lib/ofed/libirdma LIBMLX4DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx4 LIBMLX5DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx5 -LIBBNXTREDIR= ${_LIB_OBJTOP}/lib/ofed/libbnxtre LIBRDMACMDIR= ${_LIB_OBJTOP}/lib/ofed/librdmacm LIBOSMCOMPDIR= ${_LIB_OBJTOP}/lib/ofed/complib LIBOPENSMDIR= ${_LIB_OBJTOP}/lib/ofed/libopensm diff --git a/usr.bin/ofed/libibverbs/Makefile.inc b/usr.bin/ofed/libibverbs/Makefile.inc index f8301c3d1073..616c9bd54707 100644 --- a/usr.bin/ofed/libibverbs/Makefile.inc +++ b/usr.bin/ofed/libibverbs/Makefile.inc @@ -3,6 +3,6 @@ _spath=${SRCTOP}/contrib/ofed/libibverbs BINDIR?= /usr/bin CFLAGS+= -I${_spath} -LIBADD+= ibverbs mlx4 mlx5 bnxtre cxgb4 irdma pthread +LIBADD+= ibverbs mlx4 mlx5 cxgb4 irdma pthread WARNS?= 2 diff --git a/usr.bin/ofed/librdmacm/Makefile.inc b/usr.bin/ofed/librdmacm/Makefile.inc index 66fcf2ac267b..74f32fe08b42 100644 --- a/usr.bin/ofed/librdmacm/Makefile.inc +++ b/usr.bin/ofed/librdmacm/Makefile.inc @@ -3,6 +3,6 @@ _spath=${SRCTOP}/contrib/ofed/librdmacm BINDIR?= /usr/bin CFLAGS+= -I${SRCTOP}/contrib/ofed -LIBADD+= ibverbs rdmacm irdma mlx4 mlx5 bnxtre cxgb4 pthread +LIBADD+= ibverbs rdmacm irdma mlx4 mlx5 cxgb4 pthread WARNS?= 0 From nobody Fri Jan 9 12:35:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnh7L6dwzz6NkKj for ; Fri, 09 Jan 2026 12:35: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnh7L50mjz3NrR for ; Fri, 09 Jan 2026 12:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767962110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NlYRpnC/c01SvOYupzxInKswJm11xD5GKoE2Y/xj2c=; b=ZWNFLJiBvhUiKjZodru2328jZzujzMuelOfOXncM1mD3ajUeIurrZic3jv2lKIm4qZDKxT wBSfKeW6lclEh1SHV64aZuoefNoIwdAGlA8aQ31Y9dTcaMNxQ416KU7Sx0M9lQ9gReSUbG 1IG0k12zrpmQcQpSWssHefOQqfSuow75kH+va2cgdWVh5DNszejX0LtxOY/Svw49sFiS9Y 4F54zC6nfVe7nrnka65Pu1cfZe9J4y4aHNwpQJzb/mmgWpNkgGKyZ28Ox5Fx1xHiTOFzs6 5fE1snNN/FXC9FcPUCjyemJE5x7E1fMJapxoptTKaPdGIpdgT7r9Cq+3E5BJ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767962110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NlYRpnC/c01SvOYupzxInKswJm11xD5GKoE2Y/xj2c=; b=pGOwN8H5jE8yU9E/MM0gOVCpgHMUIk6AEjK3ZmQLy5MXlYbmD5l7lYCMXuAWconTRyEGVJ EP+++EVcjvOQTiG+zf7mSMpQ7/QyvU9swTToidvxS2BU29IGNvGoWk9Lvk5bBLILM2APIi c5+HypfXnDW/2yfLVYZv/cO87aJdR5fyj65Z28woZ6jMnL1xFy6rV1YtZw+lHGUzd02P7I RklZZuKmgxdwLfxuOtd10FhlQNYlMrptSmDeh14NsD3RuFoRBY38+0l14kaEeublSh0S3I j+/y+ZiKTZxQPyBPlC9B03ECskCAPQ68QtwtmA2sS8Jvu9Af66ieGuLJNSHUbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767962110; a=rsa-sha256; cv=none; b=XDwIteqcicueBcauK2MXFNDvhPDsq7BIeaJwVq+sTkYWXvgEZ4/w335YXdUrqdsdjsKny7 lrpi5AgaZB9V1l0Lw2Q7uoucAeT4KAPV/tnx6jHNk+m6aebVSvZj/BTDEzTSJ8cnIi3Wco DW3DQQjzRIiDFiewOIgMYnGb/WBGhTsFpOxZfop210nRs2VGGeG1DMvMeklBb+SUqAMlnF BFy3vCWOgYLLp4PT8EGJWIf3FR1msFoOQHYuqYRRtHeGx0bQe1N3wZ6wRAUuYP9GLgUh9B Og5MZhCYraPgxU9fEDgOf3yIOvGVeYUKIWJ5E6R1vCRAaNzbXUJbjIzczxNiMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnh7L4LWqz1NKv for ; Fri, 09 Jan 2026 12:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a996 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 12:35:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 821c6c43a33d - main - librdmacm/libibverbs: Add bnxtre RDMA provider to OFED build infrastructure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 821c6c43a33d5b72290ee7f896d28438a3b789e1 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 12:35:10 +0000 Message-Id: <6960f5fe.3a996.51b0d9e2@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=821c6c43a33d5b72290ee7f896d28438a3b789e1 commit 821c6c43a33d5b72290ee7f896d28438a3b789e1 Author: Sreekanth Reddy AuthorDate: 2026-01-09 11:34:43 +0000 Commit: Sumit Saxena CommitDate: 2026-01-09 12:34:02 +0000 librdmacm/libibverbs: Add bnxtre RDMA provider to OFED build infrastructure Extend the FreeBSD OFED build framework to include the Broadcom bnxtre RDMA provider library. This change: -Registers libbnxtre in src.libnames.mk so it is built and installed as part of the OFED libraries. -Adds bnxtre to the OFED pcap dependency set when MK_OFED is enabled. -Declares proper dependency mappings for bnxtre (ibverbs, pthread). -Introduces LIBBNXTREDIR for consistent object directory handling. -Updates libibverbs and librdmacm build rules to link against libbnxtre, enabling Broadcom RoCE device support at runtime. -libbnxtre library uses below constructor to register with the libibverbs, static attribute((constructor)) void bnxt_re_register_driver(void) These updates ensure that applications using libibverbs and librdmacm can discover and use Broadcom bnxt RDMA devices on FreeBSD. Reviewed by: markj, ssaxena Differential Revision: https://reviews.freebsd.org/D54368 MFC after: 3 days --- share/mk/src.libnames.mk | 7 +++++-- usr.bin/ofed/libibverbs/Makefile.inc | 2 +- usr.bin/ofed/librdmacm/Makefile.inc | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 4369a30acc59..df5fdc544959 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -283,6 +283,7 @@ _LIBRARIES+= \ irdma \ mlx4 \ mlx5 \ + bnxtre \ rdmacm \ osmcomp \ opensm \ @@ -358,7 +359,7 @@ _DP_cap_sysctl= nv _DP_cap_syslog= nv _DP_crypt= md .if ${MK_OFED} != "no" -_DP_pcap= ibverbs mlx5 +_DP_pcap= ibverbs mlx5 bnxtre .endif _DP_pjdlog= util _DP_usb= pthread @@ -507,11 +508,12 @@ _DP_cxgb4= ibverbs pthread _DP_ibcm= ibverbs _DP_ibmad= ibumad _DP_ibnetdisc= osmcomp ibmad ibumad -_DP_ibumad= +_DP_ibumad= _DP_ibverbs= _DP_irdma= ibverbs pthread _DP_mlx4= ibverbs pthread _DP_mlx5= ibverbs pthread +_DP_bnxtre= ibverbs pthread _DP_rdmacm= ibverbs _DP_osmcomp= pthread _DP_opensm= pthread @@ -804,6 +806,7 @@ LIBIBVERBSDIR= ${_LIB_OBJTOP}/lib/ofed/libibverbs LIBIRDMADIR= ${_LIB_OBJTOP}/lib/ofed/libirdma LIBMLX4DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx4 LIBMLX5DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx5 +LIBBNXTREDIR= ${_LIB_OBJTOP}/lib/ofed/libbnxtre LIBRDMACMDIR= ${_LIB_OBJTOP}/lib/ofed/librdmacm LIBOSMCOMPDIR= ${_LIB_OBJTOP}/lib/ofed/complib LIBOPENSMDIR= ${_LIB_OBJTOP}/lib/ofed/libopensm diff --git a/usr.bin/ofed/libibverbs/Makefile.inc b/usr.bin/ofed/libibverbs/Makefile.inc index 616c9bd54707..f8301c3d1073 100644 --- a/usr.bin/ofed/libibverbs/Makefile.inc +++ b/usr.bin/ofed/libibverbs/Makefile.inc @@ -3,6 +3,6 @@ _spath=${SRCTOP}/contrib/ofed/libibverbs BINDIR?= /usr/bin CFLAGS+= -I${_spath} -LIBADD+= ibverbs mlx4 mlx5 cxgb4 irdma pthread +LIBADD+= ibverbs mlx4 mlx5 bnxtre cxgb4 irdma pthread WARNS?= 2 diff --git a/usr.bin/ofed/librdmacm/Makefile.inc b/usr.bin/ofed/librdmacm/Makefile.inc index 74f32fe08b42..66fcf2ac267b 100644 --- a/usr.bin/ofed/librdmacm/Makefile.inc +++ b/usr.bin/ofed/librdmacm/Makefile.inc @@ -3,6 +3,6 @@ _spath=${SRCTOP}/contrib/ofed/librdmacm BINDIR?= /usr/bin CFLAGS+= -I${SRCTOP}/contrib/ofed -LIBADD+= ibverbs rdmacm irdma mlx4 mlx5 cxgb4 pthread +LIBADD+= ibverbs rdmacm irdma mlx4 mlx5 bnxtre cxgb4 pthread WARNS?= 0 From nobody Fri Jan 9 14:06:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnk8Z1FBZz62Y0W; Fri, 09 Jan 2026 14:06:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnk8Z0Sl2z3Wk7; Fri, 09 Jan 2026 14:06:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767967582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sdNGL4/LJkUoLFz1LLsRNKMUpEzVgY57MbRrcR4N5zw=; b=XqHpDqtD1kWf9WdjDfC5R6s6pgISobwMDp63NxSu4QDihFsvJZz5Rs7LZ/ghcGWLM4+w5I zOhB6JtInS8BhqXAt8O57tW4JlzyPUIVYuI40xDMjwc/Zoo3GO/1rrpegyw59DuL7QXH5/ yXMEKj2RxoeJNkjqDAZ6XOUWibDnodAzlBT6rWBMdUkl1rQofynKNMCmc64PuLChka6ouu EWJ1ZQh1HpBKbXf4yeWX64PdlNP1O+IOR42OETPFmN5tIZhNiXBmuBAkse9oCZUnsO/pzE 3/5b2p+MALSas72len2PPdcWH6zH0yCsf/V8GRAGeh9OyCUshgTO64YvRz3g3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767967582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sdNGL4/LJkUoLFz1LLsRNKMUpEzVgY57MbRrcR4N5zw=; b=Iom8YRM2eAusTRkFZbt2DQXR6i31P0Mx8oXX2SMa8rm3SSoMSS4yo3ds0y7akATQ+EqeXL +avUDXCL1apHXvatJpPKOEvYDZE17pz92BjyzXrgID3ysyXjCPpmuxFKXxBsfZkfMJEciU HLUS0gN06+pEH6+1UNkEFNBxkWBBqdw3TYmTLlyvSxj/DrudwIEn6hC9KlFrDKIEfjOoIP Jq8RFiwqhKom6A6QxhG2grw/n8dr7tNBXRve7A8tAp8dL7rynBWNx3QwLHP13DTHejdzdO zR8+mKOyfhm2XHmJxDHsn5AmSkVaXhBIbd2gbLpI714PKw0ys7QHp2uPAqF72w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767967582; a=rsa-sha256; cv=none; b=hV9BpnmqltDWJg1+LsTTsAepIODHOMO4RyZWslEVYrYm56p5gAW7QrpEcZan5MqpCb8zOb TZrzIgpI8+zhQukQmhquBb075BSyWJ9mIzpzq7YSrko40meN+NBiIqzkst5moZwsR3tJhK 0hRaN6+8+G0cyhqxUwWnnL+bHoX3Ba2Q/mQaQvitP8quaksH5WuzR/cTS4gSxEasTmq/3h 92WTm/Mefgf9u2YrcOf0PuE1k4hbxF8ybywW3S+rn8zgIU0uwAZWQkoXgCZebi11Oikwdc tw6lZjE0H5JsORUWRD65wTVYQeIy3MRCxV5mVNyLcL4vgTVSP4pXRGYKLf5I+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:5495:3690:ffdd:8044] (unknown [IPv6:2601:5c0:4202:5670:5495:3690:ffdd:8044]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dnk8Y5Lb9z2gb; Fri, 09 Jan 2026 14:06:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <89417c41-4c32-48c5-b049-5d1ca253eeb8@FreeBSD.org> Date: Fri, 9 Jan 2026 09:06:20 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: eeaa865edba6 - main - acpi: Fix setting sleep state sysctls to NONE Content-Language: en-US To: Emmanuel Vadot , Aymeric Wibo Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6929b55d.2b59a.8a970bd@gitrepo.freebsd.org> <20260108115959.4bc9493930ce880913058e5c@bidouilliste.com> <20260108142338.548865cf1cd31fb18d2b6a2a@bidouilliste.com> From: John Baldwin In-Reply-To: <20260108142338.548865cf1cd31fb18d2b6a2a@bidouilliste.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/8/26 08:23, Emmanuel Vadot wrote: > On Thu, 8 Jan 2026 11:59:59 +0100 > Emmanuel Vadot wrote: > >> >> Hello, >> >> On Fri, 28 Nov 2025 14:44:45 +0000 >> Aymeric Wibo wrote: >> >>> The branch main has been updated by obiwac: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=eeaa865edba685545ac22c378b35552e09bf1b41 >>> >>> commit eeaa865edba685545ac22c378b35552e09bf1b41 >>> Author: Aymeric Wibo >>> AuthorDate: 2025-11-25 19:34:34 +0000 >>> Commit: Aymeric Wibo >>> CommitDate: 2025-11-28 14:42:54 +0000 >>> >>> acpi: Fix setting sleep state sysctls to NONE >>> >>> This restores the functionality as it was pre-97d152698f48. >>> >>> A stopgap was committed by glebius@ in 34dfccc64f47 ("acpi: in >>> acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()"). >>> >>> PR: 290651 >>> Reviewed by: thj, emaste >>> Approved by: thj >>> Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h") >>> Sponsored by: The FreeBSD Foundation >>> Differential Revision: https://reviews.freebsd.org/D53909 >>> --- >>> sys/dev/acpica/acpi.c | 39 ++++++++++++++++++++++++--------------- >>> 1 file changed, 24 insertions(+), 15 deletions(-) >>> >>> diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c >>> index e3ff4f6937d2..99dd817f9158 100644 >>> --- a/sys/dev/acpica/acpi.c >>> +++ b/sys/dev/acpica/acpi.c >>> @@ -4318,13 +4318,15 @@ acpi_sname_to_sstate(const char *sname) >>> { >>> int sstate; >>> >>> + if (strcasecmp(sname, "NONE") == 0) >>> + return (ACPI_STATE_UNKNOWN); >>> + >>> if (toupper(sname[0]) == 'S') { >>> sstate = sname[1] - '0'; >>> if (sstate >= ACPI_STATE_S0 && sstate <= ACPI_STATE_S5 && >>> sname[2] == '\0') >>> return (sstate); >>> - } else if (strcasecmp(sname, "NONE") == 0) >>> - return (ACPI_STATE_UNKNOWN); >>> + } >>> return (-1); >>> } >>> >>> @@ -4379,8 +4381,10 @@ acpi_suspend_state_sysctl(SYSCTL_HANDLER_ARGS) >>> if (new_sstate < 0) >>> return (EINVAL); >>> new_stype = acpi_sstate_to_stype(new_sstate); >>> - if (acpi_supported_stypes[new_stype] == false) >>> + if (new_sstate != ACPI_STATE_UNKNOWN && >>> + acpi_supported_stypes[new_stype] == false) >>> return (EOPNOTSUPP); >>> + >>> if (new_stype != old_stype) >>> power_suspend_stype = new_stype; >>> return (err); >>> @@ -4423,21 +4427,26 @@ acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) >>> if (err != 0 || req->newptr == NULL) >>> return (err); >>> >>> - new_stype = power_name_to_stype(name); >>> - if (new_stype == POWER_STYPE_UNKNOWN) { >>> - sstate = acpi_sname_to_sstate(name); >>> - if (sstate < 0) >>> - return (EINVAL); >>> - printf("warning: this sysctl expects a sleep type, but an ACPI S-state has " >>> - "been passed to it. This functionality is deprecated; see acpi(4).\n"); >>> - if (sstate < ACPI_S_STATE_COUNT && >>> - !acpi_supported_sstates[sstate]) >>> + if (strcasecmp(name, "NONE") == 0) { >>> + new_stype = POWER_STYPE_UNKNOWN; >>> + } else { >>> + new_stype = power_name_to_stype(name); >>> + if (new_stype == POWER_STYPE_UNKNOWN) { >>> + sstate = acpi_sname_to_sstate(name); >>> + if (sstate < 0) >>> + return (EINVAL); >>> + printf("warning: this sysctl expects a sleep type, but an ACPI " >>> + "S-state has been passed to it. This functionality is " >>> + "deprecated; see acpi(4).\n"); >>> + MPASS(sstate < ACPI_S_STATE_COUNT); >>> + if (acpi_supported_sstates[sstate] == false) >>> + return (EOPNOTSUPP); >>> + new_stype = acpi_sstate_to_stype(sstate); >>> + } >>> + if (acpi_supported_stypes[new_stype] == false) >>> return (EOPNOTSUPP); >>> - new_stype = acpi_sstate_to_stype(sstate); >>> } >>> >>> - if (acpi_supported_stypes[new_stype] == false) >>> - return (EOPNOTSUPP); >>> if (new_stype != old_stype) >>> *(enum power_stype *)oidp->oid_arg1 = new_stype; >>> return (0); >>> >> >> Since this commit I have the warning printed as I have the >> hw.acpi.lid_switch_state set to 'S3' in sysctl.conf, the man page says >> it's correct. Changing it to 'standby' doesn't work as the value isn't >> recognized. >> What is the correct way for this sysctl now ? >> >> Cheers, > > Ok so the correct value is 's2mem' but this doesn't seems to be > documented anywhere in acpi(4) like the warning says. OTOH, it seems like if we are using traditional ACPI system states, we should still be able to call it what it is (S3). That is, for systems using actual S3 and not S0ix, setting these nodes to S3 should really continue to work IMO. -- John Baldwin From nobody Fri Jan 9 14:16:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnkN308fpz62Z5p for ; Fri, 09 Jan 2026 14:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnkN255Z1z3YX8 for ; Fri, 09 Jan 2026 14:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767968178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNzPjk8QZKEZcNZtT7HXgEEqcX/2EBqSm/knC7J5Rm8=; b=rnMtPUh1V4MSd4cVgcrHVK+vmS+pDDwmgy1zvlHdhfOIESimNoti3JarVvW33jqJoBWOCB V/5AL7B1BFNzIF7qkg8sz3nnVSZK7I3gCYEdF5N+BJTz/9L0kuEcKoBBhg4ln5kC/J0KOv JGkxMIF9i/HgrXSHjBlpcGoQ3WqzvMP1X0gSd46h/m+u8duk9WdOQ0ZA8a9lNy6rp4l1aM vxNIL9dj4SQSQDiPzHMJLKEIzGxgOPiN8v+hpDi2QLM9wfNIQ3SqF2PFdGy1R6YSYXMuOG QP+wkJs2OLjHhqDRy2FcqibJtxdK0m41tmu0kbbZA8F2jq+3OuRYQZK1rDiIfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767968178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNzPjk8QZKEZcNZtT7HXgEEqcX/2EBqSm/knC7J5Rm8=; b=vlbkvznI+G4iIODxT/+n8biTJ/RCx0meIpj/2RDAUMQpoTbtDyTVtacUoakjfUMz3JALCq er487xA2qo9eBkULGb023MfnNPBJkF00CQdq/JCtyAeo5w/4CDLkdzeaA+COQ75JZzXINn FGtRVA2KBI0FsZaRDoixYE95Oydmmm89hnA+q0buf58AOOcPK5V+/4+Py+pqK6G13H/l+N rCTYW4K8iQKGzqU1lOOIIMFpknnIsSBnPDCDT3u48r5E7mJZppQtfHg8r98KNvUEhrpMnA xZ9gatRnpVCF1VDuH4GJNPXXlPTXIc6HQyzRSbtTSaacUrN5cudKrcRs9tOyvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767968178; a=rsa-sha256; cv=none; b=IirnYHK68B1wsZiTGZX8nXR2oX8diZ6lnCPodxfUnoUFGh9SgyDU0JBrpET1VMYXcda+zi W2oBEtKhrJZLeJ4BasxrRJwXceRPyuf1dhj9cO9rTRP85NcywSrnlud/UpBOOJb0PWH2/R UaQlbfpJMoUlfeeExQtfRSegOIO0WdFamAq8E7fVdFU2CvGiKLGVbOnBGxhdttGr4N3mod YBeEM9CId9YzeEvTMql6dJNuP2pyiva76j9iZDzw7D2kHkGWTFGOyoD32x0/Kg+FyYr9JM J5AmH2B3RaRkHCDcOnjqlanGe/6tmYjqLPoneLjYfUZOxpWq7v7vilQiz7RB8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnkN24fQqz1Qs3 for ; Fri, 09 Jan 2026 14:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d401 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 14:16:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 258ad800929b - main - cache: avoid hardcoded cache padding List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 258ad800929b397c79bd1fc8178e14bfec9ebe78 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 14:16:18 +0000 Message-Id: <69610db2.d401.3562f539@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=258ad800929b397c79bd1fc8178e14bfec9ebe78 commit 258ad800929b397c79bd1fc8178e14bfec9ebe78 Author: Brooks Davis AuthorDate: 2026-01-09 14:15:35 +0000 Commit: Brooks Davis CommitDate: 2026-01-09 14:15:35 +0000 cache: avoid hardcoded cache padding Replace CACHE_LARGE_PAD with rounding up to the alignment of struct namecache_ts. No functional change. Reviewed by: olce, markj Suggested by: jhb Effort: CHERI upstreaming Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D54553 --- sys/kern/vfs_cache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c5abc1c8b9b7..404234861710 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -420,10 +420,8 @@ TAILQ_HEAD(cache_freebatch, namecache); */ #ifdef __LP64__ #define CACHE_PATH_CUTOFF 45 -#define CACHE_LARGE_PAD 6 #else #define CACHE_PATH_CUTOFF 41 -#define CACHE_LARGE_PAD 2 #endif #define CACHE_ZONE_SMALL_SIZE \ @@ -431,7 +429,8 @@ TAILQ_HEAD(cache_freebatch, namecache); #define CACHE_ZONE_SMALL_TS_SIZE \ (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_SMALL_SIZE) #define CACHE_ZONE_LARGE_SIZE \ - (offsetof(struct namecache, nc_name) + NAME_MAX + 1 + CACHE_LARGE_PAD) + roundup2(offsetof(struct namecache, nc_name) + NAME_MAX + 1, \ + _Alignof(struct namecache_ts)) #define CACHE_ZONE_LARGE_TS_SIZE \ (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_LARGE_SIZE) From nobody Fri Jan 9 14:16:19 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnkN41FXzz62Z5q for ; Fri, 09 Jan 2026 14:16: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnkN3688rz3YLq for ; Fri, 09 Jan 2026 14:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767968179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hwkgqna13aRIyVut2UHj3ftutZvX040sbzjYUsC5qdU=; b=mEdbjfCvqQ+vZC4lBSrPEkHNhCQtWJaxujYjt1ExU2cewlH09ImD8BAgTt+WbyCWWQ7mOv CtKz9beZe/JO1SYxh+i1xCQcna5kzbEJfRYdRwj/xOpDg1r19hOBk3btjCJDmWF/Wfj1qh trH2/l7mnE4sBit81VbP2bUbQJ/RadAGyC0WjlmcEUx38cvfxrI77sMr6Dtfj7L/rVjVMr GXzCFhelVfM2n2QA30nFBrurZgNw4vtTywwLKEzkCqVsNJn8l0P4igQ+79rd5d+dqkMtWl Fhe+vEQkqqZmY0HfR3hTNuaS/WCzs9Eewvos5UAuyDKTD5ouV9THkYTa2sorjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767968179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hwkgqna13aRIyVut2UHj3ftutZvX040sbzjYUsC5qdU=; b=OHDJJQHEn2pQqbdszvnsFJ3dRwhITVTH1Sc1M3LDwhUp8+NiByap+CvvN8TRECjdyph0lg iuCHK7JKVNx+42jAS1zDk6j4ephPNrUjIDM3y49bWryqdWx14/syMPZDIX8bwbyb10oDtx ROeWKCkSRpgLK3k+laf6JiG7pJoUrqaTKDD0FNhdWNeH9CooiQr9R0q5kk9apRv6YztiZ6 uJMK48x8BFew/wKefsPea/7xcUzcVVuNtljx0H2v5HVd9AVa56m8iUNw9GWftBNIEsR5ZK JuXNJn8TBPAYruQJDYGjJtaU/2mezH4jjNwQTX88NWUjC2C7Kyc6dzZ/aNMjrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767968179; a=rsa-sha256; cv=none; b=CNvGxeMVSYaqC2E00pn7QJvDL1IphG0S9/df3TXPBL93HMQY69iKiOYF3S/mETxNAmvSCH ALD7Ou7256yfnVWryOQODLGaBZmSIhgnfBNID2r6qKn7lKjj82oPXSrmbpB4FQHWvWZWk9 Ic0zksneqQcMKluc4ferAIIP9x6ObcLvEr4J6CINni5DiCaAaoXQhXSN2J/sr3nc2ghcTu bew7E4tjlx5h3XI+5A8n2eSNOlPV8m3XYgP70DGmtib+wveuFY67VzNqpuX9DEUimrOyku MX9v6uIASrAlCMX2QfmzrTM6SVNXuW1Lvk/8NUtWTl10YsNFg8O2/Ab2BU7jXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnkN35TL1z1QRj for ; Fri, 09 Jan 2026 14:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d405 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 14:16:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1b425afa8d5f - main - cache: avoid hardcoded CACHE_PATH_CUTOFF List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b425afa8d5fb611b17f951e5099c177fd97ffea Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 14:16:19 +0000 Message-Id: <69610db3.d405.630e1315@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1b425afa8d5fb611b17f951e5099c177fd97ffea commit 1b425afa8d5fb611b17f951e5099c177fd97ffea Author: Brooks Davis AuthorDate: 2026-01-09 14:15:43 +0000 Commit: Brooks Davis CommitDate: 2026-01-09 14:15:43 +0000 cache: avoid hardcoded CACHE_PATH_CUTOFF Compute the cutoff at compile time instead which will avoid the need for a CHERI case. Correct the comment about CACHE_PATH_CUTOFF. It dates to 5.2.0 not 4.4 BSD. Historic values are: 32 - introduced (c2935410f6d5f) 35 - NUL terminated and bumped (5d5c174869104) 39 - sized to alignment (bb48255cf5eff) 45 - bumped to improve efficency on 64-bit (3862838921eb8) No functional change. Reviewed by: markj Suggested by: jhb Effort: CHERI upstreaming Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D54554 --- sys/kern/vfs_cache.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 404234861710..3f8591bd0ba7 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -406,31 +406,35 @@ TAILQ_HEAD(cache_freebatch, namecache); #define CACHE_ZONE_ALIGN_MASK UMA_ALIGNOF(struct namecache_ts) /* - * TODO: the initial value of CACHE_PATH_CUTOFF was inherited from the - * 4.4 BSD codebase. Later on struct namecache was tweaked to become - * smaller and the value was bumped to retain the total size, but it - * was never re-evaluated for suitability. A simple test counting - * lengths during package building shows that the value of 45 covers - * about 86% of all added entries, reaching 99% at 65. + * TODO: CACHE_PATH_CUTOFF was initially introduced with an arbitrary + * value of 32 in FreeBSD 5.2.0. It was bumped to 35 and the path was + * NUL terminated with the introduction of DTrace probes. Later, it was + * expanded to match the alignment allowing an increase to 39, but it + * was not re-evaluated for suitability. It was again bumped to 45 on + * 64-bit systems and 41 on 32-bit systems (the current values, now + * computed at compile time rather than hardcoded). A simple test + * counting lengths during package building in 2020 showed that the + * value of 45 covers about 86% of all added entries, reaching 99% + * at 65. * * Regardless of the above, use of dedicated zones instead of malloc may be * inducing additional waste. This may be hard to address as said zones are * tied to VFS SMR. Even if retaining them, the current split should be * re-evaluated. */ -#ifdef __LP64__ -#define CACHE_PATH_CUTOFF 45 -#else -#define CACHE_PATH_CUTOFF 41 -#endif +#define CACHE_PATH_CUTOFF_MIN 40 +#define CACHE_STRUCT_LEN(pathlen) \ + (offsetof(struct namecache, nc_name) + (pathlen) + 1) +#define CACHE_PATH_CUTOFF \ + (roundup2(CACHE_STRUCT_LEN(CACHE_PATH_CUTOFF_MIN), \ + _Alignof(struct namecache_ts)) - CACHE_STRUCT_LEN(0)) #define CACHE_ZONE_SMALL_SIZE \ - (offsetof(struct namecache, nc_name) + CACHE_PATH_CUTOFF + 1) + CACHE_STRUCT_LEN(CACHE_PATH_CUTOFF) #define CACHE_ZONE_SMALL_TS_SIZE \ (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_SMALL_SIZE) #define CACHE_ZONE_LARGE_SIZE \ - roundup2(offsetof(struct namecache, nc_name) + NAME_MAX + 1, \ - _Alignof(struct namecache_ts)) + roundup2(CACHE_STRUCT_LEN(NAME_MAX), _Alignof(struct namecache_ts)) #define CACHE_ZONE_LARGE_TS_SIZE \ (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_LARGE_SIZE) From nobody Fri Jan 9 14:42:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnkyZ66cyz62bg5 for ; Fri, 09 Jan 2026 14:42: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnkyZ5Bk2z3dLv for ; Fri, 09 Jan 2026 14:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767969766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k26SW5wUdglausJBRVi6e0rXeJ/44ny4yESJ98LYQsY=; b=ID2HhbeJiMOzyKtZZLvt5xhIPCHd0uO4AXN7QSN+sEfXMqEM5nu66e5wkfNALQG/ecy0bj LyTE+payRHRWuZDcyfTWj437GDfHfc3CbmMRXkEdFkjMq9+7fnvuShaE8o70N+dAhhq8RU FD5OnXGSfd6GJhl1SCydNu33AGRyYPNsAGtb721qsA+S318fqYakjSseiKMzjs5DWxn9ic yq4j2VSh/BZ+kvL+D6YNXcJAXMiihakIl4/Rd0b3FFh0wCEvosHiBsWeK/TmtLy3IQfd29 aloXVZ7aLl9e8tR2lwUKdAB9ybDzO+sIR54Fg7YDUmzxNAKxtWbSIYudoNTqLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767969766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k26SW5wUdglausJBRVi6e0rXeJ/44ny4yESJ98LYQsY=; b=DeNRolvWBHoWBJ02c+DsoaW7VEnEkQcMPaIk97V8n5rwasXjOoZxTHtUHiR26Fib5SQJSX mrAe4Df+k+OLRmNPfGdqQnv/QoJvIK4us47wSyd67OXYJbfThinWkOX9on00g9iqBcepio qJidjgojkCppRDTe1fd82MNMLpb4VP5tLWmoSkw9TZdQ1AVQuy0ONDmp1KISR1HmGW/t12 8uZu8aUNU9iRWiCDzjfecoA+P8blcCq5aTlZbiZLgjB+sVvUcYzY96BoZVOodVXI01B2nH KC8y88W4A5Yq6f2GbCymOMAn902pqATpozF4pTD6olEhSsUjQkU9ltNG0CqSVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767969766; a=rsa-sha256; cv=none; b=yxNZR8Ni9VUXLnxbZk80valqVQ7J9Q8pDOrog2UuIEXJYqwUmRqNoenroRi9nQSghX0p0U 1ZLt1ZRUYPvO1SWC5HeZXo62gpFhlN5arfE3f6erHG9A8yz/dKWvH/Vcf5V+SZCzYKAwtP C+e6HXxgQJpf1i68mZ/2WGfGSGjXfGojojrYvUTOrf+N3zMTYPhobtzUwkM1Lz0HCvd4Jd S+PJdJnWAMEQ7R93Vhza0ROWppXMAL7GPiGjpxIpcHiPEKFVTb6qyA5r23n3lU5AfsMeqY laCsI1FLVvY0F+5/jmEz+/iDXgWxBRrMpItI++sRARiFyq5VG+SXXsRVrJOu1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnkyZ4bnfz1Rqq for ; Fri, 09 Jan 2026 14:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f233 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 14:42:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 31e7dc6b9a00 - main - iflib: remove convoluted custom zeroing code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31e7dc6b9a000b02353bfc41cbd897533287cda2 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 14:42:46 +0000 Message-Id: <696113e6.f233.5c1a099f@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=31e7dc6b9a000b02353bfc41cbd897533287cda2 commit 31e7dc6b9a000b02353bfc41cbd897533287cda2 Author: Brooks Davis AuthorDate: 2026-01-09 14:19:49 +0000 Commit: Brooks Davis CommitDate: 2026-01-09 14:19:49 +0000 iflib: remove convoluted custom zeroing code Replace a collection of aliasing violations and ifdefs with memset (which now expands to __builtin_memset and should be quite reliably inlined.) The old code is hard to maintain as evidenced by the most recent change to if_pkt_info_t updating the defines, but not the zeroing code. Reviewed by: gallatin, erj Effort: CHERI upstreaming Sponsored by: Innovate UK Fixes: 43d7ee540efe ("iflib: support for transmit side nic KTLS offload") Differential Revision: https://reviews.freebsd.org/D54605 --- sys/net/iflib.c | 65 +++++---------------------------------------------------- 1 file changed, 5 insertions(+), 60 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index fcd847ab6f7a..5c37f199e84c 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -504,61 +504,6 @@ typedef struct if_rxsd { iflib_fl_t ifsd_fl; } *if_rxsd_t; -/* multiple of word size */ -#ifdef __LP64__ -#define PKT_INFO_SIZE 7 -#define RXD_INFO_SIZE 5 -#define PKT_TYPE uint64_t -#else -#define PKT_INFO_SIZE 12 -#define RXD_INFO_SIZE 8 -#define PKT_TYPE uint32_t -#endif -#define PKT_LOOP_BOUND ((PKT_INFO_SIZE / 3) * 3) -#define RXD_LOOP_BOUND ((RXD_INFO_SIZE / 4) * 4) - -typedef struct if_pkt_info_pad { - PKT_TYPE pkt_val[PKT_INFO_SIZE]; -} *if_pkt_info_pad_t; -typedef struct if_rxd_info_pad { - PKT_TYPE rxd_val[RXD_INFO_SIZE]; -} *if_rxd_info_pad_t; - -CTASSERT(sizeof(struct if_pkt_info_pad) == sizeof(struct if_pkt_info)); -CTASSERT(sizeof(struct if_rxd_info_pad) == sizeof(struct if_rxd_info)); - -static inline void -pkt_info_zero(if_pkt_info_t pi) -{ - if_pkt_info_pad_t pi_pad; - - pi_pad = (if_pkt_info_pad_t)pi; - pi_pad->pkt_val[0] = 0; pi_pad->pkt_val[1] = 0; pi_pad->pkt_val[2] = 0; - pi_pad->pkt_val[3] = 0; pi_pad->pkt_val[4] = 0; pi_pad->pkt_val[5] = 0; -#ifndef __LP64__ - pi_pad->pkt_val[6] = 0; pi_pad->pkt_val[7] = 0; pi_pad->pkt_val[8] = 0; - pi_pad->pkt_val[9] = 0; pi_pad->pkt_val[10] = 0; -#endif -} - -static inline void -rxd_info_zero(if_rxd_info_t ri) -{ - if_rxd_info_pad_t ri_pad; - int i; - - ri_pad = (if_rxd_info_pad_t)ri; - for (i = 0; i < RXD_LOOP_BOUND; i += 4) { - ri_pad->rxd_val[i] = 0; - ri_pad->rxd_val[i + 1] = 0; - ri_pad->rxd_val[i + 2] = 0; - ri_pad->rxd_val[i + 3] = 0; - } -#ifdef __LP64__ - ri_pad->rxd_val[RXD_INFO_SIZE - 1] = 0; -#endif -} - /* * Only allow a single packet to take up most 1/nth of the tx ring */ @@ -1068,7 +1013,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int flags) if (nm_i != head) { /* we have new packets to send */ uint32_t pkt_len = 0, seg_idx = 0; int nic_i_start = -1, flags = 0; - pkt_info_zero(&pi); + memset(&pi, 0, sizeof(pi)); pi.ipi_segs = txq->ift_segs; pi.ipi_qsidx = kring->ring_id; nic_i = netmap_idx_k2n(kring, nm_i); @@ -1261,7 +1206,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int flags) nm_i = netmap_idx_n2k(kring, nic_i); MPASS(nm_i == kring->nr_hwtail); for (n = 0; avail > 0 && nm_i != hwtail_lim; n++, avail--) { - rxd_info_zero(&ri); + memset(&ri, 0, sizeof(ri)); ri.iri_frags = rxq->ifr_frags; ri.iri_qsidx = kring->ring_id; ri.iri_ifp = ctx->ifc_ifp; @@ -2998,7 +2943,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) /* * Reset client set fields to their default values */ - rxd_info_zero(&ri); + memset(&ri, 0, sizeof(ri)); ri.iri_qsidx = rxq->ifr_id; ri.iri_cidx = *cidxp; ri.iri_ifp = ifp; @@ -3580,7 +3525,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) } m_head = *m_headp; - pkt_info_zero(&pi); + memset(&pi, 0, sizeof(pi)); pi.ipi_mflags = (m_head->m_flags & (M_VLANTAG | M_BCAST | M_MCAST)); pi.ipi_pidx = pidx; pi.ipi_qsidx = txq->ift_id; @@ -4256,7 +4201,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) if (ctx->isc_txq_select_v2) { struct if_pkt_info pi; uint64_t early_pullups = 0; - pkt_info_zero(&pi); + memset(&pi, 0, sizeof(pi)); err = iflib_parse_header_partial(&pi, &m, &early_pullups); if (__predict_false(err != 0)) { From nobody Fri Jan 9 14:42:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnkyb72Tfz62bVR for ; Fri, 09 Jan 2026 14:42: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnkyb5S6Gz3clT for ; Fri, 09 Jan 2026 14:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767969767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3grexg6j0gs42vaLGYmW2aGXq+Kwic60zlRxYroNSg=; b=nadwrEFo64o4H4tHAkuuLe7+KxyKX39NswKpepiJkDbE4iBrOEhFFtq4qEHgN5N3Zw+vRp B+/qlRJ7LGpqfIcyG1rsQC8jiKpZFUpArC/oUhSppGDTq+gPwch1ErCb9fSSGaUpm8ZV7j llq0yXK0Nlyp9zGnT3yU+HUdZ7YqueYiBeNr4Mq5UPHTeYLX7sYjf/CNwyesU6Vr/7YWDO EC6qp024D74lB9wBgUlqvQJ+VjBhNrsro7nQmK9bvXxIRGZIzN1F4o0+gx9O9elG/p/tdD 8++Px/W08iwCY+Lg9Rp70CZ8GgOhM8yXUnjW1msF/Cypau45H1WU/DdOfCmCFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767969767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3grexg6j0gs42vaLGYmW2aGXq+Kwic60zlRxYroNSg=; b=mflOrz/N2P/pTHL95OjLF3DeJGwWVjxZB44G8E6m6FCy6emv50OdT2qDuyybBzMz/n8WdH YsSeURuwvky7zx02/aAOIW57HYzi8YJzWqlnZrItkBu3tlDSGOv/wxwU4bXy7fOx5amRHd RJhdMEa9EOWQ1KG/GHK9ksxxx0Apl9DONv4tFaGw1E8Im00l34bKMOybvs1IphuzG49by2 KkSFiqiMczfrX+thoqj/L8SgJvQyl57OjB/Ar4sYDO+olv4MotVU0QpWB2GDpwgdQ3su1G uH/LHqcVXwDx3owV66xxB1qPwt9Skb8UeI8BXcrqgUE1n5qAKbxU5yzh0JNciA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767969767; a=rsa-sha256; cv=none; b=d0l26427xZ2n9lqA4Zx6P0HhylkonyrwdLmaA3JHy1pmP9vcOZFqpcyPMIz7udA9zn4UKc 7Na4lkll9QBxyAr6C8izRwaCEzDlZiJq0QxOyKUho9c8hINmDmxpkNYbhK+U49WDTIScDA 06XyVu4RSNmvAJoBb2mTXpx/BGMsibLbVBZSC1riXTMsQAaUuAsNXybiujFnVqqoNWxtX5 nV4SEM845DB0kf4jVM+jVZOxvkFMZWGjKbWErUVyLeOlXnY3+JmCW6A/N6s41cjiJqXw1n INwYsMTRG2e8TMBsKtFJVHSojfSS2tUM5xmz8zYLgiagsiIYNOdtDH8tkabWgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnkyb53Ylz1RbJ for ; Fri, 09 Jan 2026 14:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e5b9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 14:42:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 0a64d16cef17 - main - sys/_types.h: avoid use of __has_feature() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a64d16cef172bd3c809a8dc9035cd7d981b2951 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 14:42:47 +0000 Message-Id: <696113e7.e5b9.76306219@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0a64d16cef172bd3c809a8dc9035cd7d981b2951 commit 0a64d16cef172bd3c809a8dc9035cd7d981b2951 Author: Brooks Davis AuthorDate: 2026-01-09 14:41:21 +0000 Commit: Brooks Davis CommitDate: 2026-01-09 14:42:00 +0000 sys/_types.h: avoid use of __has_feature() Only fairly recent GCC versions support and sys/_types.h must work with quite old compilers and without sys/cdef.h being included. The prior workaround works fine, but we can have the same effect with compiler macro definitions. In this specific case, compilers that define the __intcap_t builtin type will define __SIZEOF_INTCAP__. This reverts commit 029a09f18032353a9ae874590b879322efc6e53a This reverts commit 19728f31ae421f40e2b0b0c775f4eedd7f927be0 Reviewed by: imp, des, kib, emaste Effort: CHERI upstreaming Fixes: 85ab981a8e4e ("sys/_types.h: define fallback __(u)intcap_t") Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D54009 --- sys/sys/_types.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 2e622090e81d..a2ee83a862da 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -161,10 +161,7 @@ typedef int __cpulevel_t; /* level parameter for cpuset. */ typedef int __cpusetid_t; /* cpuset identifier. */ typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ -#ifndef __has_feature -#define __has_feature(x) 0 -#endif -#if !__has_feature(capabilities) +#ifndef __SIZEOF_INTCAP__ /* * On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so that * hybrid-C code which needs to be explicitly aware of capabilities can From nobody Fri Jan 9 14:47:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnl461m8Rz62c6j; Fri, 09 Jan 2026 14:47:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnl451s7Tz3f8V; Fri, 09 Jan 2026 14:47:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 609ElF8T007527; Fri, 9 Jan 2026 16:47:18 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 609ElF8T007527 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 609ElFSg007526; Fri, 9 Jan 2026 16:47:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 9 Jan 2026 16:47:15 +0200 From: Konstantin Belousov To: Aymeric Wibo Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: eeaa865edba6 - main - acpi: Fix setting sleep state sysctls to NONE Message-ID: References: <6929b55d.2b59a.8a970bd@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6929b55d.2b59a.8a970bd@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: / X-Spamd-Result: default: False [0.98 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[0.996]; NEURAL_HAM_LONG(-0.97)[-0.968]; NEURAL_SPAM_SHORT(0.95)[0.949]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_TLS_LAST(0.00)[]; HAS_XAW(0.00)[] X-Rspamd-Queue-Id: 4dnl451s7Tz3f8V On Fri, Nov 28, 2025 at 02:44:45PM +0000, Aymeric Wibo wrote: > The branch main has been updated by obiwac: > > URL: https://cgit.FreeBSD.org/src/commit/?id=eeaa865edba685545ac22c378b35552e09bf1b41 > > commit eeaa865edba685545ac22c378b35552e09bf1b41 > Author: Aymeric Wibo > AuthorDate: 2025-11-25 19:34:34 +0000 > Commit: Aymeric Wibo > CommitDate: 2025-11-28 14:42:54 +0000 > > acpi: Fix setting sleep state sysctls to NONE > > This restores the functionality as it was pre-97d152698f48. > > A stopgap was committed by glebius@ in 34dfccc64f47 ("acpi: in > acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()"). > > PR: 290651 > Reviewed by: thj, emaste > Approved by: thj > Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h") > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D53909 > --- > sys/dev/acpica/acpi.c | 39 ++++++++++++++++++++++++--------------- > 1 file changed, 24 insertions(+), 15 deletions(-) > > diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c > index e3ff4f6937d2..99dd817f9158 100644 > --- a/sys/dev/acpica/acpi.c > +++ b/sys/dev/acpica/acpi.c > @@ -4318,13 +4318,15 @@ acpi_sname_to_sstate(const char *sname) > { > int sstate; > > + if (strcasecmp(sname, "NONE") == 0) > + return (ACPI_STATE_UNKNOWN); > + > if (toupper(sname[0]) == 'S') { > sstate = sname[1] - '0'; > if (sstate >= ACPI_STATE_S0 && sstate <= ACPI_STATE_S5 && > sname[2] == '\0') > return (sstate); > - } else if (strcasecmp(sname, "NONE") == 0) > - return (ACPI_STATE_UNKNOWN); > + } > return (-1); > } > > @@ -4379,8 +4381,10 @@ acpi_suspend_state_sysctl(SYSCTL_HANDLER_ARGS) > if (new_sstate < 0) > return (EINVAL); > new_stype = acpi_sstate_to_stype(new_sstate); > - if (acpi_supported_stypes[new_stype] == false) > + if (new_sstate != ACPI_STATE_UNKNOWN && > + acpi_supported_stypes[new_stype] == false) > return (EOPNOTSUPP); > + > if (new_stype != old_stype) > power_suspend_stype = new_stype; > return (err); > @@ -4423,21 +4427,26 @@ acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) > if (err != 0 || req->newptr == NULL) > return (err); > > - new_stype = power_name_to_stype(name); > - if (new_stype == POWER_STYPE_UNKNOWN) { > - sstate = acpi_sname_to_sstate(name); > - if (sstate < 0) > - return (EINVAL); > - printf("warning: this sysctl expects a sleep type, but an ACPI S-state has " > - "been passed to it. This functionality is deprecated; see acpi(4).\n"); > - if (sstate < ACPI_S_STATE_COUNT && > - !acpi_supported_sstates[sstate]) > + if (strcasecmp(name, "NONE") == 0) { > + new_stype = POWER_STYPE_UNKNOWN; > + } else { > + new_stype = power_name_to_stype(name); > + if (new_stype == POWER_STYPE_UNKNOWN) { > + sstate = acpi_sname_to_sstate(name); > + if (sstate < 0) > + return (EINVAL); > + printf("warning: this sysctl expects a sleep type, but an ACPI " > + "S-state has been passed to it. This functionality is " > + "deprecated; see acpi(4).\n"); Can we please avoid spending kernel memory for lecturing users? This is man page material. Also, if you want some specifics from the EINVAL to be presented to users, perhaps utilize exterror(9), with a terse description. > + MPASS(sstate < ACPI_S_STATE_COUNT); > + if (acpi_supported_sstates[sstate] == false) > + return (EOPNOTSUPP); > + new_stype = acpi_sstate_to_stype(sstate); > + } > + if (acpi_supported_stypes[new_stype] == false) > return (EOPNOTSUPP); > - new_stype = acpi_sstate_to_stype(sstate); > } > > - if (acpi_supported_stypes[new_stype] == false) > - return (EOPNOTSUPP); > if (new_stype != old_stype) > *(enum power_stype *)oidp->oid_arg1 = new_stype; > return (0); From nobody Fri Jan 9 15:35:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnm7M47nhz62gHy for ; Fri, 09 Jan 2026 15:35:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-21.consmr.mail.gq1.yahoo.com (sonic301-21.consmr.mail.gq1.yahoo.com [98.137.64.147]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnm7L6N4Mz3kHk for ; Fri, 09 Jan 2026 15:35:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1767972919; bh=Px6e2HH3RTBQX1zCxLBBxzll4820cx8pUG1iwntZGWI=; h=Date:Subject:To:References:From:In-Reply-To:From:Subject:Reply-To; b=RQs4J/v/a88fZ6RBj3tv1QIm2bqAsVYnEjOj3G4UaObjunRzuf6A/mHINqd5v0Wr2B0bwLjN3bNDhjs65pjvE9PrjXdTdvHkldHscfeSJ07P4ou8FTPwknub7dOwr8y4P4he1wwa73euBJOsju00DoHbs0VqIBmUWvqXIYBR5Tin0Vu/336CbCIZF5WMOsPW17iTIoCdC3Im1i3ZY66+cwqj3vwc95VnLosMKfqP0ve5QiXifXEGUDTy47R3uiJ0jvbaBFU1xk4GIYHoLZYjnGKFpJiLC5a7G/CHnuE8tAPZymcvjOv+5CnVscPMuMkdHeIIJ2TAX4b82dp5ymQGkA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1767972919; bh=ImzphqPjNHbvpytKbPlr88Ct/ryyaWepGPLgxo9gb80=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=AOB67xJ8YeMfC7zN4j7EY2QP7YD9h5DRShMGO8QIqYm4JkIqL95RIzF/DxKbj4FRsWMOOGNi7tr/2O83uJdYJGTBEeWtqeLHxGsHe2PvGKeVDBx0WOlxkSymAZKY5seEQEUTSC/24L85MRIlMy5VxRfLJruLag4oq0EiLQuyt7ThEWboGZENaTeHVPRqryGAXLGfwg89VDQ49FbVj2Oi2QB9t+O8iupTNB6JR8C/a5eBo8cKPAKG6/JCa8DeynRg1BceKc9a7bebaUFlJqDUGBKC9wcHTfOl+LCrOocoyoOdDH8beh+NTIf3HtXc6H34U9LOVO1UuGtoGjqXeWax5g== X-YMail-OSG: IFwx_IEVM1lmUJ8OxbgvH0gpHiIDZgKyRgFg2UCzQbP4gqyvDRLXTI8XiTa0q0l kz2lQSafVSZ_cDcY_Yo5P3iiI9HlP..Xzk66Qm8WiooGKLYRC.iFkFs9PwTOKO3s7MPVbOcXlRJ_ bQtN0TZjNFtpaFobW5mqhbxwh_uNiqPrE9Of2P6OIfCD_ZgOS7zaN918EjDNYJPc4Y1OO_171npo jSixIC55uITWha5qKIdAizMfstSBXIMig3fmIIvTFTz0__9jo0UZFBlCuJNNHNlO9oTIbTUaYgxZ KHEYoHay21JfLDpefIkhgE7D.f5BhnNbtACBP0a9uVIhsJYBx8wFpYQt2MKe1d0atTFl02wdDLl5 Bda1SS6Qup2Qs_RD4re3IBKiF56OO._1W1mQ.MlWrV2L9PRjdPl5z23oaght5DSl02xs6Ov1uPrd yFkrgrBHuOwEJReMlCOyJlnFSpfQBpvKfaRv6b36TIvlfCQHabERaKweM7JmSiUtwy2KgVedDEql IfAJevgeY_rwU.hQtioVUKP5AVurRhz5hcOC7uqYbJfaR1AaEJJe4Q0obhfWbw4Rkdk13Ddz6Msv JxdwePq08wC2CKQXdZBCWwTyHVy8skaD01LsjGUDueeN2Zh8ngRA0j6x7VY5dfxBI7.MmTfwqHXZ w.vg.fCC8xbKGSJfxMNhhrypSnl23MRwXC0aE7FmiTzg2LZfH5NAoQGJlBda0ouZIPGp3D98D3Ui 7ZTzJxcUPBpr3OaGTtzOI.S2XcQS3AtjO2w8QQ.KhwxLZ5SalH_TTkWMj9z9DEwW3SWn.7LABJ7P lpiCW1LCTpYBITauiUy_Xmk1ZvmNI232_1C.E.4oB0nlyEnXXDd_Z4._YmrNBZgrdEl_qmcsrPdx kw_h.DWXVbBds3HVP2wDHhLMvEfOM12FmxcbnB9JNA5d4JDBxwSgSDxhrf_IyOYzgvoNAmz.FjOq Dya6Rc1Mu5VGsi.v6gG9brODuZYxhhZ910YqNyHtmMAiwkXUXxxVNaOT.XI9pp_qKpWOF_Wbw3qi Ikw5MrFSIIskd0bIgbCbQJY3HuUyPcPGBEymBgNyQdTL2PPymD.2cL8DKcgvxgHRtNsbOFQzcIsh n1P.QpbIVRIpEAGnQlY5RzA_SjEke_5WjSQooJNsqZbO5Fb.zSg0PbpEr7hxvgtqru6TSARmo4xc lKJN_pTjUTa.pfLYeGMujvSYeWcHBRheuQOfHaaKtENn3iC6K5kbVnBoaLQ1Iq87IWKw7oI7ILPa XqvVl.ubm5oSppn_5cQ.YPP8H.LjajyUwDpQL_nFcpp3LQoEfoVS1EyKAdfDyXgHI7uzhINvX.Hq _gZNzPkyBPTogD.FuCPpE5XMY8Jk_yjVh6zZCOmWvLC6l.2l4oLQ74T1AbWrx9kcjEBsFyw3Mmhc rbxmMvFUd9N7cpBocgonO1EqhztnOygloYthVI_x69E655E6rbEvxRgkHka_51Peeyv3Qvlhzo2g YXu5IfA82bi8K3TnQRgleIwCkiJtgRNqdfpaUeMcCFXRGZOQvknqwaONy6AaeH._9xeP4Ubhfw5P A0jOj0pZ9eRobvg_WvN5f8OX0MPRnZDRYqETbYGQ.iNSlyMVKxbzq05uQ7OVSXvynULJDxf4jnvz iGeims8AxBry3DaHitsqOR2mjCA1n9YvqghQLEfvI6os4WYEkkpVmX3OF8TDRxe42yoI4_ht8Dlc i4SDNNrmyeYPXSgjq4B3OYgHXCHRCyQSBZnhjL64n5pivXlNG5UCwfmujdMcQPAR5_I6nduJRLy1 1U_beL.jv4qPLLSMrzIZh2.EckJhF4LoGZUrw9nvEkVFU9j0YrI_NrLiaOmOX2ljMpdnhMz4OeW8 V.nl2rFvMrDSJdEYYbM4LCbjyb3bJ.2qiNLhPSliUqtaN6hebumE4qToSA5nlblIm8kzAillOhKN w8MLrKID_TAsJp3KLs4jZOFi0yvv_yHReM4S.ZNN2sZ0JQV2oAd7OyvAT7HiCBG3XqHahYauoZkB cnolKASSu2pT2Xl2wO5AnKL72OkRhxoa6pbQHvlVGHtMsJa1iHFIlgUkXmoZLYSCwWIqM26vdw8p _xtH4AzMY5bToVQyfclC6j0o76yB84uzHP18LvsXGHEpyQ4_rjBEVehodCfo2LtOfcO3YPmqSKqp yRGluxRaSUN8xE.HszWrQQC4VueAiUrxrav7GQYELDhPsgivQNFlnLLnhafprmrDPjlxWt5MQH6m AIo489vytnDMcG080SryNUE2FIbe3MN7w75OtpNiaNQL3XiyBKcnNi.fHRRLFRaf03c7JjfQV6W8 HPM0tDqSw1RNIs3t8h2vE X-Sonic-MF: X-Sonic-ID: bc695591-3902-493a-9a1c-1924d63f8e45 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Fri, 9 Jan 2026 15:35:19 +0000 Received: by hermes--production-gq1-86969b76cd-9v8tf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4750e41ab2797c6ffc99e160fff3665c; Fri, 09 Jan 2026 15:35:17 +0000 (UTC) Message-ID: <36317da5-57d9-412a-97c4-d95636b06442@yahoo.com> Date: Fri, 9 Jan 2026 07:35:16 -0800 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: a6d57f312f18 - main - nfsd: Fix handling of hidden/system during Open/Create To: Rick Macklem , dev-commits-src-main@FreeBSD.org Newsgroups: gmane.os.freebsd.current.scm References: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> Content-Language: en-US From: Mark Millard In-Reply-To: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.24866 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dnm7L6N4Mz3kHk On 1/8/26 16:33, Rick Macklem wrote: > The branch main has been updated by rmacklem: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a6d57f312f18bbeeda8a34e99d0a662b0db9a190 > > commit a6d57f312f18bbeeda8a34e99d0a662b0db9a190 > Author: Rick Macklem > AuthorDate: 2026-01-08 16:27:32 +0000 > Commit: Rick Macklem > CommitDate: 2026-01-08 16:27:32 +0000 > > . . . > > FYI: The AuthorDate and CommitDate are way off compared to the proceeding and following series of commits by others. https://cgit.freebsd.org/src/log/ shows: . . . (one 10 hour and four 9 hour ones) . . . Warner Losh 10 hours (CommitDate: 2026-01-09 04:42:34 +0000) Rick Macklem 23 hours (CommitDate: 2026-01-08 16:27:32 +0000) Mark Johnston 16 hours (CommitDate: 2026-01-08 23:29:06 +0000) . . . (three 17 hours ones) . . . This allowed me to learn what my new use of news.gmane.io for list monitoring and posting does when such happens. It did not use your timestamps to order things and did not display your timestamps in Date or in Received. The sequencing presented looks correct. -- === Mark Millard marklmi at yahoo.com From nobody Fri Jan 9 16:30:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnnLk3ccNz62k7j for ; Fri, 09 Jan 2026 16:30: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnnLk36jhz3rDR for ; Fri, 09 Jan 2026 16:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tcErs0iEOI8dozY9rTKbOPsUrie0jRikJUQK0oULT/Y=; b=k5NrUj/xdcyefH9ccYlZIhTSpMdUaUUf1tccWdyG6ORKP7ir1nfPka5cM7UhS+3vFk+3Ze 9cggBn/qXnL6H4cPnWCT/hkQYlNNNNPyZfa3dnz7/Gmx2uXE0lgZiRvyaZDYJgYghB5/jO hzPyA9Id1S5rSqVLV1t2e1MElDxhDsSDK5oWQSxNNxq7rqkpeLGtIvWUML6qy3Tcp9X+Lk v+1w6ijThjj4b4+hvrAHCpZB/3U03kfRKgL/ftAswXP34FngChqanHygpSsgDRZ3E1EgXF b57a7Sdhtkq9Ktadm7AishNBYlgMuYE6FOlJ8LJWiZT4N2lpg5dNMqMyH2Ntsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tcErs0iEOI8dozY9rTKbOPsUrie0jRikJUQK0oULT/Y=; b=VhRZgLEhxXOa/BF1J+v5n9ALwLbNvFRjjSQDJjxRyuAAPxDggExZQWYExhBz4Z5c/65dIo ChfVzgnGNiqe4FW4cnyafHIpSNVoXp2aYxE8kyaljBDljrAH9YJxV5SHTU02kp3ZfGkqQx jbieCktLtD3R7T0hOavrYTE2X4NwB6EDZvajGSz/vbpzgRtpCn21QWco8avlbBcRaV+W6H fpW+900PbOLPUSSezE55rftDMZILG/cgJv3TognY06pr04NBDKLOgVIhgtZumyyXst5QDI uczP6cXdjxcyoPhRjJ4jzea/XXA3g6ysPzd1nL1ep+BuF4qtGT8M4++Ht0hYZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767976222; a=rsa-sha256; cv=none; b=jDkg6PTIMLCPXhKBJXNBycKsQydC3iuFW7NXSXyDbQl2X3ah7TqvPjTTjk/sr8GzdoLrJa nZRs98oCyeH+8VvLff1qxzZ4to/lU7ljpuzSr0QcW329OE3814mBslNExJaOxGElmRYWjA hmSIGtxCOjGlTsqBLYkusz2h9zfQuoNwTM0llfxWQ4iXuyjs4kmYzlfAUwoafIH6ljQ1Zy WrgA6VO6QcZttk3aOionCKlxa0E33cUrgLeMaqALmwug8wY6rLhwwihrwRoER6BHfjcOcN +rmGyk/x6CPyInre+6PoZpLPBUDQzTIQ++5YZvf5xjKLFy7os8o+jRhaIgs75A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnnLk255Fz1pH for ; Fri, 09 Jan 2026 16:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32166 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 16:30:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: 0f937f171a8d - main - tools: remove powerpcspe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f937f171a8da9fa8cbbd060632e271e150c3acd Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 16:30:22 +0000 Message-Id: <69612d1e.32166.7fc74f2d@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0f937f171a8da9fa8cbbd060632e271e150c3acd commit 0f937f171a8da9fa8cbbd060632e271e150c3acd Author: Minsoo Choo AuthorDate: 2025-12-03 03:51:59 +0000 Commit: Ed Maste CommitDate: 2026-01-09 16:28:33 +0000 tools: remove powerpcspe As reported on the freebsd-announce mailing list[1] FreeBSD is continuing to retire 32-bit support. Remove powerpcspe from boot test tools. [1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html Signed-off-by: Minsoo Choo Reviewed by: jhibbits, emaste Pull request: 698d3c98d8f5814f705908d5bc6d930e3d4c4eda --- tools/boot/full-test.sh | 2 +- tools/boot/universe.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/boot/full-test.sh b/tools/boot/full-test.sh index 1160861316dc..65d59ba58784 100644 --- a/tools/boot/full-test.sh +++ b/tools/boot/full-test.sh @@ -77,7 +77,7 @@ MTREE=$(SHELL="which mtree" ${MAKE} ${DEFARCH} buildenv | tail -1) || die "No mt # All the architectures under test # Note: we can't yet do armv7 because we don't have a good iso for it and would # need root to extract the files. -#ARCHES="amd64:amd64 i386:i386 powerpc:powerpc powerpc:powerpc64 powerpc:powerpc64le powerpc:powerpcspe arm64:aarch64 riscv:riscv64" +#ARCHES="amd64:amd64 i386:i386 powerpc:powerpc powerpc:powerpc64 powerpc:powerpc64le arm64:aarch64 riscv:riscv64" ARCHES="amd64:amd64 arm64:aarch64" # The smallest FAT32 filesystem is 33292 KB diff --git a/tools/boot/universe.sh b/tools/boot/universe.sh index 80a9cc0b90ff..fc47ac52fed4 100755 --- a/tools/boot/universe.sh +++ b/tools/boot/universe.sh @@ -1,9 +1,5 @@ #!/bin/sh -# -# Full list of all arches we don't build. -# -# powerpc/powerpcspe # # This script is expected to be run in stand (though you could run it anywhere # in the tree). It does a full clean build. For stand you can do all the archs in From nobody Fri Jan 9 16:30:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnnLl4j6Rz62k7k for ; Fri, 09 Jan 2026 16:30: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnnLl3Cyjz3r2C for ; Fri, 09 Jan 2026 16:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V1runSfYYueCBAMrQuAHKSqGluLYky7O12Oq9d2Mfec=; b=o5eXlzlqr/5GxVGz7/rxQJcriZ0uMg+5VYJOV6momYYO2XphRQgq5A5kcEU+ndZFBNRovv ChBmoMtyX11bAQ4gr2AcHoaYktZC1VwOwF4S2dB6Ue0XD5JzivFVJGLCLLvbuVZ2j8tEF4 YDnZwdjr/Ssh12iwgp9Li6PLSHmJ5kou+IEyjjTgIxJ8KHqXbalyXz3e8wHDpNzgAyD3pu HWkBPss94ATwyIpRAx0eNfV8uL2/iY0EkWUVV4jjo2oArHcFl53OLl7Ir91MJP5IrjnEJd mSom+KGl3p71euyPfTJWuG64qKbJGU4KPRmKtMf2aF3WMtryuPQYr13xEz1hFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V1runSfYYueCBAMrQuAHKSqGluLYky7O12Oq9d2Mfec=; b=P8IIpKPuBcq4NOw8qtxpjVJpI8UPFjTyqUMhdk6UVSmFioU1HdePpUCj73IcDVxU/IM26V jQkvkRfV8yi38bOcrbYOLiQGfU8A3MiUHN2HCVbMeE8esPY4nXO4shXtRu0LJZqAKK8GY/ VbJfwArF/jAy+AWQKXJTvIfUsad3MMqE+HBHh/x1t8yIGfDUnVPOlTVcU1/w2fIKhaxwJy 229CyNN69xTsG0eCWKswuoZMW9ohfilEOS79yrkNQQgH1Hmkgq/XNE7GVa34nK8uVBpVwW KftxGHjR8vExGKPhzKWA4wpBBTPR3wwW9gZru5IjsE6bb9yAdpIV6SQBj1h8Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767976223; a=rsa-sha256; cv=none; b=kSu08RB2xtaLeoZsD/OIuqxKs7kmsNEFnwpxWOO5GpJnpkd0f1ZiBHGIwhMS5xLNcCpy7N 3GZB+xQitmUd0ob2JQmFr3Dw0euK9naSHsmZUhqLLmxjTwN01OMDaH3hpWOE86NRZiKzn8 scayB0Dm4gxw1NFQ5E6Qu6J83tREIa13x5ttHR8p1R8EYwj+AWKWhmncXImfCgiBwjTmWC KqiAIhs64frHTd2zMRMQYATPHLZ1URimpiASAR5s6pCboLSCobgLtv7HzmSu+85+ZPPsCa AYw1tFeuqU17jMYoiXwxdGi1+5nwt+7z4LGWqEEiQ4+MLiSeVdtcK1vTiUbwjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnnLl2Kcwz1k3 for ; Fri, 09 Jan 2026 16:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32c68 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 16:30:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: 94d1731e73cc - main - Makefile*: remove powerpcspe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94d1731e73ccb97df5fc5928bb584cabb8e37f1f Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 16:30:23 +0000 Message-Id: <69612d1f.32c68.ee1d69@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=94d1731e73ccb97df5fc5928bb584cabb8e37f1f commit 94d1731e73ccb97df5fc5928bb584cabb8e37f1f Author: Minsoo Choo AuthorDate: 2025-12-03 03:57:23 +0000 Commit: Ed Maste CommitDate: 2026-01-09 16:28:43 +0000 Makefile*: remove powerpcspe As reported on the freebsd-announce mailing list[1] FreeBSD is continuing to retire 32-bit support. Remove powerpcspe from build infrastructure. [1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html Signed-off-by: Minsoo Choo Reviewed by: jhibbits, emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1914 --- Makefile | 2 +- Makefile.inc1 | 2 -- cddl/lib/libzpool/Makefile | 2 +- include/Makefile | 2 +- libexec/rtld-elf/rtld-libc/Makefile.inc | 2 +- share/mk/bsd.cpu.mk | 7 +------ share/mk/bsd.endian.mk | 3 +-- share/mk/bsd.opts.mk | 3 +-- stand/defs.mk | 5 ----- sys/conf/Makefile.powerpc | 5 ----- sys/conf/kern.mk | 5 ----- sys/conf/kern.pre.mk | 2 +- sys/modules/Makefile | 8 +++----- sys/modules/zfs/Makefile | 4 ++-- tests/sys/kern/Makefile | 3 +-- usr.sbin/Makefile.powerpc | 2 -- 16 files changed, 14 insertions(+), 43 deletions(-) diff --git a/Makefile b/Makefile index da4bac4673fa..ac0a9218e88f 100644 --- a/Makefile +++ b/Makefile @@ -537,7 +537,7 @@ packages update-packages: .PHONY # Don't build rarely used, semi-supported architectures unless requested. # .if defined(EXTRA_TARGETS) -EXTRA_ARCHES_powerpc= powerpc powerpcspe +EXTRA_ARCHES_powerpc= powerpc .endif TARGETS?= ${TARGET_MACHINE_LIST} _UNIVERSE_TARGETS= ${TARGETS} diff --git a/Makefile.inc1 b/Makefile.inc1 index 8b920c1dc571..03097d2d5209 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -151,7 +151,6 @@ KNOWN_ARCHES?= aarch64/arm64 \ powerpc \ powerpc64/powerpc \ powerpc64le/powerpc \ - powerpcspe/powerpc \ riscv64/riscv .if ${TARGET} == ${TARGET_ARCH} @@ -1705,7 +1704,6 @@ KERNCONF=${KERNFAST} .endif GENERIC_KERNCONF_SUFX_powerpc64= 64 GENERIC_KERNCONF_SUFX_powerpc64le= 64LE -GENERIC_KERNCONF_powerpcspe= MPC85XXSPE GENERIC_KERNCONF?= ${GENERIC_KERNCONF_${TARGET_ARCH}:UGENERIC${GENERIC_KERNCONF_SUFX_${TARGET_ARCH}}} INSTKERNNAME?= kernel diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 80fec2eb3fb1..ade864790f1c 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -21,7 +21,7 @@ ACFLAGS+= -Wa,--noexecstack ATOMIC_SRCS= opensolaris_atomic.c .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" +.if ${MACHINE_ARCH} == "powerpc" # Don't waste GOT entries on small data. PICFLAG= -fPIC .endif diff --git a/include/Makefile b/include/Makefile index 028e5055cc91..777529e344f2 100644 --- a/include/Makefile +++ b/include/Makefile @@ -318,7 +318,7 @@ LSUBDIRS+= dev/vmm .endif .endif -.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpcspe" +.if ${MACHINE_CPUARCH} == "powerpc" _dev_powermac_nvram= dev/powermac_nvram .endif diff --git a/libexec/rtld-elf/rtld-libc/Makefile.inc b/libexec/rtld-elf/rtld-libc/Makefile.inc index a10bd562a7ce..6cc33777f78f 100644 --- a/libexec/rtld-elf/rtld-libc/Makefile.inc +++ b/libexec/rtld-elf/rtld-libc/Makefile.inc @@ -69,7 +69,7 @@ _libc_other_objects+=aeabi_unwind_cpp .elif ${LIBC_ARCH} == "i386" # i386 needs i386_set_gsbase for allocate_initial_tls() _libsys_other_objects+=i386_set_gsbase -.elif ${LIBC_ARCH} == "powerpc" || ${LIBC_ARCH} == "powerpcspe" +.elif ${LIBC_ARCH} == "powerpc" # ppc needs __syncicache and abs for reloc.c _libc_other_objects+=syncicache abs .elif ${LIBC_ARCH} == "powerpc64" diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 79268139bb2c..33587b6ba25a 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -323,15 +323,10 @@ CFLAGS += -mfloat-abi=softfp . endif .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" +.if ${MACHINE_ARCH} == "powerpc" LDFLAGS.bfd+= -Wl,--secure-plt .endif -.if ${MACHINE_ARCH} == "powerpcspe" -CFLAGS += -mcpu=8548 -mspe -CFLAGS.gcc+= -mabi=spe -mfloat-gprs=double -Wa,-me500 -.endif - .if ${MACHINE_CPUARCH} == "riscv" CFLAGS += -march=rv64imafdc -mabi=lp64d .endif diff --git a/share/mk/bsd.endian.mk b/share/mk/bsd.endian.mk index 24da57954b5a..0c5ebb7aeba2 100644 --- a/share/mk/bsd.endian.mk +++ b/share/mk/bsd.endian.mk @@ -9,8 +9,7 @@ TARGET_ENDIANNESS= 1234 CAP_MKDB_ENDIAN= -l LOCALEDEF_ENDIAN= -l .elif ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpcspe" + ${MACHINE_ARCH} == "powerpc64" TARGET_ENDIANNESS= 4321 CAP_MKDB_ENDIAN= -b LOCALEDEF_ENDIAN= -b diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 4902e6a6bf4c..d09b5a212606 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -99,8 +99,7 @@ __DEFAULT_DEPENDENT_OPTIONS = \ # some memory-hungry workloads. # .if ${MACHINE_ARCH} == "armv7" \ - || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" \ - || ${MACHINE_ARCH} == "powerpcspe" + || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" __DEFAULT_NO_OPTIONS+= PIE .else __DEFAULT_YES_OPTIONS+=PIE diff --git a/stand/defs.mk b/stand/defs.mk index 504493ebe648..b74dac395d15 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -157,11 +157,6 @@ CFLAGS.gcc+= -mcmodel=medany CFLAGS+= -msoft-float .endif -# -msoft-float seems to be insufficient for powerpcspe -.if ${MACHINE_ARCH} == "powerpcspe" -CFLAGS+= -mno-spe -.endif - .if ${MACHINE_CPUARCH} == "i386" || (${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1) CFLAGS+= -march=i386 CFLAGS.gcc+= -mpreferred-stack-boundary=2 diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 643fd8677dda..68e198bbe85e 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -32,11 +32,6 @@ LDSCRIPT_NAME?= ldscript.${MACHINE_ARCH} INCLUDES+= -I$S/contrib/libfdt -.if "${MACHINE_ARCH}" == "powerpcspe" -# Force __SPE__, since the builtin will be removed later with -mno-spe -CFLAGS.gcc+= -mabi=spe -D__SPE__ -CFLAGS.clang+= -mspe -D__SPE__ -m32 -.endif CFLAGS+= -msoft-float CFLAGS.gcc+= -Wa,-many diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 653a798778c4..4e18a1300791 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -205,10 +205,6 @@ CFLAGS+= -mno-altivec -msoft-float INLINE_LIMIT?= 15000 .endif -.if ${MACHINE_ARCH} == "powerpcspe" -CFLAGS.gcc+= -mno-spe -.endif - # # Use dot symbols (or, better, the V2 ELF ABI) on powerpc64 to make # DDB happy. ELFv2, if available, has some other efficiency benefits. @@ -407,7 +403,6 @@ LD_EMULATION_arm=armelf_fbsd LD_EMULATION_armv7=armelf_fbsd LD_EMULATION_i386=elf_i386_fbsd LD_EMULATION_powerpc= elf32ppc_fbsd -LD_EMULATION_powerpcspe= elf32ppc_fbsd LD_EMULATION_powerpc64= elf64ppc_fbsd LD_EMULATION_powerpc64le= elf64lppc_fbsd LD_EMULATION_riscv64= elf64lriscv diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 0251486247da..440ed2df5644 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -223,7 +223,7 @@ ZFS_CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \ .endif .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" + ${MACHINE_ARCH} == "arm" ZFS_CFLAGS+= -DBITS_PER_LONG=32 .else ZFS_CFLAGS+= -DBITS_PER_LONG=64 diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 138adc30c213..31e56be5360f 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -651,8 +651,7 @@ _rtwnfw= rtwnfw .endif .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ - ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ - ${MACHINE_CPUARCH} != "riscv" + ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "riscv" _cxgbe= cxgbe .endif @@ -693,7 +692,7 @@ _sdhci_fdt= sdhci_fdt .endif # These rely on 64bit atomics -.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" +.if ${MACHINE_ARCH} != "powerpc" _mps= mps _mpr= mpr .endif @@ -922,8 +921,7 @@ _ixl= ixl _nvram= opal_nvram .endif -.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpcspe" -# Don't build powermac_nvram for powerpcspe, it's never supported. +.if ${MACHINE_CPUARCH} == "powerpc" _nvram+= powermac_nvram .endif diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 2751bb465258..fed29336e5de 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -45,7 +45,7 @@ CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \ .endif .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" + ${MACHINE_ARCH} == "arm" CFLAGS+= -DBITS_PER_LONG=32 .else CFLAGS+= -DBITS_PER_LONG=64 @@ -175,7 +175,7 @@ SRCS+= acl_common.c \ .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" + ${MACHINE_ARCH} == "arm" SRCS+= spl_atomic.c .endif diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 9044b1e7e4f2..7a77fa08e2b1 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -9,8 +9,7 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= basic_signal ATF_TESTS_C+= copy_file_range -.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "powerpc" && \ - ${MACHINE_ARCH} != "powerpcspe" +.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "powerpc" # No support for atomic_load_64 on i386 or (32-bit) powerpc ATF_TESTS_C+= kcov .endif diff --git a/usr.sbin/Makefile.powerpc b/usr.sbin/Makefile.powerpc index 6387cd8840d6..2a3cdf24524d 100644 --- a/usr.sbin/Makefile.powerpc +++ b/usr.sbin/Makefile.powerpc @@ -1,3 +1 @@ -.if ${MACHINE_ARCH} != "powerpcspe" SUBDIR+= nvram -.endif From nobody Fri Jan 9 16:30:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnnLm6G4hz62kXD for ; Fri, 09 Jan 2026 16:30: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnnLm3Y92z3qvZ for ; Fri, 09 Jan 2026 16:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/qsxawJT8Edf8bentwFsChkKQOLhf2Cc070U5D9NqAc=; b=dIoysmCg2yWDdePe86aghKkbT1gXnUeqYbuqxkyxWFqvWZ5b2S2VjVDP4KUETXkRf0asMI fR9AYQnPexh4RNQtB9Sh+by7jKwxcufoAVQASyLDFwHE0rZp/GVqgplnPVwzeIhVbPV4sb 8bJg1ccOx7WUGdGMO0xTGtocQvRLaCdYqCvcTPdwaZGE2TKkYEjybzqZWH8I3k9zz4F3IP bGiGOaYnjnmyoHsvdqWtVBRraRKked/ivWkD4mBFDACaF3ZnGGBo0QuPydFhXZ8heCVQo2 /OBaKCwFCoKRptWXUMHAHnLVD0glrKC7/z4bQM5dzVUyFr3hvxUqdWqyyngxIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/qsxawJT8Edf8bentwFsChkKQOLhf2Cc070U5D9NqAc=; b=DIQLaDRrGXdZadw0ItDiae5lB0BuYFtLo70v1rfLcsqZxEGJCy+DHp8H5i7SCVLLjJQgkS /ft/f/FN0izSp/rUbNhJQK6XeDm/Wja80s7kRrcDBZmxLBw1tH9geYKMGFRfWdQ6RoxzZq A9CAD87ghwRH3VZ7fkViYa9ERub6t3fYFCigOEsgB6EJMBqTcIaEFGtp+tgLShoLwWa9FQ FmX2ZBVJUTQzAuuoXoxk0Lnq2zBR/56JOmyywffoxLVTNvwAoJ2LA1TwLPuVOUEHA5aZA5 Zx2akM+B5FXHrtaVUqn5g0E7/lVXP5fSbVFcl+DXWlBVDS4kYR5K6QgtVU4ZrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767976224; a=rsa-sha256; cv=none; b=BeWpQaC+J0j85YCAia9efOsKTrQ791o5xA+Q/BsRC8oC4yGG/mO8tNU45TtAzbh2JtbecG nRlX82PQzLeMWB+mGiuro8HWeQhGMi/xKAYudspdimlMLjEiUBgGnRTR7Ne0OrnrMand4z WNsbPNNcNGr97w9VCuI0lcW9L6LTnMMj4D2XwyTkctBqFlQ2R074IjK2RKsY9x/MbZwReq XCJ3wYUq+qNtf2rA0f6Ham/zY+l22jQfuIrFXb4AdnzxXVSO3JL+PWsJJI6tfo1Ws2UJUM 2zDVLHMi7KouNYJQ7qzWOsWs3khALFGNUc6tU21J7ruZcEK+b4qSvu56LC6/bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnnLm33mxz15l for ; Fri, 09 Jan 2026 16:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3216b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 16:30:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: 7a00382beb3d - main - release: remove powerpcspe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a00382beb3dcdecc75eedc0c4248fe5145ccdc2 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 16:30:24 +0000 Message-Id: <69612d20.3216b.34cf7041@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7a00382beb3dcdecc75eedc0c4248fe5145ccdc2 commit 7a00382beb3dcdecc75eedc0c4248fe5145ccdc2 Author: Minsoo Choo AuthorDate: 2025-12-03 03:49:27 +0000 Commit: Ed Maste CommitDate: 2026-01-09 16:29:43 +0000 release: remove powerpcspe Signed-off-by: Minsoo Choo Reviewed by: jhibbits, emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1914 --- release/powerpc/powerpcspe.conf | 9 --------- 1 file changed, 9 deletions(-) diff --git a/release/powerpc/powerpcspe.conf b/release/powerpc/powerpcspe.conf deleted file mode 100644 index 955287f94e3c..000000000000 --- a/release/powerpc/powerpcspe.conf +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# - -# Configuration file for release/release.sh to build powerpc/powerpcspe. - -TARGET="powerpc" -TARGET_ARCH="powerpcspe" -KERNEL="MPC85XXSPE" From nobody Fri Jan 9 16:35:19 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnnSS2Yv4z62lBB for ; Fri, 09 Jan 2026 16: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnnSR6pN0z3sZy for ; Fri, 09 Jan 2026 16:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3Ch4fWts7yGUXaq511Ul6ismQWGPwKt/wts6Jb/cxY=; b=lzYzCZRj9iDfNyFjwfMMjUSBgQ5X/CwzcBCXdy4ooyJaqxqO71IsYyIwINKu0kdxI0dril PM4ulxOusYeMxvx6Q+MFWfz/wR5Hsm/vNh4wHz6BjAPh8v9O90qCuiDAUYzj00jIpYLScN Nt+XXmDUjzsFDp0dIwIZOOv2k5phwa6FLhETr1iKWAKPtLrDEFgkMfmzNMiiYWdRLKPfkQ WLLLqwd5BhgDSxZGw3xjA5LTbxvdDDsj7yH0tctZUKfm9LzwZ6312pBxIdeSaS/D7viZB6 OLI9VbzkTX7BLoK7qeCXgam7Z+TDLIGJc9n3OPGwu+LidgKf46xAv4JCPohRCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3Ch4fWts7yGUXaq511Ul6ismQWGPwKt/wts6Jb/cxY=; b=mAGZbBPPaDbqX3NrLnwwn99Aue6YfYzzSKvMoW8N6Dzbr3Xr3C4r+1vypmq64VyCNaAzOl rNhxNp6/X8+YhCTu56ZRfAL0LibKuFogLLxjLGJM6svoKv2HzXYxQ1vX5fWbe6FdK9bTlF OtBBOdFTZEpvUbg1XisIAYij45IChWgMh3h1TDyyMH67K6ph32+AOgeWFuUo9QmMDkdgVF UH9IxWfDKa9FcdSfsktZGDY+KxpDw7LeMPjLJz3ZG0n/RtLQIz6zqRGYVU/PIhvmFX5VCF FFOj9BIVrROU3mNSYDDkXrc+1gLTJcCeH02fpTwk3drCjsZPdy+VeCyLdu3H9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767976520; a=rsa-sha256; cv=none; b=XFz4+NlqvzzuiF5yMOMJh2aB8s7RjvUbzPoApqNg0ta+P8zncvTTLpZv2uNYv16myCSRA4 3gUqASOhhNnjegETJhNLYaASK/pooKqqkadBp2xnHBDpv1Rgiq8ZrDYCv5P0CQX1oLDvP+ EtnQteUATZE3wGewVJStJn61knwCJkSOAtAQNVWhWCafDc8h0LWAxaRcq0HObXgXQnwwCd KA4IBRvaUZja6OlFRqKKktVtGyLOSMygFIE5BFtPyDh73s1HEBGRyLdp0XrT/mnIu/MaRS Bbh5kxlFtHLWJTp3tjxI739Aw5VK51ExP8mm9e1K/S1FY1YeqcggN/3y4fQmSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnnSR6Q2mz23h for ; Fri, 09 Jan 2026 16:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33583 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 16:35:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 730b3e20069b - main - ps(1): Sort headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 730b3e20069b7115d16f02525103c6c05fa04759 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 16:35:19 +0000 Message-Id: <69612e47.33583.2dc79885@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=730b3e20069b7115d16f02525103c6c05fa04759 commit 730b3e20069b7115d16f02525103c6c05fa04759 Author: Olivier Certner AuthorDate: 2026-01-08 15:20:38 +0000 Commit: Olivier Certner CommitDate: 2026-01-09 16:34:51 +0000 ps(1): Sort headers Found these changes by chance in an old patch file. Should have been committed along with the ps(1) modifications done in March 2025. No functional change (intended). MFC after: 3 days Sponsored by: The FreeBSD Foundation --- bin/ps/keyword.c | 4 ++-- bin/ps/ps.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index f05e5245f695..0562fd2e4f9d 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -35,10 +35,10 @@ */ #include -#include -#include #include +#include #include +#include #include #include diff --git a/bin/ps/ps.c b/bin/ps/ps.c index bb5102729957..94218f8cb2aa 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -42,13 +42,13 @@ */ #include +#include #include +#include #include -#include #include -#include #include -#include +#include #include #include From nobody Fri Jan 9 16:35:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnnST2Kbqz62ksG for ; Fri, 09 Jan 2026 16: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnnST0Vmnz3sb1 for ; Fri, 09 Jan 2026 16:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VV2VFlpcKKxLuj7kGeWF6zG1swymDaCNXzgQg99zN90=; b=j9b7CTdX1sMD+TgQZhkx9SUymbSWJIovGhlNSXqyyFW6mdMp43a+56axao5uYRDbe/YO+9 /++bw16f7mlzfqzFtbLaE4RPaVvyw1s7XnJtrF7rIrEbPC0ghzjkfHHk5NFkDLQCmgo+2Z e4Tj+kEXNZ6C0G/lGdIf+UgSGDcM6gGxbj0yQfVZ88iOyAs/PlMB2G7pmFxxOkSw+wPW4b Y5L0ZUVkEgEt33rDUUnL0raXp6tgGlkRek3HD5ggcGpZ5Qq4PldIgxzllE1lagTSQSmVva ++8yZawjDZ6GJtboeGXaw2h2haehv546PXtUQ77JA4/OqCoL0uO+tmNEyMswPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VV2VFlpcKKxLuj7kGeWF6zG1swymDaCNXzgQg99zN90=; b=Ktf10ISHNRC4ltq0kHZ/BdCnjgloe4ckzbf+EJf4lcmSPC6iT14cqfiw7BapAhiQS5BlAN EL8E2FkaWJN6vo8VLJiTyCtN9nT1dyO0PP7gCfD2ldwKKI8BA4w7fQzhvhp/DjpIwfqb7d NNQm9vkplqGgruAwGyHkvaGK95V+K/Wf6Oztn7nExNQ4u8EWxh7gf8XY1Wpk3OYDSQU6s+ Y2D7alV1yyjJACjYwgoB+pefGg84Ro+DBLGXRyjDo1vSDgX4To29WiYkZwy10zTFujcAIy iX+i5etnl4604EkimAQzd6SfFoWKVT1wvobDE1vxiGSX1zTXnShSGYynjWqvqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767976521; a=rsa-sha256; cv=none; b=ovqH4We0+KMeI5Cxtgtahk9RGpQfawuPiL5MM5LRK6J0pZ4pbxLEahGqq2AntPGpp+wYm6 jP/nj7xsOW/7vsVXBI1AAV76aueR8nR+bbFTnKQpNnMVNv7KjGRH0imvrUH31yYx1+UPxZ V/8Y5MNp05hHUnWSgRSRUxJJUbsZh2kys63qVpEqZ3ZNgON7MWGmRPeURo1xGDcRGkIR/X MbpgZdTlLn7V424dQ9GgH/j8QNQVlMaryw2dCmDJdqwmWlHXDB7tIXCNceugkOHiHQqbC6 UwOhNSNxi75UqK4viA/Mf9Ch3pRt8BK0xxRV80FeX3whfpRPZJDgcMTPHWeYzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnnST06HRz21X for ; Fri, 09 Jan 2026 16:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33558 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 16:35:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: fde9fe18219f - main - i386: Fix kernel compilation after introduction of ASMC_DEBUG option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fde9fe18219f6e987279a9d042345e7c6fc170d1 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 16:35:21 +0000 Message-Id: <69612e49.33558.3c86ddf3@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=fde9fe18219f6e987279a9d042345e7c6fc170d1 commit fde9fe18219f6e987279a9d042345e7c6fc170d1 Author: Olivier Certner AuthorDate: 2026-01-09 16:25:52 +0000 Commit: Olivier Certner CommitDate: 2026-01-09 16:34:56 +0000 i386: Fix kernel compilation after introduction of ASMC_DEBUG option Fixes: f224591746bd ("Add ASMC_DEBUG make option") Sponsored by: The FreeBSD Foundation --- sys/conf/options.i386 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index c577568c837f..62bf3baf8649 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -112,3 +112,6 @@ MPTABLE_LINUX_BUG_COMPAT # x86 specific uart options UART_NS8250_EARLY_PORT opt_uart.h + +# Enable asmc(4)-specific debug logic. +ASMC_DEBUG opt_asmc.h From nobody Fri Jan 9 16:35:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnnSV4q5Gz62l45 for ; Fri, 09 Jan 2026 16: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnnSV1wlZz3scd for ; Fri, 09 Jan 2026 16:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O90lpsY7Dvu51jM6r933OiFAg3R1DdyOg1Qw33NDpak=; b=h6dfZVy7bbkVFDI738drSGdm6dDR64vy7jTzW0OwALOysZZHkNiDCZUW5RrUmcCNIjnRDZ acNqpsjYvt9aKz6alfepUpFG2gW8gdDj4yaFf/W99lMc3ULUO9jC1V28oLlnxH9cuatlb6 BNkeif9PsRllwc2fZn5v54PhwlLtkEXbQKHyzvkNe1NZmMz7TVaGKyrRnSdfIKt+LkhFrW KkGkLd7rZXafz3a1skLdun7YfLbslWdmLc7r/gCAcwhdJlV2f17u/UkbKmTpjAL1+dSN2a apwhXXhKGS+X+hALkH85HuLXIsWileEoRs9J71PJo/8615ZLrwYDnF/g0EJbrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767976522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O90lpsY7Dvu51jM6r933OiFAg3R1DdyOg1Qw33NDpak=; b=f+oYSbMhJgHw8NY9BZI7+QtDWG3b54yWKI3Udkw2H/oS2OCixutZ6l4tRNY5ai6Y0DgFy3 WIq2A1UJRx+HAPl0ENjbd7HTyn8Y9/GSh004a7PhhWqjK+daSApvAf9QOptcu1W8UY5bt+ aDvKARODA8B6rflFQro9P4l04LO/KOq4vkG/X73mCdhSa09bXSC9VXSBB90tzW/2wn9xQv NdFG9hTIbQ3g6BTPpq2R1wrpTHRIajhWS8p364+MQie/ax43QEOtfNS4m69lQRI6ceOork zbYWBg1PQ1+dTy2iVDUMXUbGnTzDM5kCAMe2ueWJZguC6OdlPEdJy9fdE8zlNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767976522; a=rsa-sha256; cv=none; b=GZtJr0J2aDhS9juFY3kE8Fuyne/IWgkvkxSBpI6l6NExZVbrEtuO7zykHtX1CTIgbnF0if ruK5EpiSMi3Wu8A9+NZ4dPvdgzLjS3Az63aOJ2RMV6FCLfP+9TMAaw57c5k39Nz+RrP7Y2 bi9/ouZJ9aZYzN2EkNwy2dbgs5dNEZhs2bN6I/6uyMx3Qp+X8PkB+hWa5ndyGP0cB/8BRh 5flMohfR3QuhCxzLLw3SwjNaxeMHid0TcuAT8Bn2B9Xb3OcT5HvQT0l/4erEhaaDRWlLtT mWnm1A9bdH60O9Jw/z18xyn0AqNw6JrhdG0cYi9LsTrnKnAWQG4qkMAy90O1DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnnSV1Pxhz16F for ; Fri, 09 Jan 2026 16:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3279b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 16:35:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 67599eef01f5 - main - sys/x86/NOTES: Add vt_efifb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67599eef01f5417715f673ec81fc1467917c7a10 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 16:35:22 +0000 Message-Id: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=67599eef01f5417715f673ec81fc1467917c7a10 commit 67599eef01f5417715f673ec81fc1467917c7a10 Author: Olivier Certner AuthorDate: 2026-01-09 16:23:59 +0000 Commit: Olivier Certner CommitDate: 2026-01-09 16:34:56 +0000 sys/x86/NOTES: Add vt_efifb Contrary to what is stated in commit f224591746bd ("Add ASMC_DEBUG make option"), the various NOTES files should list all available options. Since vt_efifb is supported also on i386, add it back to x86/NOTES instead of amd64/NOTES. Fixes: f224591746bd ("Add ASMC_DEBUG make option") Sponsored by: The FreeBSD Foundation --- sys/x86/conf/NOTES | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES index 643105096be2..2c8efa3726dc 100644 --- a/sys/x86/conf/NOTES +++ b/sys/x86/conf/NOTES @@ -329,6 +329,7 @@ options VGA_DEBUG # vt(4) drivers. device vt_vga # VGA device vt_vbefb # VBE framebuffer +device vt_efifb # EFI framebuffer # Linear framebuffer driver for S3 VESA 1.2 cards. Works on top of VESA. device s3pci From nobody Fri Jan 9 16:44:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnngC4s7lz62lDN; Fri, 09 Jan 2026 16:44:39 +0000 (UTC) (envelope-from olce@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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnngC4Dk7z3vm7; Fri, 09 Jan 2026 16:44:39 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767977079; 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=x9Ywy/5u4CAILvvaSAsc3QkoL5+j6/uxnUncglUXQ/g=; b=PNbW4fUEpbv1We6f89DMZnaAqtAwIzhQFRl7ualcztNIIvS4/4EqD2GAu1TowD4BQoYiWY PRHnCiiq5raIsSe5v+ZNE07Co2rpSdblixV/Wsjy5M7Sssz5BCvy45cTjBYIsH1pnc6JWp UOdveJ9yryOIH0AwznZHYp6YuPusRiKO9YsUPoBBTNXlNxvQoZ4blrXdT+UzoAedMRSy6c r6HXkmKtGPb50EEe4sV7nmOWY7iEQIuSaTv+ZLhKVhUq7V5fY1rN4Gbuo4YcHCfzb1NAlx tvTbZlDME9qxhVhhQ7qGSDwKxxz8XBVPZkhBnJlzINuudPIOcrh7MEzpwZhTNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767977079; 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=x9Ywy/5u4CAILvvaSAsc3QkoL5+j6/uxnUncglUXQ/g=; b=ZlllIX+hNWOz8d+PkgloG/QXBJ3k3mRb1Jm6/7G6ZpORSFc2rm7YOJ87k7E8IxFJID9EsM 5al33KVi2ne2BHVzZ7Gb885gtDp16tHNh1wNmR1bfeAtZSNhmFI1PTXH5ahE1/S5PjMO45 hxgoPQEZxHmqMGDNcNnlIfHjvn+NzHXpOBHF5RSixNw6hM2DcQv7fnq7O8tJuZ8sgBBEfp JCFokkra4ZWIg16jd4OIt4geHR7a7o4ulGuf/eaLXOJ2VursEA90AnYFPxyeAFQIapoooa rIYdRjMBHRD8DfA4BEM/SwQbV4M9MFiXTcxUJW9sTi2uNsCPumIfivZGJeqQlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767977079; a=rsa-sha256; cv=none; b=ZhN4aEtg/BjObIsUlrpAzLjg8XPrMlL7BTebiuzNImP2+W2K5w95bgDjHRIP5NfY5GYvI0 Tj2XynkbMKymtWBFS85FjUzLGldzEGyTazIhbKD/1Fy/elrT64Kj4PbfY3LS0UgXdMC5bA 0wX/fftZK25OXgMJWZkS0VLSIolzoQ8424EfcXbuD9bRgbmXv6Yo2lLAyfWV3QcOUgB5YE oJGtnsgp7r+yw+K+/2cMHfoWeSsCh82Akz2qwuyJlMLkvFsqv+WFxE1B2HsjY6EefzZ0rQ wxlzr7m8fb/oOHFu4rnXuU+UJ7qmZlBi+0ukr1cVpxZwlU8jVUih21h+9vT3Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dnngB5sBHz4tv; Fri, 09 Jan 2026 16:44:38 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Enji Cooper Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, src-committers@freebsd.org Subject: Re: git: f224591746bd - main - Add ASMC_DEBUG make option Date: Fri, 09 Jan 2026 17:44:30 +0100 Message-ID: <1990810.vR5SVPPSqJ@ravel> In-Reply-To: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> References: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart24592482.gYbqZ1YImA"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart24592482.gYbqZ1YImA Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Olivier Certner To: Enji Cooper Subject: Re: git: f224591746bd - main - Add ASMC_DEBUG make option Date: Fri, 09 Jan 2026 17:44:30 +0100 Message-ID: <1990810.vR5SVPPSqJ@ravel> In-Reply-To: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> References: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> MIME-Version: 1.0 Hi Enji, > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f224591746bdaf14ad5f63de4738a3146cc2f55f > > commit f224591746bdaf14ad5f63de4738a3146cc2f55f > Author: Enji Cooper > AuthorDate: 2026-01-04 08:27:57 +0000 > Commit: Enji Cooper > CommitDate: 2026-01-06 01:43:04 +0000 > > Add ASMC_DEBUG make option This commit broke the i386 build. I've just committed a fix. Also, I've restored 'device vt_efifb' in NOTES (under 'x86/' instead of 'amd64/'), as AFAIK, NOTES should list all possible devices/options. Please make sure you also MFC the two following commits (67599eef01f5 ("sys/x86/NOTES: Add vt_efifb"), fde9fe18219f i386 ("Fix kernel compilation after introduction of ASMC_DEBUG option")) along with the original one. Thanks and regards. -- Olivier Certner --nextPart24592482.gYbqZ1YImA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmlhMG4ACgkQjKEwQJce JiepGxAAhVl2dpGcGGUeDSZqjy2KxvP81pTLBqdZIDAB/4Hx39PFEMafgN69YAvO tScyCFAwDnG2xlt3qdicHkusvGfNGm0WyQhf8/uxEwp5n+vuKZD+5o4iutgVp7Rj xMFSetPeCivAwXZbsHk14RidVnkGUGnz4ZTFLTyFR2c02H4noDRD+87cz4+wuL6j CyhJoawJ1Opt/HOQ81CDjsv3KVCeUt+ZKDhzUhf5azNXqk9Eu+rV9lHaLqm40DwJ pBDI9Lo71ZQK7oiap9URY5ozjm3VntCJfojFKPXEBwR+YATVLRijzFu94HETQAha RyZTJN10b/ZIc2BmkRf0KnOr5vbatt7oAM2bkoQiI5odzrmrCUcsguvKUHjPqQcH CVfnQfBAq32K5tFloxrNzAEJNn2v5Y7imo/8y1YfuX+PNnNMWs81JiBZVeqOHK+u 0FOjH8TvG0mFumAEO7A89XZHWL+g5ciXHowX5Gx0l/LT2S6wCRvqmRe5LKSUoR/H PL/WtS9r93f1J8OZdYMb0JOh8pAVL5lBGdgDLvgiLto8CbgIGpeylwpXvFuJ3uPq CV14GZsU5TSy31c1I3/IClRu8yNw1iUvShjn/nUH8eo8UJ1VpILiENQsRy7RaYgU y0YimYzIhZ5wBxdVjXzGguwzj1MihM+J24jFhIgNawpLCCUj5wc= =5az9 -----END PGP SIGNATURE----- --nextPart24592482.gYbqZ1YImA-- From nobody Fri Jan 9 17:37:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnprV2qh0z69ysN for ; Fri, 09 Jan 2026 17:37: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnprV2DGXz42FG for ; Fri, 09 Jan 2026 17:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aHTh3eWLs14s9RCzVWsHpZ084764Of7XY19YvpfRh0=; b=I8N+jbIiaWPnp/Nl/9Xspj8oA1DTy4J/y5X5v0gdFDZZAnLGGh7jb1UiyEUJoKImeIDcue EHSbzHRQ9YtcSXdmV8SMxyxx0QEHxqIz63lHm8GnfHB4NBuoUnDVSP50JJqbcopAtwJy2+ OYcF7l/C5ZQdUsCmVxvXkOpC3uu4HmAJvmIwJII4R953NeuCSCz+s3yM3Lt09e43rbFllN aYkxflfqI+f666T6FZ1G1tjBcgQkdeMjUVQgthJ8zRlrzpmb+6En+aYYV1a4tYjKunMJhd iv4PIw6mayE87OZlvlQoxwhdd5r7nSQLwDHU0PRrSryExtpUBs007CCHir4+bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aHTh3eWLs14s9RCzVWsHpZ084764Of7XY19YvpfRh0=; b=Fi4b1IYNmLgXkA60/hsQyhiVO155N4mfHuZLf7JGsiD3nRlcZcNPUk4AWjwBWhdA0OdSam 400jpmbrHNAFILWOg3Bm0I6ZsvkV4OGvXRx/M654rBcAw8cov95k9LcmhIK2QUYtechF9T m//Jyq7p9S4Trw/DHqFMj6eF0d0PszVS+pA1nvnGlDl3bGk0Xe9LgyoCCuDqwj6sPvZKaP 2ABdC+0uS51HUx9XTLl5vyoCHcb+WnR2RTxvliWjkktWKqwRekpKaXxlEKleRe6vcUoo8s vTsOSsg3VawZk+4mowOu2uE2vPbWObgOv98iKcJ+Pon5cKh/LXQNhrXJYVM/qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767980266; a=rsa-sha256; cv=none; b=WvtCI41MWHcoUWDnuwP9V+XAA0aLnAYJMD9j9PrRPrcwthLqWVF0GYV2TzZreA7D4JkrZc g8JdHnZAWhDrKakCqMJkcca3TBwqcQzh5Bl54gNY1kAqsKuTtSvQ6L9G5GTdJ/TZrS/9hz k7zSG/OwVB0bFWAnIM2nklnbi5jQxfjx0n+hhHrtfSAuoDdbcXc7UYq7Xq0+bfLzfkoUZd f8q39nTQD9vYmNHXDhCx4vDVOMogwMc+wa7lk47PJrgD0Y1QdkwZ3khZAVz4FrrA4IxGzD Uw9q/+/NYAcAgcI+bu7qO8fIS1Ig/Ick6Gv+nLAWvSMoJ5INEbz/a5CDCsT+og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnprV15Qyz36H for ; Fri, 09 Jan 2026 17:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36951 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 17:37:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ali Mashtizadeh From: Warner Losh Subject: git: bae832487038 - main - libpmc: Import AMD Zen 5 PMU events. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bae832487038b2c8778dc6f52700b4353175ccec Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 17:37:45 +0000 Message-Id: <69613ce9.36951.437fdd68@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bae832487038b2c8778dc6f52700b4353175ccec commit bae832487038b2c8778dc6f52700b4353175ccec Author: Ali Mashtizadeh AuthorDate: 2026-01-08 22:33:41 +0000 Commit: Warner Losh CommitDate: 2026-01-09 17:37:36 +0000 libpmc: Import AMD Zen 5 PMU events. Sponsored by: Netflix Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1954 --- .../arch/x86/amdzen5/branch-prediction.json | 93 ++ .../pmu-events/arch/x86/amdzen5/data-fabric.json | 1634 ++++++++++++++++++++ lib/libpmc/pmu-events/arch/x86/amdzen5/decode.json | 115 ++ .../pmu-events/arch/x86/amdzen5/execution.json | 174 +++ .../arch/x86/amdzen5/floating-point.json | 812 ++++++++++ .../pmu-events/arch/x86/amdzen5/inst-cache.json | 72 + .../pmu-events/arch/x86/amdzen5/l2-cache.json | 266 ++++ .../pmu-events/arch/x86/amdzen5/l3-cache.json | 177 +++ .../pmu-events/arch/x86/amdzen5/load-store.json | 517 +++++++ .../arch/x86/amdzen5/memory-controller.json | 101 ++ .../pmu-events/arch/x86/amdzen5/pipeline.json | 99 ++ .../pmu-events/arch/x86/amdzen5/recommended.json | 457 ++++++ lib/libpmc/pmu-events/arch/x86/mapfile.csv | 1 + 13 files changed, 4518 insertions(+) diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen5/branch-prediction.json b/lib/libpmc/pmu-events/arch/x86/amdzen5/branch-prediction.json new file mode 100644 index 000000000000..2d8d18cb85c1 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen5/branch-prediction.json @@ -0,0 +1,93 @@ +[ + { + "EventName": "bp_l1_tlb_miss_l2_tlb_hit", + "EventCode": "0x84", + "BriefDescription": "Instruction fetches that miss in the L1 ITLB but hit in the L2 ITLB." + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if4k", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks are requested) for 4k pages.", + "UMask": "0x01" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if2m", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks are requested) for 2M pages.", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if1g", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks are requested) for 1G pages.", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.coalesced_4k", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks are requested) for coalesced pages. A coalesced page is a 16k page created from four adjacent 4k pages.", + "UMask": "0x08" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.all", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks are requested) for all page sizes.", + "UMask": "0x0f" + }, + { + "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 (branch used the indirect predictor to make a prediction)." + }, + { + "EventName": "bp_de_redirect", + "EventCode": "0x91", + "BriefDescription": "Number of times an early redirect is sent to branch predictor. This happens when either the decoder or dispatch logic is able to detect that the branch predictor needs to be redirected." + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if4k", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for 4k or coalesced pages. A coalesced page is a 16k page created from four adjacent 4k pages.", + "UMask": "0x01" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if2m", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for 2M pages.", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if1g", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for 1G pages.", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.all", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for all page sizes.", + "UMask": "0x07" + }, + { + "EventName": "bp_redirects.resync", + "EventCode": "0x9f", + "BriefDescription": "Redirects of the branch predictor caused by resyncs.", + "UMask": "0x01" + }, + { + "EventName": "bp_redirects.ex_redir", + "EventCode": "0x9f", + "BriefDescription": "Redirects of the branch predictor caused by mispredicts.", + "UMask": "0x02" + }, + { + "EventName": "bp_redirects.all", + "EventCode": "0x9f", + "BriefDescription": "Redirects of the branch predictor." + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen5/data-fabric.json b/lib/libpmc/pmu-events/arch/x86/amdzen5/data-fabric.json new file mode 100644 index 000000000000..fa06569d881d --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen5/data-fabric.json @@ -0,0 +1,1634 @@ +[ + { + "EventName": "local_or_remote_socket_read_data_beats_dram_0", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 0.", + "EventCode": "0x1f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_1", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 1.", + "EventCode": "0x5f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_2", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 2.", + "EventCode": "0x9f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_3", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 3.", + "EventCode": "0xdf", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_4", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 4.", + "EventCode": "0x11f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_5", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 5.", + "EventCode": "0x15f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_6", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 6.", + "EventCode": "0x19f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_7", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 7.", + "EventCode": "0x1df", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_8", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 8.", + "EventCode": "0x21f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_9", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 9.", + "EventCode": "0x25f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_10", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 10.", + "EventCode": "0x29f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_read_data_beats_dram_11", + "PublicDescription": "Read data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 11.", + "EventCode": "0x2df", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_0", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 0.", + "EventCode": "0x1f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_1", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 1.", + "EventCode": "0x5f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_2", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 2.", + "EventCode": "0x9f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_3", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 3.", + "EventCode": "0xdf", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_4", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 4.", + "EventCode": "0x11f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_5", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 5.", + "EventCode": "0x15f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_6", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 6.", + "EventCode": "0x19f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_7", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 7.", + "EventCode": "0x1df", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_8", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 8.", + "EventCode": "0x21f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_9", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 9.", + "EventCode": "0x25f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_10", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 10.", + "EventCode": "0x29f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_write_data_beats_dram_11", + "PublicDescription": "Write data beats (64 bytes) for transactions between local socket and DRAM Channel 11.", + "EventCode": "0x2df", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_0", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 0.", + "EventCode": "0x1f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_1", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 1.", + "EventCode": "0x5f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_2", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 2.", + "EventCode": "0x9f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_3", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 3.", + "EventCode": "0xdf", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_4", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 4.", + "EventCode": "0x11f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_5", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 5.", + "EventCode": "0x15f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_6", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 6.", + "EventCode": "0x19f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_7", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 7.", + "EventCode": "0x1df", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_8", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 8.", + "EventCode": "0x21f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_9", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 9.", + "EventCode": "0x25f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_10", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 10.", + "EventCode": "0x29f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_write_data_beats_dram_11", + "PublicDescription": "Write data beats (64 bytes) for transactions between remote socket and DRAM Channel 11.", + "EventCode": "0x2df", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_0", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 0.", + "EventCode": "0x1f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_1", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 1.", + "EventCode": "0x5f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_2", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 2.", + "EventCode": "0x9f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_3", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 3.", + "EventCode": "0xdf", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_4", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 4.", + "EventCode": "0x11f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_5", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 5.", + "EventCode": "0x15f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_6", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 6.", + "EventCode": "0x19f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_7", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 7.", + "EventCode": "0x1df", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_8", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 8.", + "EventCode": "0x21f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_9", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 9.", + "EventCode": "0x25f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_10", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 10.", + "EventCode": "0x29f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_write_data_beats_dram_11", + "PublicDescription": "Write data beats (64 bytes) for transactions between local or remote socket and DRAM Channel 11.", + "EventCode": "0x2df", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_0", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 0.", + "EventCode": "0x81f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_1", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 1.", + "EventCode": "0x85f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_2", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 2.", + "EventCode": "0x89f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_3", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 3.", + "EventCode": "0x8df", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_4", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 4.", + "EventCode": "0x91f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_5", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 5.", + "EventCode": "0x95f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_6", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 6.", + "EventCode": "0x99f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_read_data_beats_io_7", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local socket and IO Root Complex 7.", + "EventCode": "0x9df", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_0", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 0.", + "EventCode": "0x81f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_1", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 1.", + "EventCode": "0x85f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_2", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 2.", + "EventCode": "0x89f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_3", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 3.", + "EventCode": "0x8df", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_4", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 4.", + "EventCode": "0x91f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_5", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 5.", + "EventCode": "0x95f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_6", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 6.", + "EventCode": "0x99f", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_upstream_write_data_beats_io_7", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local socket and IO Root Complex 7.", + "EventCode": "0x9df", + "UMask": "0x7ff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_0", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 0.", + "EventCode": "0x81f", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_1", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 1.", + "EventCode": "0x85f", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_2", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 2.", + "EventCode": "0x89f", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_3", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 3.", + "EventCode": "0x8df", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_4", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 4.", + "EventCode": "0x91f", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_5", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 5.", + "EventCode": "0x95f", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_6", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 6.", + "EventCode": "0x99f", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_read_data_beats_io_7", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between remote socket and IO Root Complex 7.", + "EventCode": "0x9df", + "UMask": "0xbfe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_0", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 0.", + "EventCode": "0x81f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_1", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 1.", + "EventCode": "0x85f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_2", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 2.", + "EventCode": "0x89f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_3", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 3.", + "EventCode": "0x8df", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_4", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 4.", + "EventCode": "0x91f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_5", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 5.", + "EventCode": "0x95f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_6", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 6.", + "EventCode": "0x99f", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_socket_upstream_write_data_beats_io_7", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between remote socket and IO Root Complex 7.", + "EventCode": "0x9df", + "UMask": "0xbff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_0", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 0.", + "EventCode": "0x81f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_1", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 1.", + "EventCode": "0x85f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_2", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 2.", + "EventCode": "0x89f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_3", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 3.", + "EventCode": "0x8df", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_4", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 4.", + "EventCode": "0x91f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_5", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 5.", + "EventCode": "0x95f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_6", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 6.", + "EventCode": "0x99f", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_read_data_beats_io_7", + "PublicDescription": "Upstream DMA read data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 7.", + "EventCode": "0x9df", + "UMask": "0xffe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_0", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 0.", + "EventCode": "0x81f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_1", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 1.", + "EventCode": "0x85f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_2", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 2.", + "EventCode": "0x89f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_3", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 3.", + "EventCode": "0x8df", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_4", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 4.", + "EventCode": "0x91f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_5", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 5.", + "EventCode": "0x95f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_6", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 6.", + "EventCode": "0x99f", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_or_remote_socket_upstream_write_data_beats_io_7", + "PublicDescription": "Upstream DMA write data beats (64 bytes) for transactions between local or remote socket and IO Root Complex 7.", + "EventCode": "0x9df", + "UMask": "0xfff", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_0", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 0.", + "EventCode": "0x41e", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_1", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 1.", + "EventCode": "0x45e", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_2", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 2.", + "EventCode": "0x49e", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_3", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 3.", + "EventCode": "0x4de", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_4", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 4.", + "EventCode": "0x51e", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_5", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 5.", + "EventCode": "0x55e", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_6", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 6.", + "EventCode": "0x59e", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_7", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 7.", + "EventCode": "0x5de", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_8", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 8.", + "EventCode": "0x41f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "local_socket_inbound_data_beats_cfi_9", + "PublicDescription": "Inbound data beats (32 bytes) for transactions between local socket and Core-to-Fabric Interface 9.", + "EventCode": "0x45f", + "UMask": "0x7fe", + "PerPkg": "1", + "Unit": "DFPMC" + }, *** 3645 LINES SKIPPED *** From nobody Fri Jan 9 17:40:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnpvQ6kkcz6B0Bp for ; Fri, 09 Jan 2026 17:40: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnpvQ6SHxz42jj for ; Fri, 09 Jan 2026 17:40:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TcNcpijv8kAp595Ns9b6tYhEMHY+2A/fGcMzo347epc=; b=vTCOUk/23EM+ujme7aZLyn6F+JQqzPJaN8G8svd0vPv60e8UKjpT0ubxuVSQDAv1dq0tHS nnDt7SinKqcatGWEIeRWQUZlKCRqQ9HHyP2C0c+E1zBydFtQNzRAmXhOQvsaA9vuE3MO8v +9/PEERlDo4PIfDtxfEwbJVzeaLR7B4lprZWZAbdOFkWMZ5d+4Z09jvFlxe+hoLC5GWtLW sZ2OhCINF1ygAk+xZwYWP7Wtai+wokJIj9p9+r7aCRbYOAlbMU6E/x6wZJCKMwd2H9Gcc8 Wt93yHzqdh4Mp5zmaqRS67K6ipvkLviclPiCM33MYUfezuKKPe3aN8dd720WgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TcNcpijv8kAp595Ns9b6tYhEMHY+2A/fGcMzo347epc=; b=yWAWSOijfBjw41bGPg6WfkZjEcVH8cvjbo2ALyUil6XPe9uPDsF3pfb7TeidvIw+plezAF EFq0RjPq7TRomW0UJUVZ2b7M+gjvq0ylrGFp4zELaJPsxNc4r9rZnuTk2e/DrcaeVJWLFd odiIHxiRperg4k/Nyfu6pqEKKB38dqgUkv0onEKojym629tjVj7DKKoPkY4K0+I2RNRGPx pxgqM1y3HLAbFAeyAlqXqVuaTT1i3y4KVk6BoBSuUwGqRT7ZC8et5/8YUBA8yUUEdoUaHU fHGs9Tg691l+106XCbd2qwnaxX6dhxmegRBrMnrcBl1iPEOaBDPCrHEDiw6IlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767980418; a=rsa-sha256; cv=none; b=EFgds4B/IDf5l+AMTUx29tZpeEZBFDWk1wBp6LYm2L0f07urvPD2ZM3Pe2MY31Hl0+Db3S fWJVOB19U+Io47gqp4KazHnvr5IWY1HDlc/AlO0dN+HtmfDGngFmRvhs8X+XmwzqP5s19S T8fhKEWcz8ekxEez0SufxFEkAI7VUPgIXhFZueuyna0aA6y+wtyDt3ShZrYqXjRR4OD0gl hGf/oyBrNFtvD+axIbP9b6PFWrhx3yMuOqg20NxZGsNWibL8mjw6/heL8dGSmvcBF7f/SB O+jC2iB+hfB9L/gTFWfgqRWrM7/a4BsmGEkHZc+0wFpoagEPQQH7w211II9Qfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnpvQ5QBvz2sx for ; Fri, 09 Jan 2026 17:40:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39392 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 17:40:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Hall Subject: git: c558eca47970 - main - smartpqi: update to version 4660.0.2002 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrhall X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c558eca47970c8467ed0494145f08d1879050bbd Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 17:40:18 +0000 Message-Id: <69613d82.39392.4768c344@gitrepo.freebsd.org> The branch main has been updated by jrhall: URL: https://cgit.FreeBSD.org/src/commit/?id=c558eca47970c8467ed0494145f08d1879050bbd commit c558eca47970c8467ed0494145f08d1879050bbd Author: John Hall AuthorDate: 2025-08-28 21:11:02 +0000 Commit: John Hall CommitDate: 2026-01-09 17:39:58 +0000 smartpqi: update to version 4660.0.2002 This updates the smartpqi driver to Microchip's latest available public release. Reviewed by: imp Approved by: imp Sponsored by: Microchip Technology Inc. Differential Revision: https://reviews.freebsd.org/D52507 --- share/man/man4/smartpqi.4 | 86 +++++++- sys/dev/smartpqi/smartpqi_cam.c | 53 ++--- sys/dev/smartpqi/smartpqi_cmd.c | 4 +- sys/dev/smartpqi/smartpqi_controllers.h | 371 ++++++++++++++++++++++++++++++++ sys/dev/smartpqi/smartpqi_defines.h | 43 ++-- sys/dev/smartpqi/smartpqi_discovery.c | 167 +++++--------- sys/dev/smartpqi/smartpqi_event.c | 10 +- sys/dev/smartpqi/smartpqi_helper.c | 32 ++- sys/dev/smartpqi/smartpqi_init.c | 13 +- sys/dev/smartpqi/smartpqi_intr.c | 3 +- sys/dev/smartpqi/smartpqi_ioctl.c | 12 +- sys/dev/smartpqi/smartpqi_main.c | 320 +++------------------------ sys/dev/smartpqi/smartpqi_misc.c | 28 +-- sys/dev/smartpqi/smartpqi_prototypes.h | 52 ++--- sys/dev/smartpqi/smartpqi_queue.c | 25 +-- sys/dev/smartpqi/smartpqi_request.c | 104 ++++----- sys/dev/smartpqi/smartpqi_response.c | 14 +- sys/dev/smartpqi/smartpqi_sis.c | 6 +- sys/dev/smartpqi/smartpqi_structures.h | 5 +- 19 files changed, 724 insertions(+), 624 deletions(-) diff --git a/share/man/man4/smartpqi.4 b/share/man/man4/smartpqi.4 index f5fab85d13bd..ef5f903fe422 100644 --- a/share/man/man4/smartpqi.4 +++ b/share/man/man4/smartpqi.4 @@ -1,4 +1,4 @@ -.\" Copyright (C) 2019-2023, Microchip Technology Inc. and its subsidiaries +.\" Copyright (C) 2019-2025, Microchip Technology Inc. and its subsidiaries .\" Copyright (C) 2016-2018, Microsemi Corporation .\" Copyright (C) 2016, PMC-Sierra, Inc. .\" Written by John Hall @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 24, 2023 +.Dd August 28, 2025 .Dt SMARTPQI 4 amd64 .Os .Sh NAME @@ -48,7 +48,7 @@ smartpqi_load="YES" The .Nm driver provides support for Microchip Technology Inc. / Adaptec SmartRaid and -SmartHBA SATA/SAS/NVME PCIe controllers +SmartHBA SATA/SAS/NVMe PCIe controllers .Sh HARDWARE Controllers supported by the .Nm @@ -63,6 +63,86 @@ Adaptec SmartRaid and SmartHBA Controllers OEM Controllers based on the Microchip Technology Inc. SmartROC and SmartIOC Chipsets .El +.Sh DEBUGGING +Driver diagnostic printing is controlled in +.Xr loader.conf 5 +by using the global +.Va hw.smartpqi.debug_level +tunable. +.Pp +The +.Va debug_level +variable is set with an integer value. +The default value is 0x0060 (warn && error). +.Pp +The following levels are available: +.Bl -column "FlagXX" "NameXXXX" "Description" -offset indent +.It Em Flag Ta Em Name Ta Em Description +.It 0x0001 Ta init Ta System initialization operations +.It 0x0002 Ta info Ta Basic information +.It 0x0004 Ta function Ta Used to show function entry and exit +.It 0x0008 Ta io Ta Logging data from controller +.It 0x0010 Ta discovery Ta Device discovery +.It 0x0020 Ta warning Ta Operational warnings +.It 0x0040 Ta error Ta Parameter errors and programming bugs +.It 0x0080 Ta note Ta More detailed information +.El +.Sh DEVICE HINTS +The following tunable values can be set in +.Pa /boot/device.hints +to control the behavior of the +.Nm +driver. +These hints are specified as: +.Bd -literal -offset indent +hint.smartpqi..= +.Ed +.Pp +The supported variables are: +.Bl -tag -width ".Va aio_raid1_write_disable" +.It Va stream_disable +If set to 0, disables Stream Detection. +.Pp +Default is (enabled). +.It Va sata_unique_wwn_disable +If set to 0, disables SATA Unique World Wide Number. +.Pp +Default is (enabled). +.It Va aio_raid1_write_disable +If set to 0, disables acceleration of RAID1 writes +.Pp +Default is (enabled). +.It Va aio_raid5_write_disable +If set to 0, disables acceleration of RAID5 writes +.Pp +Default is (enabled). +.It Va aio_raid6_write_disable +If set to 0, disables acceleration of RAID6 writes +.Pp +Default is (enabled). +.It Va queue_depth +Sets queue depth for the controller. If the queue depth value +is greater than the maximum supported queue size of the driver or +controller, it will be set to the lowest size. If the queue +depth value is lower than the minimum queue depth then this will +be set to the minimum queue depth. +.Pp +Default is driver-determined. +.It Va sg_count +Sets the scatter gather (sg) count. If this sg count is greater +than maximum sg count it will be set to the maximum sg count. +If this sg count is less than minimum sg count it will be set to +the minimum sg count. +.Pp +Default is driver-determined. +.El +.Pp +For example, to disable Stream Detection on the first controller, add +the following line to +.Pa /boot/device.hints : +.Bd -literal -offset indent +hint.smartpqi.0.stream_disable="0" +.Ed .Sh FILES .Bl -tag -width /boot/kernel/smartpqi.ko -compact .It Pa /dev/smartpqi? diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index ffdd9fd7da79..93043a296c5d 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -71,7 +71,6 @@ update_sim_properties(struct cam_sim *sim, struct ccb_pathinq *cpi) cpi->hba_subvendor = pci_get_subvendor(dev); cpi->hba_subdevice = pci_get_subdevice(dev); - DBG_FUNC("OUT\n"); } @@ -154,10 +153,6 @@ os_remove_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) } xpt_async(AC_LOST_DEVICE, tmppath, NULL); xpt_free_path(tmppath); - /* softs->device_list[device->target][device->lun] = NULL; */ - int index = pqisrc_find_device_list_index(softs,device); - if (index >= 0 && index < PQI_MAX_DEVICES) - softs->dev_list[index] = NULL; pqisrc_free_device(softs, device); } @@ -335,7 +330,7 @@ os_io_response_success(rcb_t *rcb) static void copy_sense_data_to_csio(struct ccb_scsiio *csio, - uint8_t *sense_data, uint16_t sense_data_len) + uint8_t const *sense_data, uint16_t sense_data_len) { DBG_IO("IN csio = %p\n", csio); @@ -740,7 +735,7 @@ smartpqi_target_rescan(struct pqisrc_softstate *softs) /* if(softs->device_list[target][lun]){ */ if(softs->dev_list[index] != NULL) { device = softs->dev_list[index]; - DBG_INFO("calling smartpqi_lun_rescan with TL = %d:%d\n",device->target,device->lun); + DBG_INFO("calling smartpqi_lun_rescan with T%d:L%d\n",device->target,device->lun); smartpqi_lun_rescan(softs, device->target, device->lun); } } @@ -821,7 +816,6 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) if (index == INVALID_ELEM) { ccb->ccb_h.status = CAM_DEV_NOT_THERE; - DBG_INFO("Invalid index/device!!!, Device BTL %u:%d:%d\n", softs->bus_id, target, lun); return ENXIO; } @@ -850,7 +844,7 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) } /* Check device reset */ if (DEVICE_RESET(dvp)) { - ccb->ccb_h.status = CAM_SCSI_BUSY | CAM_REQ_INPROG | CAM_BUSY; + ccb->ccb_h.status = CAM_BUSY; DBG_WARN("Device %d reset returned busy\n", ccb->ccb_h.target_id); return EBUSY; } @@ -915,7 +909,7 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) } static inline int -pqi_tmf_status_to_bsd_tmf_status(int pqi_status, rcb_t *rcb) +pqi_tmf_status_to_bsd_tmf_status(int pqi_status, rcb_t const *rcb) { if (PQI_STATUS_SUCCESS == pqi_status && PQI_STATUS_SUCCESS == rcb->status) @@ -931,7 +925,7 @@ static int pqisrc_scsi_abort_task(pqisrc_softstate_t *softs, union ccb *ccb) { rcb_t *rcb = NULL; - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *prcb = ccb->ccb_h.sim_priv.entries[0].ptr; uint32_t tag; int rval; @@ -971,7 +965,7 @@ error_tmf: static int pqisrc_scsi_abort_task_set(pqisrc_softstate_t *softs, union ccb *ccb) { - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *rcb = NULL; uint32_t tag; int rval; @@ -1013,7 +1007,7 @@ pqisrc_target_reset( pqisrc_softstate_t *softs, union ccb *ccb) { /* pqi_scsi_dev_t *devp = softs->device_list[ccb->ccb_h.target_id][ccb->ccb_h.target_lun]; */ - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *rcb = NULL; uint32_t tag; int rval; @@ -1069,7 +1063,7 @@ static void smartpqi_cam_action(struct cam_sim *sim, union ccb *ccb) { struct pqisrc_softstate *softs = cam_sim_softc(sim); - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; DBG_FUNC("IN\n"); @@ -1209,22 +1203,19 @@ smartpqi_async(void *callback_arg, u_int32_t code, } uint32_t t_id = cgd->ccb_h.target_id; - /* if (t_id <= (PQI_CTLR_INDEX - 1)) { */ - if (t_id >= PQI_CTLR_INDEX) { - if (softs != NULL) { - /* pqi_scsi_dev_t *dvp = softs->device_list[t_id][cgd->ccb_h.target_lun]; */ - int lun = cgd->ccb_h.target_lun; - int index = pqisrc_find_btl_list_index(softs,softs->bus_id,t_id,lun); - if (index != INVALID_ELEM) { - pqi_scsi_dev_t *dvp = softs->dev_list[index]; - if (dvp == NULL) { - DBG_ERR("Target is null, target id=%u\n", t_id); - break; - } - smartpqi_adjust_queue_depth(path, dvp->queue_depth); - } - } - } + if (softs != NULL) { + /* pqi_scsi_dev_t *dvp = softs->device_list[t_id][cgd->ccb_h.target_lun]; */ + int lun = cgd->ccb_h.target_lun; + int index = pqisrc_find_btl_list_index(softs,softs->bus_id,t_id,lun); + if (index != INVALID_ELEM) { + pqi_scsi_dev_t const *dvp = softs->dev_list[index]; + if (dvp == NULL) { + DBG_ERR("Target is null, target id=%u\n", t_id); + break; + } + smartpqi_adjust_queue_depth(path, dvp->queue_depth); + } + } break; } default: diff --git a/sys/dev/smartpqi/smartpqi_cmd.c b/sys/dev/smartpqi/smartpqi_cmd.c index 8486ac12df79..b71879aa81f6 100644 --- a/sys/dev/smartpqi/smartpqi_cmd.c +++ b/sys/dev/smartpqi/smartpqi_cmd.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,7 +35,7 @@ pqisrc_submit_cmnd(pqisrc_softstate_t *softs, ib_queue_t *ib_q, void *req) { char *slot = NULL; uint32_t offset; - iu_header_t *hdr = (iu_header_t *)req; + iu_header_t const *hdr = (iu_header_t *)req; /*TODO : Can be fixed a size copying of IU ? */ uint32_t iu_len = hdr->iu_length + 4 ; /* header size */ int i = 0; diff --git a/sys/dev/smartpqi/smartpqi_controllers.h b/sys/dev/smartpqi/smartpqi_controllers.h new file mode 100644 index 000000000000..6356159fd5f7 --- /dev/null +++ b/sys/dev/smartpqi/smartpqi_controllers.h @@ -0,0 +1,371 @@ +/*- + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * + * 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. + */ + +/* + * Supported controllers + */ +struct pqi_ident +{ + u_int16_t vendor; + u_int16_t device; + u_int16_t subvendor; + u_int16_t subdevice; + int hwif; + char *desc; +} pqi_identifiers[] = { + /* (MSCC PM8205 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x600, PQI_HWIF_SRCV, "P408i-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x601, PQI_HWIF_SRCV, "P408e-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x602, PQI_HWIF_SRCV, "P408i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x603, PQI_HWIF_SRCV, "P408i-c SR Gen10"}, + {0x9005, 0x028f, 0x1028, 0x1FE0, PQI_HWIF_SRCV, "SmartRAID 3162-8i/eDell"}, + {0x9005, 0x028f, 0x9005, 0x608, PQI_HWIF_SRCV, "SmartRAID 3162-8i/e"}, + {0x9005, 0x028f, 0x103c, 0x609, PQI_HWIF_SRCV, "P408i-sb SR G10"}, + + /* (MSCC PM8225 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x650, PQI_HWIF_SRCV, "E208i-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x651, PQI_HWIF_SRCV, "E208e-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x652, PQI_HWIF_SRCV, "E208i-c SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x654, PQI_HWIF_SRCV, "E208i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x655, PQI_HWIF_SRCV, "P408e-m SR Gen10"}, + {0x9005, 0x028f, 0x9005, 0x659, PQI_HWIF_SRCV, "2100C8iOXS"}, + + /* (MSCC PM8221 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x700, PQI_HWIF_SRCV, "P204i-c SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x701, PQI_HWIF_SRCV, "P204i-b SR Gen10"}, + {0x9005, 0x028f, 0x193d, 0x1104, PQI_HWIF_SRCV, "UN RAID P2404-Mf-4i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1106, PQI_HWIF_SRCV, "UN RAID P2404-Mf-4i-1GB"}, + {0x9005, 0x028f, 0x193d, 0x1108, PQI_HWIF_SRCV, "UN RAID P4408-Ma-8i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1109, PQI_HWIF_SRCV, "UN RAID P4408-Mr-8i-2GB"}, + + /* (MSCC PM8204 8x12G based) */ + {0x9005, 0x028f, 0x9005, 0x800, PQI_HWIF_SRCV, "SmartRAID 3154-8i"}, + {0x9005, 0x028f, 0x9005, 0x801, PQI_HWIF_SRCV, "SmartRAID 3152-8i"}, + {0x9005, 0x028f, 0x9005, 0x802, PQI_HWIF_SRCV, "SmartRAID 3151-4i"}, + {0x9005, 0x028f, 0x9005, 0x803, PQI_HWIF_SRCV, "SmartRAID 3101-4i"}, + {0x9005, 0x028f, 0x9005, 0x804, PQI_HWIF_SRCV, "SmartRAID 3154-8e"}, + {0x9005, 0x028f, 0x9005, 0x805, PQI_HWIF_SRCV, "SmartRAID 3102-8i"}, + {0x9005, 0x028f, 0x9005, 0x806, PQI_HWIF_SRCV, "SmartRAID 3100"}, + {0x9005, 0x028f, 0x9005, 0x807, PQI_HWIF_SRCV, "SmartRAID 3162-8i"}, + {0x9005, 0x028f, 0x152d, 0x8a22, PQI_HWIF_SRCV, "QS-8204-8i"}, + {0x9005, 0x028f, 0x193d, 0xf460, PQI_HWIF_SRCV, "UN RAID P460-M4"}, + {0x9005, 0x028f, 0x193d, 0xf461, PQI_HWIF_SRCV, "UN RAID P460-B4"}, + {0x9005, 0x028f, 0x1bd4, 0x004b, PQI_HWIF_SRCV, "PM8204-2GB"}, + {0x9005, 0x028f, 0x1bd4, 0x004c, PQI_HWIF_SRCV, "PM8204-4GB"}, + {0x9005, 0x028f, 0x1ff9, 0x004b, PQI_HWIF_SRCV, "RAID PM8204-2GB"}, + {0x9005, 0x028f, 0x1ff9, 0x004c, PQI_HWIF_SRCV, "RAID PM8204-4GB"}, + {0x9005, 0x028f, 0x193d, 0x0462, PQI_HWIF_SRCV, "UN RAID P460-Mr1-8i-4GB"}, + {0x9005, 0x028f, 0x193d, 0x1105, PQI_HWIF_SRCV, "UN RAID P4408-Mf-8i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1107, PQI_HWIF_SRCV, "UN RAID P4408-Mf-8i-4GB"}, + {0x9005, 0x028f, 0x193d, 0x1110, PQI_HWIF_SRCV, "UN RAID P4408-Mr-2"}, + {0x9005, 0x028f, 0x1d8d, 0x800, PQI_HWIF_SRCV, "Fiberhome SmartRAID AIS-8204-8i"}, + {0x9005, 0x028f, 0x9005, 0x0808, PQI_HWIF_SRCV, "SmartRAID 3101E-4i"}, + {0x9005, 0x028f, 0x9005, 0x0809, PQI_HWIF_SRCV, "SmartRAID 3102E-8i"}, + {0x9005, 0x028f, 0x9005, 0x080a, PQI_HWIF_SRCV, "SmartRAID 3152-8i/N"}, + {0x9005, 0x028f, 0x1cc4, 0x0101, PQI_HWIF_SRCV, "Ramaxel FBGF-RAD PM8204"}, + {0x9005, 0x028f, 0x1f3a, 0x0104, PQI_HWIF_SRCV, "PL SmartROC PM8204"}, + {0x9005, 0x028f, 0x1f51, 0x1043, PQI_HWIF_SRCV, "SmartRAID P7502-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1045, PQI_HWIF_SRCV, "SmartRAID P7504-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1011, PQI_HWIF_SRCV, "SmartRAID P7504N-8i"}, + {0x9005, 0x028f, 0x207d, 0x4140, PQI_HWIF_SRCV, "HRDT TrustRAID D3152s-8i"}, + {0x9005, 0x028f, 0x207d, 0x4240, PQI_HWIF_SRCV, "HRDT TrustRAID D3154s-8i"}, + + /* (MSCC PM8222 8x12G based) */ + {0x9005, 0x028f, 0x9005, 0x900, PQI_HWIF_SRCV, "SmartHBA 2100-8i"}, + {0x9005, 0x028f, 0x9005, 0x901, PQI_HWIF_SRCV, "SmartHBA 2100-4i"}, + {0x9005, 0x028f, 0x9005, 0x902, PQI_HWIF_SRCV, "HBA 1100-8i"}, + {0x9005, 0x028f, 0x9005, 0x903, PQI_HWIF_SRCV, "HBA 1100-4i"}, + {0x9005, 0x028f, 0x9005, 0x904, PQI_HWIF_SRCV, "SmartHBA 2100-8e"}, + {0x9005, 0x028f, 0x9005, 0x905, PQI_HWIF_SRCV, "HBA 1100-8e"}, + {0x9005, 0x028f, 0x9005, 0x906, PQI_HWIF_SRCV, "SmartHBA 2100-4i4e"}, + {0x9005, 0x028f, 0x9005, 0x907, PQI_HWIF_SRCV, "HBA 1100"}, + {0x9005, 0x028f, 0x9005, 0x908, PQI_HWIF_SRCV, "SmartHBA 2100"}, + {0x9005, 0x028f, 0x9005, 0x90a, PQI_HWIF_SRCV, "SmartHBA 2100A-8i"}, + {0x9005, 0x028f, 0x193d, 0x8460, PQI_HWIF_SRCV, "UN HBA H460-M1"}, + {0x9005, 0x028f, 0x193d, 0x8461, PQI_HWIF_SRCV, "UN HBA H460-B1"}, + {0x9005, 0x028f, 0x193d, 0x8462, PQI_HWIF_SRCV, "UN HBA H460-Mr1-8i"}, + {0x9005, 0x028f, 0x193d, 0xc460, PQI_HWIF_SRCV, "UN RAID P460-M2"}, + {0x9005, 0x028f, 0x193d, 0xc461, PQI_HWIF_SRCV, "UN RAID P460-B2"}, + {0x9005, 0x028f, 0x1bd4, 0x004a, PQI_HWIF_SRCV, "PM8222-SHBA"}, + {0x9005, 0x028f, 0x1ff9, 0x004a, PQI_HWIF_SRCV, "PM8222-SHBA"}, + {0x9005, 0x028f, 0x13fe, 0x8312, PQI_HWIF_SRCV, "MIC-8312BridgeB"}, + {0x9005, 0x028f, 0x1bd4, 0x004f, PQI_HWIF_SRCV, "PM8222-HBA"}, + {0x9005, 0x028f, 0x1ff9, 0x004f, PQI_HWIF_SRCV, "PM8222-HBA"}, + {0x9005, 0x028f, 0x1d8d, 0x908, PQI_HWIF_SRCV, "Fiberhome SmartHBA AIS-8222-8i"}, + {0x9005, 0x028f, 0x1bd4, 0x006C, PQI_HWIF_SRCV, "RS0800M5E8i"}, + {0x9005, 0x028f, 0x1bd4, 0x006D, PQI_HWIF_SRCV, "RS0800M5H8i"}, + {0x9005, 0x028f, 0x1ff9, 0x006C, PQI_HWIF_SRCV, "RS0800M5E8i"}, + {0x9005, 0x028f, 0x1ff9, 0x006D, PQI_HWIF_SRCV, "RS0800M5H8i"}, + {0x9005, 0x028f, 0x1cc4, 0x0201, PQI_HWIF_SRCV, "Ramaxel FBGF-RAD PM8222"}, + {0x9005, 0x028f, 0x1f51, 0x1044, PQI_HWIF_SRCV, "SmartHBA P6500-8i"}, + {0x9005, 0x028f, 0x1f3f, 0x0610, PQI_HWIF_SRCV, "3SNIC SSSRAID 3S610"}, + {0x9005, 0x028f, 0x207d, 0x4840, PQI_HWIF_SRCV, "HRDT TrustHBA H3100s-8i"}, + + /* (SRCx MSCC FVB 24x12G based) */ + {0x9005, 0x028f, 0x103c, 0x1001, PQI_HWIF_SRCV, "MSCC FVB"}, + + /* (MSCC PM8241 24x12G based) */ + + /* (MSCC PM8242 24x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a37, PQI_HWIF_SRCV, "QS-8242-24i"}, + {0x9005, 0x028f, 0x9005, 0x1300, PQI_HWIF_SRCV, "HBA 1100-8i8e"}, + {0x9005, 0x028f, 0x9005, 0x1301, PQI_HWIF_SRCV, "HBA 1100-24i"}, + {0x9005, 0x028f, 0x9005, 0x1302, PQI_HWIF_SRCV, "SmartHBA 2100-8i8e"}, + {0x9005, 0x028f, 0x9005, 0x1303, PQI_HWIF_SRCV, "SmartHBA 2100-24i"}, + {0x9005, 0x028f, 0x105b, 0x1321, PQI_HWIF_SRCV, "8242-24i"}, + {0x9005, 0x028f, 0x1bd4, 0x0045, PQI_HWIF_SRCV, "SMART-HBA 8242-24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0045, PQI_HWIF_SRCV, "SMART-HBA 8242-24i"}, + {0x9005, 0x028f, 0x1bd4, 0x006B, PQI_HWIF_SRCV, "RS0800M5H24i"}, + {0x9005, 0x028f, 0x1bd4, 0x0070, PQI_HWIF_SRCV, "RS0800M5E24i"}, + {0x9005, 0x028f, 0x1ff9, 0x006B, PQI_HWIF_SRCV, "RS0800M5H24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0070, PQI_HWIF_SRCV, "RS0800M5E24i"}, + + /* (MSCC PM8236 16x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a24, PQI_HWIF_SRCV, "QS-8236-16i"}, + {0x9005, 0x028f, 0x9005, 0x1380, PQI_HWIF_SRCV, "SmartRAID 3154-16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0046, PQI_HWIF_SRCV, "RAID 8236-16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0046, PQI_HWIF_SRCV, "RAID 8236-16i"}, + {0x9005, 0x028f, 0x1d8d, 0x806, PQI_HWIF_SRCV, "Fiberhome SmartRAID AIS-8236-16i"}, + {0x9005, 0x028f, 0x1cf2, 0x0B27, PQI_HWIF_SRCV, "ZTE SmartROC3100 SDPSA/B-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x0B45, PQI_HWIF_SRCV, "ZTE SmartROC3100 SDPSA/B_L-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x5445, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM241-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x5446, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM242-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x5449, PQI_HWIF_SRCV, "ZTE SmartROC3100 RS241-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x544A, PQI_HWIF_SRCV, "ZTE SmartROC3100 RS242-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x544D, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM241B-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x544E, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM242B-18i 4G"}, + {0x9005, 0x028f, 0x1bd4, 0x006F, PQI_HWIF_SRCV, "RS0804M5R16i"}, + {0x9005, 0x028f, 0x1ff9, 0x006F, PQI_HWIF_SRCV, "RS0804M5R16i"}, + {0x9005, 0x028f, 0x1f51, 0x1010, PQI_HWIF_SRCV, "SmartRAID P7504N-16i"}, + + + + /* (MSCC PM8237 24x12G based) */ + {0x9005, 0x028f, 0x103c, 0x1100, PQI_HWIF_SRCV, "P816i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x1101, PQI_HWIF_SRCV, "P416ie-m SR G10"}, + + /* (MSCC PM8238 16x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a23, PQI_HWIF_SRCV, "QS-8238-16i"}, + {0x9005, 0x028f, 0x9005, 0x1280, PQI_HWIF_SRCV, "HBA 1100-16i"}, + {0x9005, 0x028f, 0x9005, 0x1281, PQI_HWIF_SRCV, "HBA 1100-16e"}, + {0x9005, 0x028f, 0x105b, 0x1211, PQI_HWIF_SRCV, "8238-16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0048, PQI_HWIF_SRCV, "SMART-HBA 8238-16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0048, PQI_HWIF_SRCV, "SMART-HBA 8238-16i"}, + {0x9005, 0x028f, 0x9005, 0x1282, PQI_HWIF_SRCV, "SmartHBA 2100-16i"}, + {0x9005, 0x028f, 0x1d8d, 0x916, PQI_HWIF_SRCV, "Fiberhome SmartHBA AIS-8238-16i"}, + {0x9005, 0x028f, 0x1458, 0x1000, PQI_HWIF_SRCV, "GIGABYTE SmartHBA CLN1832"}, + {0x9005, 0x028f, 0x1cf2, 0x0B29, PQI_HWIF_SRCV, "ZTE SmartIOC2100 SDPSA/B_I-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x5447, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RM243-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x544B, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RS243-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x544F, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RM243B-18i"}, + {0x9005, 0x028f, 0x1bd4, 0x0071, PQI_HWIF_SRCV, "RS0800M5H16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0072, PQI_HWIF_SRCV, "RS0800M5E16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0071, PQI_HWIF_SRCV, "RS0800M5H16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0072, PQI_HWIF_SRCV, "RS0800M5E16i"}, + {0x9005, 0x028f, 0x1018, 0x8238, PQI_HWIF_SRCV, "Ramaxel SmartHBA RX8238-16i"}, + + /* (MSCC PM8240 24x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a36, PQI_HWIF_SRCV, "QS-8240-24i"}, + {0x9005, 0x028f, 0x9005, 0x1200, PQI_HWIF_SRCV, "SmartRAID 3154-24i"}, + {0x9005, 0x028f, 0x9005, 0x1201, PQI_HWIF_SRCV, "SmartRAID 3154-8i16e"}, + {0x9005, 0x028f, 0x9005, 0x1202, PQI_HWIF_SRCV, "SmartRAID 3154-8i8e"}, + {0x9005, 0x028f, 0x1bd4, 0x0047, PQI_HWIF_SRCV, "RAID 8240-24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0047, PQI_HWIF_SRCV, "RAID 8240-24i"}, + {0x9005, 0x028f, 0x1dfc, 0x3161, PQI_HWIF_SRCV, "NTCOM SAS3 RAID-24i"}, + {0x9005, 0x028f, 0x1F0C, 0x3161, PQI_HWIF_SRCV, "NT RAID 3100-24i"}, + + /* Huawei ID's */ + {0x9005, 0x028f, 0x19e5, 0xd227, PQI_HWIF_SRCV, "SR465C-M 4G"}, + {0x9005, 0x028f, 0x19e5, 0xd22a, PQI_HWIF_SRCV, "SR765-M"}, + {0x9005, 0x028f, 0x19e5, 0xd228, PQI_HWIF_SRCV, "SR455C-M 2G"}, + {0x9005, 0x028f, 0x19e5, 0xd22c, PQI_HWIF_SRCV, "SR455C-M 4G"}, + {0x9005, 0x028f, 0x19e5, 0xd229, PQI_HWIF_SRCV, "SR155-M"}, + {0x9005, 0x028f, 0x19e5, 0xd22b, PQI_HWIF_SRCV, "SR455C-ME 4G"}, + + /* (MSCC PM8252 8x12G based) */ + {0x9005, 0x028f, 0x193d, 0x110b, PQI_HWIF_SRCV, "UN HBA H4508-Mf-8i"}, + {0x9005, 0x028f, 0x1bd4, 0x0052, PQI_HWIF_SRCV, "MT0801M6E"}, + {0x9005, 0x028f, 0x1bd4, 0x0054, PQI_HWIF_SRCV, "MT0800M6H"}, + {0x9005, 0x028f, 0x1bd4, 0x0086, PQI_HWIF_SRCV, "RT0800M7E"}, + {0x9005, 0x028f, 0x1bd4, 0x0087, PQI_HWIF_SRCV, "RT0800M7H"}, + {0x9005, 0x028f, 0x1ff9, 0x0052, PQI_HWIF_SRCV, "MT0801M6E"}, + {0x9005, 0x028f, 0x1ff9, 0x0054, PQI_HWIF_SRCV, "MT0800M6H"}, + {0x9005, 0x028f, 0x1BD4, 0x00a3, PQI_HWIF_SRCV, "RT0800M6E2i"}, + {0x9005, 0x028f, 0x1ff9, 0x00a3, PQI_HWIF_SRCV, "RT0800M6E2i"}, + {0x9005, 0x028f, 0x1ff9, 0x0086, PQI_HWIF_SRCV, "RT0800M7E"}, + {0x9005, 0x028f, 0x1ff9, 0x0087, PQI_HWIF_SRCV, "RT0800M7H"}, + {0x9005, 0x028f, 0x1f51, 0x1001, PQI_HWIF_SRCV, "SmartHBA P6600-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1003, PQI_HWIF_SRCV, "SmartHBA P6600-8e"}, + {0x9005, 0x028f, 0x9005, 0x1460, PQI_HWIF_SRCV, "HBA 1200"}, + {0x9005, 0x028f, 0x9005, 0x1461, PQI_HWIF_SRCV, "SmartHBA 2200"}, + {0x9005, 0x028f, 0x9005, 0x1462, PQI_HWIF_SRCV, "HBA 1200-8i"}, + {0x9005, 0x028f, 0x1d49, 0x0222, PQI_HWIF_SRCV, "4450-8i HBA"}, + {0x9005, 0x028f, 0x207d, 0x4044, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-8i"}, + {0x9005, 0x028f, 0x207d, 0x4054, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-8e"}, + + /* (MSCC PM8254 32x12G based) */ + {0x9005, 0x028f, 0x1bd4, 0x0051, PQI_HWIF_SRCV, "MT0804M6R"}, + {0x9005, 0x028f, 0x1bd4, 0x0053, PQI_HWIF_SRCV, "MT0808M6R"}, + {0x9005, 0x028f, 0x1bd4, 0x0088, PQI_HWIF_SRCV, "RT0804M7R"}, + {0x9005, 0x028f, 0x1bd4, 0x0089, PQI_HWIF_SRCV, "RT0808M7R"}, + {0x9005, 0x028f, 0x1ff9, 0x0051, PQI_HWIF_SRCV, "MT0804M6R"}, + {0x9005, 0x028f, 0x1ff9, 0x0053, PQI_HWIF_SRCV, "MT0808M6R"}, + {0x9005, 0x028f, 0x1ff9, 0x0088, PQI_HWIF_SRCV, "RT0804M7R"}, + {0x9005, 0x028f, 0x1ff9, 0x0089, PQI_HWIF_SRCV, "RT0808M7R"}, + {0x9005, 0x028f, 0x1f51, 0x1002, PQI_HWIF_SRCV, "SmartRAID P7604-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1004, PQI_HWIF_SRCV, "SmartRAID P7604-8e"}, + {0x9005, 0x028f, 0x1f51, 0x100f, PQI_HWIF_SRCV, "SmartRAID P7604N-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a0, PQI_HWIF_SRCV, "SmartRAID 3254-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a1, PQI_HWIF_SRCV, "SmartRAID 3204-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a2, PQI_HWIF_SRCV, "SmartRAID 3252-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a4, PQI_HWIF_SRCV, "SmartRAID 3254-8i /e"}, + {0x9005, 0x028f, 0x9005, 0x14a5, PQI_HWIF_SRCV, "SmartRAID 3252-8i /e"}, + {0x9005, 0x028f, 0x9005, 0x14a6, PQI_HWIF_SRCV, "SmartRAID 3204-8i /e"}, + {0x9005, 0x028f, 0x1d49, 0x0624, PQI_HWIF_SRCV, "9450-8i 4GB Flash"}, + + /* (MSCC PM8262 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14c0, PQI_HWIF_SRCV, "SmartHBA 2200-16i"}, + {0x9005, 0x028f, 0x9005, 0x14c1, PQI_HWIF_SRCV, "HBA 1200-16i"}, + {0x9005, 0x028f, 0x9005, 0x14c3, PQI_HWIF_SRCV, "HBA 1200-16e"}, + {0x9005, 0x028f, 0x9005, 0x14c4, PQI_HWIF_SRCV, "HBA 1200-8e"}, + {0x9005, 0x028f, 0x1f51, 0x1005, PQI_HWIF_SRCV, "SmartHBA P6600-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1007, PQI_HWIF_SRCV, "SmartHBA P6600-8i8e"}, + {0x9005, 0x028f, 0x1f51, 0x1009, PQI_HWIF_SRCV, "SmartHBA P6600-16e"}, + {0x9005, 0x028f, 0x1cf2, 0x54dc, PQI_HWIF_SRCV, "ZTE SmartIOC2200 RM346-16i"}, + {0x9005, 0x028f, 0x1cf2, 0x0806, PQI_HWIF_SRCV, "ZTE SmartIOC2200 RS346-16i"}, + {0x9005, 0x028f, 0x1d49, 0x0223, PQI_HWIF_SRCV, "4450-16i HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0224, PQI_HWIF_SRCV, "4450-8e HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0225, PQI_HWIF_SRCV, "4450-16e HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0521, PQI_HWIF_SRCV, "5450-16i"}, + {0x9005, 0x028f, 0x207d, 0x4084, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-16i"}, + {0x9005, 0x028f, 0x207d, 0x4094, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-16e"}, + + /* (MSCC PM8264 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14b0, PQI_HWIF_SRCV, "SmartRAID 3254-16i"}, + {0x9005, 0x028f, 0x9005, 0x14b1, PQI_HWIF_SRCV, "SmartRAID 3258-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1006, PQI_HWIF_SRCV, "SmartRAID P7608-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1008, PQI_HWIF_SRCV, "SmartRAID P7608-8i8e"}, + {0x9005, 0x028f, 0x1f51, 0x100a, PQI_HWIF_SRCV, "SmartRAID P7608-16e"}, + {0x9005, 0x028f, 0x1cf2, 0x54da, PQI_HWIF_SRCV, "ZTE SmartROC3200 RM344-16i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x54db, PQI_HWIF_SRCV, "ZTE SmartROC3200 RM345-16i 8G"}, + {0x9005, 0x028f, 0x1cf2, 0x0804, PQI_HWIF_SRCV, "ZTE SmartROC3200 RS344-16i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x0805, PQI_HWIF_SRCV, "ZTE SmartROC3200 RS345-16i 8G"}, + {0x9005, 0x028f, 0x1f51, 0x100e, PQI_HWIF_SRCV, "SmartRAID P7604N-16i"}, + {0x9005, 0x028f, 0x1d49, 0x0625, PQI_HWIF_SRCV, "9450-16i 4GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0626, PQI_HWIF_SRCV, "9450-16i 8GB Flash"}, + + /* (MSCC PM8265 16x12G based) */ + {0x9005, 0x028f, 0x1590, 0x02dc, PQI_HWIF_SRCV, "SR416i-a Gen10+"}, + {0x9005, 0x028f, 0x9005, 0x1470, PQI_HWIF_SRCV, "SmartRAID 3200"}, + {0x9005, 0x028f, 0x9005, 0x1471, PQI_HWIF_SRCV, "SmartRAID 3254-16i /e"}, + {0x9005, 0x028f, 0x9005, 0x1472, PQI_HWIF_SRCV, "SmartRAID 3258-16i /e"}, + {0x9005, 0x028f, 0x9005, 0x1473, PQI_HWIF_SRCV, "SmartRAID 3284-16io /e/uC"}, + {0x9005, 0x028f, 0x9005, 0x1474, PQI_HWIF_SRCV, "SmartRAID 3254-16io /e"}, + {0x9005, 0x028f, 0x9005, 0x1475, PQI_HWIF_SRCV, "SmartRAID 3254-16e /e"}, + + /* (MSCC PM8266 16x12G based) */ + {0x9005, 0x028f, 0x1014, 0x0718, PQI_HWIF_SRCV, "IBM 4-Port 24G SAS"}, + {0x9005, 0x028f, 0x9005, 0x1490, PQI_HWIF_SRCV, "HBA 1200p Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1491, PQI_HWIF_SRCV, "SmartHBA 2200p Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1402, PQI_HWIF_SRCV, "HBA Ultra 1200P-16i"}, + {0x9005, 0x028f, 0x9005, 0x1441, PQI_HWIF_SRCV, "HBA Ultra 1200P-32i"}, + {0x9005, 0x028f, 0x1137, 0x0300, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 HBA LFF 32D UCSC-HBAMP1LL32"}, + + /* (MSCC PM8268 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14d0, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-16i"}, + + /* (MSCC PM8269 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1400, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-16i /e"}, + {0x9005, 0x028f, 0x1ff9, 0x00a1, PQI_HWIF_SRCV, "RT1608M6R16i"}, + + /* (MSCC PM8270 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1410, PQI_HWIF_SRCV, "HBA Ultra 1200P-16e"}, + {0x9005, 0x028f, 0x9005, 0x1411, PQI_HWIF_SRCV, "HBA 1200 Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1412, PQI_HWIF_SRCV, "SmartHBA 2200 Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1463, PQI_HWIF_SRCV, "SmartHBA 2200-8io /e"}, + {0x9005, 0x028f, 0x9005, 0x14c2, PQI_HWIF_SRCV, "SmartHBA 2200-16io /e"}, + {0x9005, 0x028f, 0x1337, 0x02fa, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 HBA 16D UCSC-HBA-M1L16"}, + + /* (MSCC PM8271 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14e0, PQI_HWIF_SRCV, "SmartIOC PM8271"}, + + /* (MSCC PM8272 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1420, PQI_HWIF_SRCV, "SmartRAID Ultra 3254-16e"}, + {0x9005, 0x028f, 0x1d49, 0x0628, PQI_HWIF_SRCV, "9450-16e 4GB Flash"}, + + /* (MSCC PM8273 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1430, PQI_HWIF_SRCV, "SmartRAID Ultra 3254-16e /e"}, + {0x9005, 0x028f, 0x1137, 0x02f9, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 16D UCSC-RAID-M1L16"}, + {0x9005, 0x028f, 0x1137, 0x02ff, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 6D UCSX-RAID-M1L6"}, + + /* (MSCC PM8274 16x12G based) */ + {0x9005, 0x028f, 0x1e93, 0x1000, PQI_HWIF_SRCV, "ByteHBA JGH43024-8"}, + {0x9005, 0x028f, 0x1e93, 0x1001, PQI_HWIF_SRCV, "ByteHBA JGH43034-8"}, + {0x9005, 0x028f, 0x1e93, 0x1005, PQI_HWIF_SRCV, "ByteHBA JGH43014-8"}, + {0x9005, 0x028f, 0x1f51, 0x100B, PQI_HWIF_SRCV, "SmartHBA P6600-24i"}, + + /* (MSCC PM8275 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14f0, PQI_HWIF_SRCV, "SmartIOC PM8275"}, + + /* (MSCC PM8276 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1480, PQI_HWIF_SRCV, "SmartRAID 3200 Ultra"}, + {0x9005, 0x028f, 0x1e93, 0x1002, PQI_HWIF_SRCV, "ByteHBA JGH44014-8"}, + + /* (MSCC PM8277 16x12G based) */ + {0x9005, 0x028f, 0x1137, 0x02f8, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 32D UCSC-RAID-MP1L32"}, + + /* (MSCC PM8278 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1440, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-32i"}, + {0x9005, 0x028f, 0x1d49, 0x0627, PQI_HWIF_SRCV, "9450-32i 8GB Flash"}, + + /* (MSCC PM8279 32x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1450, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-32i /e"}, + {0x9005, 0x028f, 0x1590, 0x0294, PQI_HWIF_SRCV, "SR932i-p Gen10+"}, + {0x9005, 0x028f, 0x1590, 0x0381, PQI_HWIF_SRCV, "SR932i-p Gen11"}, + {0x9005, 0x028f, 0x1590, 0x0382, PQI_HWIF_SRCV, "SR308i-p Gen11"}, + {0x9005, 0x028f, 0x1590, 0x0383, PQI_HWIF_SRCV, "SR308i-o Gen11"}, + {0x9005, 0x028f, 0x1590, 0x02db, PQI_HWIF_SRCV, "SR416ie-m Gen11"}, + {0x9005, 0x028f, 0x1590, 0x032e, PQI_HWIF_SRCV, "SR416i-o Gen11"}, + {0x9005, 0x028f, 0x9005, 0x1452, PQI_HWIF_SRCV, "SmartRAID 3200p Ultra"}, + {0x9005, 0x028f, 0x1137, 0x02fe, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID LFF 32D UCSC-RAIDMP1LL32"}, + + /* (MSCC HBA/SMARTHBA/CFF SmartRAID - Lenovo 8X12G 16X12G based) */ + {0x9005, 0x028f, 0x1d49, 0x0220, PQI_HWIF_SRCV, "4350-8i SAS/SATA HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0221, PQI_HWIF_SRCV, "4350-16i SAS/SATA HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0520, PQI_HWIF_SRCV, "5350-8i"}, + {0x9005, 0x028f, 0x1d49, 0x0522, PQI_HWIF_SRCV, "5350-8i INTR"}, + {0x9005, 0x028f, 0x1d49, 0x0620, PQI_HWIF_SRCV, "9350-8i 2GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0621, PQI_HWIF_SRCV, "9350-8i 2GB Flash INTR"}, + {0x9005, 0x028f, 0x1d49, 0x0622, PQI_HWIF_SRCV, "9350-16i 4GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0623, PQI_HWIF_SRCV, "9350-16i 4GB Flash INTR"}, + + {0, 0, 0, 0, 0, 0} +}; + +struct pqi_ident +pqi_family_identifiers[] = { + {0x9005, 0x028f, 0, 0, PQI_HWIF_SRCV, "Smart Array Storage Controller"}, + {0, 0, 0, 0, 0, 0} +}; diff --git a/sys/dev/smartpqi/smartpqi_defines.h b/sys/dev/smartpqi/smartpqi_defines.h index bb0bb2b709aa..fe2edf7a74a9 100644 --- a/sys/dev/smartpqi/smartpqi_defines.h +++ b/sys/dev/smartpqi/smartpqi_defines.h @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -927,7 +927,7 @@ typedef struct pqi_pci_info typedef struct _driver_info { unsigned char major_version; - unsigned long minor_version; + unsigned char minor_version; unsigned char release_version; unsigned long build_revision; unsigned long max_targets; @@ -938,9 +938,13 @@ typedef struct _driver_info typedef uint8_t *passthru_buf_type_t; #define PQISRC_DRIVER_MAJOR __FreeBSD__ -#define PQISRC_DRIVER_MINOR 4410 +#if __FreeBSD__ <= 14 +#define PQISRC_DRIVER_MINOR 4660 +#else +#define PQISRC_DRIVER_MINOR 0 +#endif #define PQISRC_DRIVER_RELEASE 0 -#define PQISRC_DRIVER_REVISION 2005 +#define PQISRC_DRIVER_REVISION 2002 #define STR(s) # s #define PQISRC_VERSION(a, b, c, d) STR(a.b.c-d) @@ -1234,19 +1238,21 @@ typedef struct sema OS_SEMA_LOCK_T; /* Debug facility */ -#define PQISRC_FLAGS_MASK 0x0000ffff -#define PQISRC_FLAGS_INIT 0x00000001 -#define PQISRC_FLAGS_INFO 0x00000002 -#define PQISRC_FLAGS_FUNC 0x00000004 -#define PQISRC_FLAGS_TRACEIO 0x00000008 -#define PQISRC_FLAGS_DISC 0x00000010 -#define PQISRC_FLAGS_WARN 0x00000020 -#define PQISRC_FLAGS_ERROR 0x00000040 -#define PQISRC_FLAGS_NOTE 0x00000080 +#define PQISRC_FLAGS_MASK 0x0000000000ff +#define PQISRC_FLAGS_INIT 0x0001 +#define PQISRC_FLAGS_INFO 0x0002 +#define PQISRC_FLAGS_FUNC 0x0004 +#define PQISRC_FLAGS_TRACEIO 0x0008 +#define PQISRC_FLAGS_DISC 0x0010 +#define PQISRC_FLAGS_WARN 0x0020 +#define PQISRC_FLAGS_ERROR 0x0040 +#define PQISRC_FLAGS_NOTE 0x0080 -#define PQISRC_LOG_LEVEL (PQISRC_FLAGS_WARN | PQISRC_FLAGS_ERROR | PQISRC_FLAGS_NOTE) +#define PQISRC_LOG_LEVEL (PQISRC_FLAGS_WARN | PQISRC_FLAGS_ERROR) -static int logging_level = PQISRC_LOG_LEVEL; +extern unsigned long logging_level; + +#define DBG_SET_LOGGING_LEVEL(value) logging_level = value & PQISRC_FLAGS_MASK #define DBG_INIT(fmt,args...) \ do { \ @@ -1276,13 +1282,6 @@ static int logging_level = PQISRC_LOG_LEVEL; } \ }while(0); -#define DBG_TRACEIO(fmt,args...) \ - do { \ - if (logging_level & PQISRC_FLAGS_TRACEIO) { \ - printf("[TRACEIO]:[ %s ] [ %d ]"fmt,__func__,__LINE__,##args); \ - } \ - }while(0); - #define DBG_WARN(fmt,args...) \ do { \ if (logging_level & PQISRC_FLAGS_WARN) { \ diff --git a/sys/dev/smartpqi/smartpqi_discovery.c b/sys/dev/smartpqi/smartpqi_discovery.c index ac37c2233762..a7de5a149810 100644 --- a/sys/dev/smartpqi/smartpqi_discovery.c +++ b/sys/dev/smartpqi/smartpqi_discovery.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -189,7 +189,7 @@ pqisrc_set_btl(pqi_scsi_dev_t *device, int bus, int target, int lun) * devices and multi-lun devices */ boolean_t pqisrc_add_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, - uint8_t *scsi3addr) + uint8_t const *scsi3addr) { /* Add physical devices with targets that need * targets */ @@ -269,7 +269,7 @@ pqisrc_add_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, } } DBG_ERR("The device is not a physical, lun or ptraid device" - "B %d: T %d: L %d\n", device->bus, device->target, + "B%d:T%d:L%d\n", device->bus, device->target, device->lun ); return false; @@ -283,7 +283,7 @@ add_device_to_dev_list: softs->dev_list[j] = device; break; } - DBG_NOTE("Added device [%d of %d]: B %d: T %d: L %d\n", + DBG_NOTE("Added device [%d of %d]: B%d:T%d:L%d\n", j, softs->num_devs, device->bus, device->target, device->lun); return true; @@ -307,7 +307,6 @@ pqisrc_find_btl_list_index(pqisrc_softstate_t *softs, if(bus == softs->bus_id && target == temp_device->target && lun == temp_device->lun){ - DBG_DISC("Returning device list index %d\n", index); return index; } @@ -322,7 +321,7 @@ pqisrc_find_btl_list_index(pqisrc_softstate_t *softs, /* Return a given index for a specific device within the * softs dev_list */ int -pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) +pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *device) { int index; @@ -346,7 +345,7 @@ pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) /* Delete a given device from the softs dev_list*/ int -pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) +pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *device) { int index; @@ -354,8 +353,8 @@ pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if (0 <= index && index < MAX_TARGET_BIT) { softs->dev_list[index] = NULL; softs->num_devs--; - DBG_NOTE("Removing device : B %d: T %d: L %d positioned at %d\n", - device->bus, device->target, device->lun, softs->num_devs); + DBG_NOTE("Removing device: B%d:T%d:L%d positioned at %d\n", + device->bus, device->target, device->lun, index); return PQI_STATUS_SUCCESS; } if (index == INVALID_ELEM) { @@ -414,7 +413,7 @@ pqisrc_build_send_raid_request(pqisrc_softstate_t *softs, struct dma_mem device_ int ret = PQI_STATUS_SUCCESS; ib_queue_t *ib_q = &softs->op_raid_ib_q[PQI_DEFAULT_IB_QUEUE]; - ob_queue_t *ob_q = &softs->op_ob_q[PQI_DEFAULT_IB_QUEUE]; + ob_queue_t const *ob_q = &softs->op_ob_q[PQI_DEFAULT_IB_QUEUE]; rcb_t *rcb = NULL; @@ -740,13 +739,13 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, ret = pqisrc_get_physical_logical_luns(softs, SA_REPORT_PHYS, physical_dev_list, phys_data_length); if (ret) { - DBG_ERR("report physical LUNs failed"); + DBG_ERR("report physical LUNs failed\n"); return ret; } ret = pqisrc_get_physical_logical_luns(softs, SA_REPORT_LOG, logical_dev_list, log_data_length); if (ret) { - DBG_ERR("report logical LUNs failed"); + DBG_ERR("report logical LUNs failed\n"); return ret; } @@ -763,7 +762,7 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, ret = pqisrc_get_queue_lun_list(softs, PQI_LOG_EXT_QUEUE_ENABLE, queue_dev_list, queue_data_length); if (ret) { - DBG_ERR("report logical LUNs failed"); + DBG_ERR("report logical LUNs failed\n"); return ret; } @@ -808,13 +807,13 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, } inline boolean_t -pqisrc_is_external_raid_device(pqi_scsi_dev_t *device) +pqisrc_is_external_raid_device(pqi_scsi_dev_t const *device) { return device->is_external_raid_device; } static inline boolean_t -pqisrc_is_external_raid_addr(uint8_t *scsi3addr) +pqisrc_is_external_raid_addr(uint8_t const *scsi3addr) { return scsi3addr[2] != 0; } @@ -940,12 +939,12 @@ out: /* Validate the RAID map parameters */ static int pqisrc_raid_map_validation(pqisrc_softstate_t *softs, - pqi_scsi_dev_t *device, pqisrc_raid_map_t *raid_map) + pqi_scsi_dev_t const *device, pqisrc_raid_map_t *raid_map) { char *error_msg; uint32_t raidmap_size; uint32_t r5or6_blocks_per_row; -/* unsigned phys_dev_num; */ + /* unsigned phys_dev_num; */ DBG_FUNC("IN\n"); @@ -1033,7 +1032,7 @@ pqisrc_get_device_raidmap(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if (raidmap_reported_size <= raidmap_alloc_size) break; - DBG_NOTE("Raid map is larger than 1024 entries, request once again"); + DBG_NOTE("Raid map is larger than 1024 entries, request once again\n"); os_mem_free(softs, (char*)raid_map, raidmap_alloc_size); raidmap_alloc_size = raidmap_reported_size; @@ -1331,7 +1330,7 @@ pqisrc_get_physical_device_info(pqisrc_softstate_t *softs, /* Function used to find the entry of the device in a list */ static device_status_t pqisrc_scsi_find_entry(pqisrc_softstate_t *softs, - pqi_scsi_dev_t *device_to_find, pqi_scsi_dev_t **same_device) + pqi_scsi_dev_t const *device_to_find, pqi_scsi_dev_t **same_device) { pqi_scsi_dev_t *device; int i; @@ -1361,7 +1360,7 @@ pqisrc_scsi_find_entry(pqisrc_softstate_t *softs, /* Update the newly added devices as existed device */ static void -pqisrc_exist_device_update(pqisrc_softstate_t *softs, +pqisrc_exist_device_update(pqisrc_softstate_t const *softs, pqi_scsi_dev_t *device_exist, pqi_scsi_dev_t *new_device) { DBG_FUNC("IN\n"); @@ -1395,15 +1394,13 @@ pqisrc_exist_device_update(pqisrc_softstate_t *softs, device_exist->offload_config = new_device->offload_config; device_exist->offload_enabled_pending = new_device->offload_enabled_pending; - if (device_exist->offload_to_mirror) - os_mem_free(softs, - (int *) device_exist->offload_to_mirror, - sizeof(*(device_exist->offload_to_mirror))); + if (device_exist->offload_to_mirror) { + device_exist->temp_offload_to_mirror = device_exist->offload_to_mirror; + } device_exist->offload_to_mirror = new_device->offload_to_mirror; - if (device_exist->raid_map) - os_mem_free(softs, - (char *)device_exist->raid_map, - sizeof(*device_exist->raid_map)); + if (device_exist->raid_map) { + device_exist->temp_raid_map = device_exist->raid_map; + } device_exist->raid_map = new_device->raid_map; /* To prevent these from being freed later. */ new_device->raid_map = NULL; @@ -1416,7 +1413,7 @@ static int pqisrc_add_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { DBG_FUNC("IN\n"); - DBG_NOTE("vendor: %s model: %s bus:%d target:%d lun:%d is_physical_device:0x%x expose_device:0x%x volume_offline 0x%x volume_status 0x%x \n", + DBG_NOTE("vendor: %s model: %s B%d:T%d:L%d is_physical_device:0x%x expose_device:0x%x volume_offline 0x%x volume_status 0x%x \n", device->vendor, device->model, device->bus, device->target, device->lun, device->is_physical_device, device->expose_device, device->volume_offline, device->volume_status); device->invalid = false; @@ -1439,7 +1436,7 @@ void pqisrc_remove_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { DBG_FUNC("IN\n"); - DBG_NOTE("vendor: %s model: %s bus:%d target:%d lun:%d is_physical_device:0x%x expose_device:0x%x volume_offline 0x%x volume_status 0x%x \n", *** 1701 LINES SKIPPED *** From nobody Fri Jan 9 18:03:49 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnqQZ4LFhz6B1cW; Fri, 09 Jan 2026 18:03:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnqQZ3gpbz455D; Fri, 09 Jan 2026 18:03:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767981830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8V9xrI5KrqhhWg3RNeNHLd1qG5b6IxLX24TbyPg8Ol8=; b=nU9SJkuSPVLtrcr/gV2E7qglSvVbKvIj5peGK2TXcB3FlizQYiYJbAw8hRn+0RrYh7cAeY Y+rrGRN3jvZA7esHeHNxaYXcrNK1D1qHRyfeiu70e5RyvMf56XavU/TJFynFhVX09Wn6Zj Wt9jh/NymuUfgC/3AVWu2VFoGPX/331Jb2lC6mm7TKd8MoVfQzAqZDYqF5TgSAUvhyEBA0 lJnscZvES4a92IRqEuh2vK1uYtsT4zpMG7a981QUE+39BJYJsH4W2tAVf9XFLpQU21/VmT zqh3edJKJ0B7mKz9YZMQCVjezMCZ/J9iQyJUjMI+Uv80A8g6lehuWLXaHQRXuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767981830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8V9xrI5KrqhhWg3RNeNHLd1qG5b6IxLX24TbyPg8Ol8=; b=c+xP7gS/fL16vE8YwO1gOPzo3nERjqp+ujaMd5npknhgUY6bY14GT01Z210KA+5/veEVeb jT66gfbYPcfr+QpjoaL7MHJ+dI9usXjWxJw1+P0RH5yrikmtwX0DcmfF7IDDVspE5ozVEN wOkNTJ88RIjSJW8bXg5JTnZx/SbBomy0cL5QG1nlfyf2u6w7SgjZ+grci/UsdaOI5kgGaY oaTOa032KtLNcZ+Ye5Pxp/BRWy8FGQH51JrICMng1Ni14s2Se16Pau+sA/yw5zVW7gjp// GJhaVmpJdjC02vn0XkckdcfCjSWDTOO79cD2qOlaQVnfIdq1kNHE2tI/vVo/MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767981830; a=rsa-sha256; cv=none; b=rxEMQTKd2FkLZgKRC1Srpa+TvHGlbkn7FeTpvw387f/GiVVatxCTBrsxIgWqK9S6/2Cv+F SvOkVMz/ncucCrjUDouioWmqlf3Sj5TsuZTttUqblqcKvghu3tluIgZA8NTC3Hu90VuUCI bAxVdu2UV4X7LCUXTyjRqEAllliYoq0e8d3Drle/NLw2y3lI6OXWEluxYQj2w+Zts7dneq HAx4F5gMP/sBsG8EfZN28M2fOxOzpggj+u1MPlklpXNUK74o7/5Z25GnZFJUDYZom6LVX+ eMIw6N6djp1KzN6WuCgUzwLAWwrutjCZysHfxpirqRCO3tqq/S9dtqnjEZs6GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:5495:3690:ffdd:8044] (unknown [IPv6:2601:5c0:4202:5670:5495:3690:ffdd:8044]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dnqQZ1kw7z78G; Fri, 09 Jan 2026 18:03:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Fri, 9 Jan 2026 13:03:49 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 67599eef01f5 - main - sys/x86/NOTES: Add vt_efifb Content-Language: en-US To: Olivier Certner , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/9/26 11:35, Olivier Certner wrote: > The branch main has been updated by olce: > > URL: https://cgit.FreeBSD.org/src/commit/?id=67599eef01f5417715f673ec81fc1467917c7a10 > > commit 67599eef01f5417715f673ec81fc1467917c7a10 > Author: Olivier Certner > AuthorDate: 2026-01-09 16:23:59 +0000 > Commit: Olivier Certner > CommitDate: 2026-01-09 16:34:56 +0000 > > sys/x86/NOTES: Add vt_efifb > > Contrary to what is stated in commit f224591746bd ("Add ASMC_DEBUG make > option"), the various NOTES files should list all available options. > > Since vt_efifb is supported also on i386, add it back to x86/NOTES > instead of amd64/NOTES. > > Fixes: f224591746bd ("Add ASMC_DEBUG make option") > Sponsored by: The FreeBSD Foundation While it is correct to put this back in NOTES (and the original commit was wrong to remove it, and also wrong to mix it in with another change), I'm pretty sure we don't support booting from EFI on i386, only amd64, so vt_efifb can't possibly work on i386, only on amd64? -- John Baldwin From nobody Fri Jan 9 19:56:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnswh3yDnz6B8dh for ; Fri, 09 Jan 2026 19:56:36 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-dy1-x1332.google.com (mail-dy1-x1332.google.com [IPv6:2607:f8b0:4864:20::1332]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnswg6Z19z3GHg for ; Fri, 09 Jan 2026 19:56:30 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-dy1-x1332.google.com with SMTP id 5a478bee46e88-2b053ec7d90so3956459eec.0 for ; Fri, 09 Jan 2026 11:56:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767988588; x=1768593388; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IxwQWgXfVTHR+TeNhUMR0siR/6YBm5/U0Pmu1V3u3Pg=; b=c5b39V0ZKaO0d7czEwm+DeWr0UR/1a/tTAlC4wVkOSMQze7bSfmhD5wv22VxB3SCYS SmOmXpexFyYtXyW0DV+71O8XGAbpE0KEKQggz5NBOLPDFlO6+vGR+FFrJk+USNdxo09o ZE8mcEMw2jgTalV0tkhi6Q1lemiD70lhgpr/mDpE2L/SSLqVwzm0zeFK5KvK75X2olfm +pdLaS4lYqluGtOII5mZmIWO4KG86IwztKiWXC2EI/IW9SZVkfS/kODkMIX1orLlSJxQ hSA5FL/fiZG0RdQ+tnSa5oESyVno8AgfQ4+cRXgxtHRiC/pb8x4YTgeJIWtDbFAJAOPX ZMuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767988588; x=1768593388; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IxwQWgXfVTHR+TeNhUMR0siR/6YBm5/U0Pmu1V3u3Pg=; b=AHvP1uOb9dYQZ/22sO/vRDeXutg4L5QwgMWKgt+zXjaiswJS3cE2b4xaNVPPL2qz/R OGQR17UPt3TV48S7HZP0x9GA9frH7BUMhB1q4SWYoSTs4ZoW26ZgYhjbKkgmjSZSTNrL O1sGNP3uiDOaV5unz8cYlNFLUoyzsBE0OVZNVgSCgJQyIw9l7qxLljKJgxjGIzSRM5sy RAfqHV51WxjDaLLn8POwGJnJs+Ei5FtTe9Qso7HZn3Huu08uRe10LfEURUZ2bp4MphO9 S9njsWTo7rIEazv64xb/I0TL3jkPv+Qbie79xttq3uESP14YQdWwdgiW4qNMuhapsqUD fFiA== X-Forwarded-Encrypted: i=1; AJvYcCXrTfypIdbydoUUHg2MjjrAfoFe/8oh580xOHCLYNsjI8f5Kp9VNKzDyjNtoZIliDDdM2zo3H+Toon8J0JQkIhf42d7Qg==@freebsd.org X-Gm-Message-State: AOJu0YxIp4EyzRMmLZ9DldQGImUt6wUavfM2UYgu3mQvaWhgn2QEeYfW gXJ2xHzACvjZF5WjWmxqx7caIDnseZFyHME9jdzIAJWFAZrLQC3XU0iSNgJ9AdrVDCqFva6vHnC t5/Gl3T3TBh5m6jTtYyu56kJffMDlTFERrleDWVw= X-Gm-Gg: AY/fxX7a9JcJKMh2BKzswH9H2HguBjsXOKIDEhXxH5NHJzU5LOPpNH7fa05kfqKZ0QW 52yIQD6Zxf1+rENplXB8JvIJiYuPpQi+j3Qz9CFwkzde6QUW3rDIPvLZWyGDm6CVe8dg/OJQrir fIVfT/mpwWCHkYESIXN0goZfAGA+m2JOwvprpmxthwD+ee7ijpAqo73TptlKpRiOMe/feVjEgoI 9IvLDQ5TDbxv9U7xsrHS4K7ASRbmhBaEr2jWIe/ZiFQxLI8qqUv4PQSdC4hgUrSvr8vOtcF X-Google-Smtp-Source: AGHT+IHuF2X10lqh6rDdU8Arc6x3QWxRt4IfQsSzkZU6gyidqv3fsZvLpqt3AVK1puohRZaEOpIhSbELHJ6Fed81Z3g= X-Received: by 2002:a05:7300:3724:b0:2b0:2e5:228b with SMTP id 5a478bee46e88-2b17d2d5e9emr8229423eec.33.1767988587498; Fri, 09 Jan 2026 11:56:27 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> In-Reply-To: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> From: Benjamin Kaduk Date: Fri, 9 Jan 2026 11:56:15 -0800 X-Gm-Features: AZwV_Qh-iLu5q_2mR7BWQfYJguJR_r1uhFbggLVsGmhcf6iqJPQeQkzJ1IKhFqE Message-ID: Subject: Re: git: a6d57f312f18 - main - nfsd: Fix handling of hidden/system during Open/Create To: Rick Macklem Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b98fa10647f9eb47" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dnswg6Z19z3GHg --000000000000b98fa10647f9eb47 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 8, 2026 at 4:33=E2=80=AFPM Rick Macklem = wrote: > The branch main has been updated by rmacklem: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Da6d57f312f18bbeeda8a34e99d0a662= b0db9a190 > > commit a6d57f312f18bbeeda8a34e99d0a662b0db9a190 > Author: Rick Macklem > AuthorDate: 2026-01-08 16:27:32 +0000 > Commit: Rick Macklem > CommitDate: 2026-01-08 16:27:32 +0000 > > nfsd: Fix handling of hidden/system during Open/Create > > When an NFSv4.n client specifies settings for the archive, > hidden and/or system attributes during a Open/Create, the > Open/Create fails for ZFS. This is caused by ZFS doing > a secpolicy_xvattr() call, which fails for non-root. > If this check is bypassed, ZFS panics. > > This patch resolves the problem by disabling va_flags > for the VOP_CREATE() call in the NFSv4.n server and > then setting the flags with a subsequent VOP_SETATTR(). > > The diff doesn't really include enough context to tell -- does this introduce a race window where a file that's supposed to be hidden and/or system is visible without that attribute from a different process? Thanks, Ben --000000000000b98fa10647f9eb47 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jan 8, 2026 at 4:33=E2=80=AFPM Ri= ck Macklem <rmacklem@freebsd.org= > wrote:
The branch main has been updat= ed by rmacklem:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3Da6d57f312f18bbeeda8a34e99d0a662b0db9a190
commit a6d57f312f18bbeeda8a34e99d0a662b0db9a190
Author:=C2=A0 =C2=A0 =C2=A0Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2026-01-08 16:27:32 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-01-08 16:27:32 +0000

=C2=A0 =C2=A0 nfsd: Fix handling of hidden/system during Open/Create

=C2=A0 =C2=A0 When an NFSv4.n client specifies settings for the archive, =C2=A0 =C2=A0 hidden and/or system attributes during a Open/Create, the
=C2=A0 =C2=A0 Open/Create fails for ZFS.=C2=A0 This is caused by ZFS doing<= br> =C2=A0 =C2=A0 a secpolicy_xvattr() call, which fails for non-root.
=C2=A0 =C2=A0 If this check is bypassed, ZFS panics.

=C2=A0 =C2=A0 This patch resolves the problem by disabling va_flags
=C2=A0 =C2=A0 for the VOP_CREATE() call in the NFSv4.n server and
=C2=A0 =C2=A0 then setting the flags with a subsequent VOP_SETATTR().

The diff doesn't really include enou= gh context to tell -- does this introduce a race window where a file that&#= 39;s supposed to be hidden and/or system is visible without that attribute = from a different process?

Thanks,

Ben=C2=A0
--000000000000b98fa10647f9eb47-- From nobody Fri Jan 9 20:13:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntJF3JMjz6B9GP for ; Fri, 09 Jan 2026 20:13: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntJF0RyPz3Hqg for ; Fri, 09 Jan 2026 20:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KIW8FF7TP0tZmlN+GHyjoYawGm9VilYb/fj+cCpqMQ=; b=MbhkI748aaGAlqUIq7pGqnnGl6qkoVnK2CuF+cB/7ml67GPTyhg+1UPKXizcLt9elm2brX Ww9b5X/eOpiV7xSPOdW5SwXlKqD2NFli9D66+MU+BNI9NhmHIVWt946ZdsPy5Lj/qS0a71 ZZtNAv15n+8Ns2z1fR7GXzJ5I9/83rGiNjZkKQTyeDOV8aE+xvJBfRCxChQEwz0ksaz+YT 2fSBjfdeIKG2LjMpEJMiN44jntvZa6fZ1bDaDUyScnuznxPT+9anZPkXdsh3TNTTe3og8n G5G7bDy8QBXG4BO2XQDfFbZtUmY2eMQapBW5SOchblecxHVe3XcZnZbjtbneuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KIW8FF7TP0tZmlN+GHyjoYawGm9VilYb/fj+cCpqMQ=; b=hO+WPGhWCcWUsQfdlGeZEvMuhyrp1xRkg7zfvg4fpVAszb+cGSEEjcQ34zXF4MUn8kCN8Z GWONItKC+DR827g4y8M6nBdc/M/YcdNQtXNK8+3xoVocHx7tzr1g81MZlXY3wmgIe4yjQ3 Z6QX+AP/VajIBX3sbhh3FMycupq3kbBgy1kOjlMXlWk43/L0QxBXQ4rYA1uCNDnE+h65/v Bvnfn4yjNpW2qE8CTymJ1HIHw1Cb2QekrfAE6M5qf+cqbCoL8B5pH/EaPzWsSE9+9fb52n wZblkqosBS/UcOV0KQTXh3ltIXR5xxKMbuIBO+KYEGDa410esnbDjM98vtRiSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989613; a=rsa-sha256; cv=none; b=qtOIIDm9Kcg2EXCcviR6uv/ThwzQYhsUPLB8Y+RfJHCgB4UfEOy5UY2r0Ijyi+DMrV5uDV 69lvnPAC0ER1aGQ5eCNQLA4YeszH2WvtxPu1zWqIb8Z+Z801HkDSxswKSFf5sqQ5HpBQgI TMBpbzbONECWdYiKW8/Ld8isZATzC7/Nt60D4h/GrJUW0MIrtkYBe+JkH6/crM0e2FIEOT MkOOJ38Ml6SRhl4CfYjz67JElyNZFwGeg2D76tSLR4h8/hFWNRcKjfkDMLg4MlTmPAY7TV 30lTsig6myMJql4WuxCrCjsAMeAmOJ6DkKJ8G+gallZJx7VtKlKadULc7Uhk+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntJF02PLz7bW for ; Fri, 09 Jan 2026 20:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 84d8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:13:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: 81516ef418a7 - main - param.h: remove powerpcspe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81516ef418a7b3fb23b423b62dc1f2a5a3bde51b Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:13:33 +0000 Message-Id: <6961616d.84d8.4dbc884c@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=81516ef418a7b3fb23b423b62dc1f2a5a3bde51b commit 81516ef418a7b3fb23b423b62dc1f2a5a3bde51b Author: Minsoo Choo AuthorDate: 2025-12-03 04:00:39 +0000 Commit: Ed Maste CommitDate: 2026-01-09 20:11:22 +0000 param.h: remove powerpcspe Signed-off-by: Minsoo Choo Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1914 (cherry picked from commit 1bfae8b50814697ac12bc8879ad8013e7ffd77b2) --- sys/powerpc/include/param.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h index a190f60c02cc..a154859c0459 100644 --- a/sys/powerpc/include/param.h +++ b/sys/powerpc/include/param.h @@ -57,13 +57,9 @@ #define MACHINE_ARCH "powerpc64" #endif #else -#ifdef __SPE__ -#define MACHINE_ARCH "powerpcspe" -#else #define MACHINE_ARCH "powerpc" #endif #endif -#endif #define MID_MACHINE MID_POWERPC #ifdef __powerpc64__ #ifndef MACHINE_ARCH32 From nobody Fri Jan 9 20:13:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntJG2vcXz6B99S for ; Fri, 09 Jan 2026 20:13: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntJG0xRdz3HY3 for ; Fri, 09 Jan 2026 20:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=amwu1G5YBJQaORU9PhML46aHmKS0zBYT7xD1ljZoMqA=; b=KI+7bmP0NqX3RmjRc2lDu7XJrVBooEq0RJPh02TzEwMEO2iwA4eTh9uDToBasj9uzL71ex EsJpLMdeUXdDwgrv/6UYjxOvMAqqr6TK9DGkFHNp1wJ2FimOMtYQkkcQ9sMf/OYkPF1Ue2 U4nTNnzln6gaJCnK6LrI7lkSC8+/pKEBA8pnYV8KE2FMRqFBnanEkHhcMRgKam0DQUCEGt tbqYbkd//6gupQPN5Xi6PJe0PZ1iZ9Bh9vZuebi1pwKI/lGDFGevRAPJ1UANIquiYE3sYB 0CJgYsaFOkfk42vmqBsV5ALWxDdhDFUUU347DFy6+hBIp0K42O0IuCoAmbqm8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=amwu1G5YBJQaORU9PhML46aHmKS0zBYT7xD1ljZoMqA=; b=yaxVCM6ZfH0l/BfLQAS/8KSbq3bjcpLzYbad03eWSDCJHzmoscmfC4cKXwpExms/1xjn+L Jo7g+z7rufyMNONkWcaczjTol2tapVzlhnIUuAWIO6Di3C1/vuQUvdY79Aejx/3uyTPRw3 5zCkAtf5kpIiP9sB+CgApH/ltrS5B7MKM7XBEJn7lkOBQGwml6h1ocNfLhAaChLWSqFaYU vdsheS4e2RB+guDPWHHfiGDkD4GhPNOgRKE0vC8HQguDfbLpiAQxgyWZTlCHPDraLlqixV rLSYxj/aSHAJA5jmD9l56Ob3WrJL1Qv4IZl8sD6Wq9DkIJqV34fe4cBQKfZKTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989614; a=rsa-sha256; cv=none; b=yIbJMT0yZvVWkkw6zG9OhEA/L1NVzJgHJ3xdMi9z1YL8m2rKY1yWDX6R6NVwNRT0TcCbR2 3D4s4Anj1GtqMPXO1j/oun9EHHNr2wpdAEcvite/NhV3VttVxCY3TwGtlMSHwkBbkERGVH ZlQ6RUZkSRSS+SO7OEhoGOycHN2vWmaEbE8FbrbQC8hbYB7HQ7y0DDYzY1k/DMofKz/G/+ owJwVmDnCIXScLfuuG3/WsAkvto7Ko+TxROU7/OCxZ/fBNVcT06gUkrL1YRGMlrwfQaPiX jEddFbzZobN+GT/UII2J0ylPJLLg/SeAXlxf4ey0jaSIPvNBcsNbiSoM7yoSTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntJG0T5hz7v4 for ; Fri, 09 Jan 2026 20:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4617f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:13:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: f69fb0f8307e - main - conf: remove MPC85XXSPE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f69fb0f8307e472e79f34ed7622b85ecb4c3c66d Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:13:34 +0000 Message-Id: <6961616e.4617f.2c1e66a3@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f69fb0f8307e472e79f34ed7622b85ecb4c3c66d commit f69fb0f8307e472e79f34ed7622b85ecb4c3c66d Author: Minsoo Choo AuthorDate: 2025-12-03 04:01:00 +0000 Commit: Ed Maste CommitDate: 2026-01-09 20:11:22 +0000 conf: remove MPC85XXSPE Signed-off-by: Minsoo Choo Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1914 (cherry picked from commit 40a49bccf388494f9685a81cfa781050f5f8bb1f) --- sys/powerpc/conf/MPC85XXSPE | 151 -------------------------------------------- 1 file changed, 151 deletions(-) diff --git a/sys/powerpc/conf/MPC85XXSPE b/sys/powerpc/conf/MPC85XXSPE deleted file mode 100644 index ca828137ed72..000000000000 --- a/sys/powerpc/conf/MPC85XXSPE +++ /dev/null @@ -1,151 +0,0 @@ -# -# Custom kernel for Freescale MPC85XX development boards like the CDS etc. -# -# - -cpu BOOKE -cpu BOOKE_E500 -ident MPC85XXSPE - -machine powerpc powerpcspe - -include "dpaa/config.dpaa" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions WITH_CTF=1 - -options FPU_EMU -options MAXCPU=2 - -options _KPOSIX_PRIORITY_SCHEDULING -options ALT_BREAK_TO_DEBUGGER -options BREAK_TO_DEBUGGER -options BOOTP -options BOOTP_NFSROOT -#options BOOTP_NFSV3 -options CD9660 -options COMPAT_43 -options DDB -#options DEADLKRES -options DEVICE_POLLING -#options DIAGNOSTIC -options FDT -#makeoptions FDT_DTS_FILE=mpc8555cds.dts -options FFS -options GDB -options GEOM_PART_GPT -options GEOM_LABEL # Provides labelization -options VIMAGE -options INET -options INET6 -options TCP_HHOOK # hhook(9) framework for TCP -options INVARIANTS -options INVARIANT_SUPPORT -options KDB -options KTRACE -options MD_ROOT -options MPC85XX -options MSDOSFS -options NFS_ROOT -options NFSCL -options NFSLOCKD -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options PROCFS -options PSEUDOFS -options SCHED_ULE -options CAPABILITIES -options CAPABILITY_MODE -options SMP -options SYSVMSG -options SYSVSEM -options SYSVSHM -options WITNESS -options WITNESS_SKIPSPIN - -# The powerpcspe target arch can run non Altivec/VMX powerpc binaries -# Keep COMPAT options in sync with powerpc target arch. -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 -options COMPAT_FREEBSD10 # Compatible with FreeBSD10 -options COMPAT_FREEBSD11 # Compatible with FreeBSD11 -options COMPAT_FREEBSD12 # Compatible with FreeBSD12 -options COMPAT_FREEBSD13 # Compatible with FreeBSD13 -options COMPAT_FREEBSD14 # Compatible with FreeBSD14 - -options HWPMC_HOOKS -options KDTRACE_HOOKS # Kernel DTrace hooks -options DDB_CTF # Kernel ELF linker loads CTF data - -device ata -device bpf -device cfi -device cpufreq -device crypto -device cryptodev -device da -device ds1307 -device ds1553 -device iflib -device em -device alc -device ether -device fxp -device gpio -device gpiopower -device iic -device iicbus -#device isa -device loop -device md -device miibus -device mmc -device mmcsd -device pass -device pci -device quicc -#device rl -device scbus -device scc -device sdhci -device sec -device spibus -device spigen -device tsec -device dpaa -device tuntap -device uart -options USB_DEBUG # enable debug msgs -#device uhci -device ehci -device hkbd -device ukbd -device hms -device ums -device umass -device usb -device usbhid -device vlan - -# VirtIO support -device virtio # Generic VirtIO bus (required) -device virtio_pci # VirtIO PCI device -device vtnet # VirtIO Ethernet device -device virtio_blk # VirtIO Block device -device virtio_scsi # VirtIO SCSI device -device virtio_balloon # VirtIO Memory Balloon device - -# P1022 DIU -device diu -device videomode -device vt -device fbd - -# evdev interface -options EVDEV_SUPPORT # evdev support in legacy drivers -device evdev # input event device support -device uinput # install /dev/uinput cdev - -# HID support -options HID_DEBUG # enable debug msgs -device hid # Generic HID support -device hidbus # Generic HID bus From nobody Fri Jan 9 20:13:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntJH3dsDz6B9Mv for ; Fri, 09 Jan 2026 20:13: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntJH1Zcqz3Hw8 for ; Fri, 09 Jan 2026 20:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4VDKtUfCLWxIjVeig7/0gnN/qIRVs4mgS7rKONAsU1Y=; b=UxiFFSfXwEkbdBUlOx618pYO15md0QzGOZqbZ0D8/mQuZqRPj+XlVshS8dk6HUP2kgrmFi KfjiIoCPCsjzW0x40JVUUFT0nqZThi7USAj7YN6PeZ95IJ4bMSu7vydnfkof8AdEiRITfQ YNunhsbbtxzkimKDdYnCI4nOcc6OrVYqNludq2iehLYAc5C6uU3cTAQJB8w+pZqFBfRm11 roxBJe7dOz3ZfqqdUw/KsnSkBFe4AQ4g7jMZb6Mp77a9PqkUasLxJHmdfB8GswsjicUfm4 2NOgdXgUQkhd3j4+W+8A4hg1x1S1WUrNhb47u81RKVMrAMGIvuABa2yEdplqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4VDKtUfCLWxIjVeig7/0gnN/qIRVs4mgS7rKONAsU1Y=; b=iYkd5AP81NRzlJl06uTKCg1JVZBq8MyGszo1yjOMCYLzheZW5iLSculf5sJLPO3SJZsHs6 DVQ3rxsLcUrcE9+OfH6O3b8wYH5QXyuCM4WduDRjwF0Bwi2hLu5arlCGUu4Z7HNjqK8aWN lj3ZiRGNoIFhJqJOhh/jtm9MYl/2PnkJqdVs1+IfbR9pIiLlyZQJXtBONjR+kUdSZSGK4P fVQNmGd9Rv3GtiK7qVgBVwCSaDU8bFuVbqJ+NLMFF81i+aF7W6nkjBF9SjlqXYfGIS0yyO +aE/5YzS2/TawJkWc43/1tKJKQ0acD7lrFo4qmZCBmban0cRdz+AQgzRnFf0Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989615; a=rsa-sha256; cv=none; b=fBv/O6c/tHoUiR7O/q4JPO+rUCwUj3n/JTkJ6NW2oHb6R7SDcKuLWbzlb08yvHlRsZ4VZN ln6xT+I83Jp4Sdk7ZTuL0iRPhpnL92TB5i5UeDa6C91lfYxIwCdHgM2v//hUKAEAhnsgnW NFSG0gTdKz4//4ZxFcUV4V8WTg6DcdWKSAoGnf0TiujFQGsuglzChEGOaQkD561aFHXZRp lwzut9MwbiHuYpKgb06v9Qucp3iI9R23i88RjJ5FtgdDeGF8iQn7IU+Z1NrupQu5xc7yqa DS8dj/cKXEPehZ/04mMT3AhgGG4mao+f1i1gHE7lEjyQIKCVTWZTfu2kMevksQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntJH12vJz7bB for ; Fri, 09 Jan 2026 20:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8363 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:13:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: c5d4a124d093 - main - conf: remove powerpcspe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5d4a124d093f11784833f25d1332a54465678fb Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:13:35 +0000 Message-Id: <6961616f.8363.487560a9@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c5d4a124d093f11784833f25d1332a54465678fb commit c5d4a124d093f11784833f25d1332a54465678fb Author: Minsoo Choo AuthorDate: 2025-12-03 04:06:10 +0000 Commit: Ed Maste CommitDate: 2026-01-09 20:11:22 +0000 conf: remove powerpcspe Signed-off-by: Minsoo Choo Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1914 (cherry picked from commit 4a5a1c17ac43356fae053524187bb16f8fc1ac70) --- sys/conf/files.powerpc | 51 ++-- sys/conf/ldscript.powerpcspe | 143 --------- sys/conf/options.powerpc | 1 - sys/powerpc/booke/spe.c | 685 ------------------------------------------- 4 files changed, 25 insertions(+), 855 deletions(-) diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 0deada385f31..7989f1c9bea4 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -75,7 +75,7 @@ crypto/openssl/powerpc64/sha512p8-ppc.S optional ossl powerpc64 crypto/openssl/powerpc64/vpaes-ppc.S optional ossl powerpc64 crypto/openssl/powerpc64/x25519-ppc64.S optional ossl powerpc64 -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs powerpc | dtrace powerpc | zfs powerpcspe | dtrace powerpcspe compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs powerpc | dtrace powerpc compile-with "${ZFS_C}" cddl/dev/dtrace/powerpc/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" @@ -235,25 +235,25 @@ dev/tsec/if_tsec_fdt.c optional tsec dev/uart/uart_cpu_powerpc.c optional uart dev/usb/controller/ehci_fsl.c optional ehci mpc85xx dev/vt/hw/ofwfb/ofwfb.c optional vt aim -kern/subr_atomic64.c optional powerpc | powerpcspe +kern/subr_atomic64.c optional powerpc kern/subr_dummy_vdso_tc.c standard kern/subr_sfbuf.c standard -libkern/ashldi3.c optional powerpc | powerpcspe -libkern/ashrdi3.c optional powerpc | powerpcspe +libkern/ashldi3.c optional powerpc +libkern/ashrdi3.c optional powerpc libkern/bcopy.c standard -libkern/cmpdi2.c optional powerpc | powerpcspe -libkern/divdi3.c optional powerpc | powerpcspe -libkern/lshrdi3.c optional powerpc | powerpcspe +libkern/cmpdi2.c optional powerpc +libkern/divdi3.c optional powerpc +libkern/lshrdi3.c optional powerpc libkern/memcmp.c standard libkern/memset.c standard -libkern/moddi3.c optional powerpc | powerpcspe -libkern/qdivrem.c optional powerpc | powerpcspe +libkern/moddi3.c optional powerpc +libkern/qdivrem.c optional powerpc libkern/strcmp.c standard libkern/strlen.c standard libkern/strncmp.c standard -libkern/ucmpdi2.c optional powerpc | powerpcspe -libkern/udivdi3.c optional powerpc | powerpcspe -libkern/umoddi3.c optional powerpc | powerpcspe +libkern/ucmpdi2.c optional powerpc +libkern/udivdi3.c optional powerpc +libkern/umoddi3.c optional powerpc powerpc/aim/locore.S optional aim no-obj powerpc/aim/aim_machdep.c optional aim powerpc/aim/mmu_oea.c optional aim powerpc @@ -263,29 +263,28 @@ powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim powerpc/aim/slb.c optional aim powerpc64 | aim powerpc64le powerpc/amigaone/platform_amigaone.c optional amigaone -powerpc/amigaone/cpld_a1222.c optional powerpc amigaone | powerpcspe amigaone -powerpc/amigaone/cpld_x5000.c optional powerpc amigaone | powerpc64 amigaone +powerpc/amigaone/cpld_a1222.c optional powerpc amigaone +powerpc/amigaone/cpld_x5000.c optional powerpc amigaone powerpc/booke/locore.S optional booke no-obj powerpc/booke/booke_machdep.c optional booke powerpc/booke/machdep_e500.c optional booke_e500 powerpc/booke/mp_cpudep.c optional booke smp powerpc/booke/platform_bare.c optional booke powerpc/booke/pmap.c optional booke -powerpc/booke/spe.c optional powerpcspe powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/mpc85xx_jog.c optional cpufreq mpc85xx powerpc/cpufreq/pcr.c optional cpufreq aim powerpc/cpufreq/pmcr.c optional cpufreq aim powerpc64 | cpufreq aim powerpc64le powerpc/cpufreq/pmufreq.c optional cpufreq aim pmu -powerpc/fpu/fpu_add.c optional fpu_emu | powerpcspe -powerpc/fpu/fpu_compare.c optional fpu_emu | powerpcspe -powerpc/fpu/fpu_div.c optional fpu_emu | powerpcspe +powerpc/fpu/fpu_add.c optional fpu_emu +powerpc/fpu/fpu_compare.c optional fpu_emu +powerpc/fpu/fpu_div.c optional fpu_emu powerpc/fpu/fpu_emu.c optional fpu_emu -powerpc/fpu/fpu_explode.c optional fpu_emu | powerpcspe -powerpc/fpu/fpu_implode.c optional fpu_emu | powerpcspe -powerpc/fpu/fpu_mul.c optional fpu_emu | powerpcspe +powerpc/fpu/fpu_explode.c optional fpu_emu +powerpc/fpu/fpu_implode.c optional fpu_emu +powerpc/fpu/fpu_mul.c optional fpu_emu powerpc/fpu/fpu_sqrt.c optional fpu_emu -powerpc/fpu/fpu_subr.c optional fpu_emu | powerpcspe +powerpc/fpu/fpu_subr.c optional fpu_emu powerpc/mambo/mambocall.S optional mambo powerpc/mambo/mambo.c optional mambo powerpc/mambo/mambo_console.c optional mambo @@ -358,7 +357,7 @@ powerpc/powernv/platform_powernv.c optional powernv powerpc/powernv/powernv_centaur.c optional powernv powerpc/powernv/powernv_xscom.c optional powernv powerpc/powernv/xive.c optional powernv -powerpc/powerpc/altivec.c optional !powerpcspe +powerpc/powerpc/altivec.c standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bus_machdep.c standard powerpc/powerpc/busdma_machdep.c standard @@ -371,7 +370,7 @@ powerpc/powerpc/db_hwwatch.c optional ddb powerpc/powerpc/db_interface.c optional ddb powerpc/powerpc/db_trace.c optional ddb powerpc/powerpc/dump_machdep.c standard -powerpc/powerpc/elf32_machdep.c optional powerpc | powerpcspe | compat_freebsd32 +powerpc/powerpc/elf32_machdep.c optional powerpc | compat_freebsd32 powerpc/powerpc/elf64_machdep.c optional powerpc64 | powerpc64le powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c standard @@ -393,9 +392,9 @@ powerpc/powerpc/ptrace_machdep.c standard powerpc/powerpc/sc_machdep.c optional sc powerpc/powerpc/sdt_machdep.c optional powerpc64 kdtrace_hooks powerpc/powerpc/setjmp.S standard -powerpc/powerpc/sigcode32.S optional powerpc | powerpcspe | compat_freebsd32 +powerpc/powerpc/sigcode32.S optional powerpc | compat_freebsd32 powerpc/powerpc/sigcode64.S optional powerpc64 | powerpc64le -powerpc/powerpc/swtch32.S optional powerpc | powerpcspe +powerpc/powerpc/swtch32.S optional powerpc powerpc/powerpc/swtch64.S optional powerpc64 | powerpc64le powerpc/powerpc/stack_machdep.c optional ddb | stack powerpc/powerpc/support.S optional powerpc64 | powerpc64le | booke diff --git a/sys/conf/ldscript.powerpcspe b/sys/conf/ldscript.powerpcspe deleted file mode 100644 index fa82cbe8330f..000000000000 --- a/sys/conf/ldscript.powerpcspe +++ /dev/null @@ -1,143 +0,0 @@ -OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", - "elf32-powerpc-freebsd") -OUTPUT_ARCH(powerpc) -ENTRY(__start) -SEARCH_DIR(/usr/lib); -PROVIDE (__stack = 0); -PHDRS -{ - kernel PT_LOAD; - dynamic PT_DYNAMIC; -} -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - - . = kernbase + SIZEOF_HEADERS; - PROVIDE (begin = . - SIZEOF_HEADERS); - - .text : - { - *(.glink) - *(.text) - *(.stub) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t*) - } :kernel =0 - _etext = .; - PROVIDE (etext = .); - - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rela.text : - { *(.rela.text) *(.rela.gnu.linkonce.t*) } - .rela.data : - { *(.rela.data) *(.rela.gnu.linkonce.d*) } - .rela.rodata : - { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } - .rela.got : { *(.rela.got) } - .rela.got1 : { *(.rela.got1) } - .rela.got2 : { *(.rela.got2) } - .rela.ctors : { *(.rela.ctors) } - .rela.dtors : { *(.rela.dtors) } - .rela.init : { *(.rela.init) } - .rela.fini : { *(.rela.fini) } - .rela.bss : { *(.rela.bss) } - .rela.plt : { *(.rela.plt) } - .rela.sdata : { *(.rela.sdata) } - .rela.sbss : { *(.rela.sbss) } - .rela.sdata2 : { *(.rela.sdata2) } - .rela.sbss2 : { *(.rela.sbss2) } - - .init : { *(.init) } =0 - .fini : { *(.fini) } =0 - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } - .rodata1 : { *(.rodata1) } - .note.gnu.build-id : { - PROVIDE (__build_id_start = .); - *(.note.gnu.build-id) - PROVIDE (__build_id_end = .); - } - .sdata2 : { *(.sdata2) } - .sbss2 : { *(.sbss2) } - /* Adjust the address for the data segment to the next page up. */ - . = ((. + 0x1000) & ~(0x1000 - 1)); - .data : - { - *(.data) - *(.gnu.linkonce.d*) - CONSTRUCTORS - } - .data1 : { *(.data1) } - .got1 : { *(.got1) } - . = ALIGN(4096); - .got : { *(.got) } - .got.plt : { *(.got.plt) } - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) - KEEP (*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - } - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*))) - KEEP (*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - } - .dynamic : { *(.dynamic) } :kernel :dynamic - /* Put .ctors and .dtors next to the .got2 section, so that the pointers - get relocated with -mrelocatable. Also put in the .fixup pointers. - The current compiler no longer needs this, but keep it around for 2.7.2 */ - PROVIDE (_GOT2_START_ = .); - .got2 : { *(.got2) } :kernel - PROVIDE (__CTOR_LIST__ = .); - .ctors : { *(.ctors) } - PROVIDE (__CTOR_END__ = .); - PROVIDE (__DTOR_LIST__ = .); - .dtors : { *(.dtors) } - PROVIDE (__DTOR_END__ = .); - PROVIDE (_FIXUP_START_ = .); - .fixup : { *(.fixup) } - PROVIDE (_FIXUP_END_ = .); - PROVIDE (_GOT2_END_ = .); - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } - _edata = .; - PROVIDE (edata = .); - .sbss : - { - PROVIDE (__sbss_start = .); - *(.sbss) - *(.scommon) - *(.dynsbss) - PROVIDE (__sbss_end = .); - } - .plt : { *(.plt) } - .bss : - { - PROVIDE (__bss_start = .); - *(.dynbss) - *(.bss) - *(COMMON) - } - _end = . ; - PROVIDE (end = .); - - /* Debug */ - INCLUDE debuginfo.ldscript - - .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } - /DISCARD/ : { *(.note.GNU-stack) } -} - diff --git a/sys/conf/options.powerpc b/sys/conf/options.powerpc index a6096d1b32ca..c8ab0e066f49 100644 --- a/sys/conf/options.powerpc +++ b/sys/conf/options.powerpc @@ -8,7 +8,6 @@ CELL POWERPC POWERPC64 POWERPC64LE -POWERPCSPE FPU_EMU diff --git a/sys/powerpc/booke/spe.c b/sys/powerpc/booke/spe.c deleted file mode 100644 index e10392508e4e..000000000000 --- a/sys/powerpc/booke/spe.c +++ /dev/null @@ -1,685 +0,0 @@ -/*- - * Copyright (C) 1996 Wolfgang Solfrank. - * Copyright (C) 1996 TooLs GmbH. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. - * - * $NetBSD: fpu.c,v 1.5 2001/07/22 11:29:46 wiz Exp $ - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -void spe_handle_fpdata(struct trapframe *); -void spe_handle_fpround(struct trapframe *); -static int spe_emu_instr(uint32_t, struct fpemu *, struct fpn **, uint32_t *); - -static void -save_vec_int(struct thread *td) -{ - int msr; - struct pcb *pcb; - - pcb = td->td_pcb; - - /* - * Temporarily re-enable the vector unit during the save - */ - msr = mfmsr(); - mtmsr(msr | PSL_VEC); - - /* - * Save the vector registers and SPEFSCR to the PCB - */ -#define EVSTDW(n) __asm ("evstdw %1,0(%0)" \ - :: "b"(pcb->pcb_vec.vr[n]), "n"(n)); - EVSTDW(0); EVSTDW(1); EVSTDW(2); EVSTDW(3); - EVSTDW(4); EVSTDW(5); EVSTDW(6); EVSTDW(7); - EVSTDW(8); EVSTDW(9); EVSTDW(10); EVSTDW(11); - EVSTDW(12); EVSTDW(13); EVSTDW(14); EVSTDW(15); - EVSTDW(16); EVSTDW(17); EVSTDW(18); EVSTDW(19); - EVSTDW(20); EVSTDW(21); EVSTDW(22); EVSTDW(23); - EVSTDW(24); EVSTDW(25); EVSTDW(26); EVSTDW(27); - EVSTDW(28); EVSTDW(29); EVSTDW(30); EVSTDW(31); -#undef EVSTDW - - __asm ( "evxor 0,0,0\n" - "evmwumiaa 0,0,0\n" - "evstdd 0,0(%0)" :: "b"(&pcb->pcb_vec.spare[0])); - pcb->pcb_vec.vscr = mfspr(SPR_SPEFSCR); - - /* - * Disable vector unit again - */ - isync(); - mtmsr(msr); - -} - -void -enable_vec(struct thread *td) -{ - int msr; - struct pcb *pcb; - struct trapframe *tf; - - pcb = td->td_pcb; - tf = trapframe(td); - - /* - * Save the thread's SPE CPU number, and set the CPU's current - * vector thread - */ - td->td_pcb->pcb_veccpu = PCPU_GET(cpuid); - PCPU_SET(vecthread, td); - - /* - * Enable the vector unit for when the thread returns from the - * exception. If this is the first time the unit has been used by - * the thread, initialise the vector registers and VSCR to 0, and - * set the flag to indicate that the vector unit is in use. - */ - tf->srr1 |= PSL_VEC; - if (!(pcb->pcb_flags & PCB_VEC)) { - memset(&pcb->pcb_vec, 0, sizeof pcb->pcb_vec); - pcb->pcb_flags |= PCB_VEC; - pcb->pcb_vec.vscr = mfspr(SPR_SPEFSCR); - } - - /* - * Temporarily enable the vector unit so the registers - * can be restored. - */ - msr = mfmsr(); - mtmsr(msr | PSL_VEC); - - /* Restore SPEFSCR and ACC. Use %r0 as the scratch for ACC. */ - mtspr(SPR_SPEFSCR, pcb->pcb_vec.vscr); - __asm __volatile("isync;evldd 0, 0(%0); evmra 0,0\n" - :: "b"(&pcb->pcb_vec.spare[0])); - - /* - * The lower half of each register will be restored on trap return. Use - * %r0 as a scratch register, and restore it last. - */ -#define EVLDW(n) __asm __volatile("evldw 0, 0(%0); evmergehilo "#n",0,"#n \ - :: "b"(&pcb->pcb_vec.vr[n])); - EVLDW(1); EVLDW(2); EVLDW(3); EVLDW(4); - EVLDW(5); EVLDW(6); EVLDW(7); EVLDW(8); - EVLDW(9); EVLDW(10); EVLDW(11); EVLDW(12); - EVLDW(13); EVLDW(14); EVLDW(15); EVLDW(16); - EVLDW(17); EVLDW(18); EVLDW(19); EVLDW(20); - EVLDW(21); EVLDW(22); EVLDW(23); EVLDW(24); - EVLDW(25); EVLDW(26); EVLDW(27); EVLDW(28); - EVLDW(29); EVLDW(30); EVLDW(31); EVLDW(0); -#undef EVLDW - - isync(); - mtmsr(msr); -} - -void -save_vec(struct thread *td) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - - save_vec_int(td); - - /* - * Clear the current vec thread and pcb's CPU id - * XXX should this be left clear to allow lazy save/restore ? - */ - pcb->pcb_veccpu = INT_MAX; - PCPU_SET(vecthread, NULL); -} - -/* - * Save SPE state without dropping ownership. This will only save state if - * the current vector-thread is `td'. This is used for taking core dumps, so - * don't leak kernel information; overwrite the low words of each vector with - * their real value, taken from the thread's trap frame, unconditionally. - */ -void -save_vec_nodrop(struct thread *td) -{ - struct pcb *pcb; - int i; - - if (td == PCPU_GET(vecthread)) - save_vec_int(td); - - pcb = td->td_pcb; - - for (i = 0; i < 32; i++) { - pcb->pcb_vec.vr[i][1] = - td->td_frame ? td->td_frame->fixreg[i] : 0; - } -} - -#define SPE_INST_MASK 0x31f -#define EADD 0x200 -#define ESUB 0x201 -#define EABS 0x204 -#define ENABS 0x205 -#define ENEG 0x206 -#define EMUL 0x208 -#define EDIV 0x209 -#define ECMPGT 0x20c -#define ECMPLT 0x20d -#define ECMPEQ 0x20e -#define ECFUI 0x210 -#define ECFSI 0x211 -#define ECTUI 0x214 -#define ECTSI 0x215 -#define ECTUF 0x216 -#define ECTSF 0x217 -#define ECTUIZ 0x218 -#define ECTSIZ 0x21a - -#define SPE 0x4 -#define SPFP 0x6 -#define DPFP 0x7 - -#define SPE_OPC 4 -#define OPC_SHIFT 26 - -#define EVFSADD 0x280 -#define EVFSSUB 0x281 -#define EVFSABS 0x284 -#define EVFSNABS 0x285 -#define EVFSNEG 0x286 -#define EVFSMUL 0x288 -#define EVFSDIV 0x289 -#define EVFSCMPGT 0x28c -#define EVFSCMPLT 0x28d -#define EVFSCMPEQ 0x28e -#define EVFSCFUI 0x290 -#define EVFSCFSI 0x291 -#define EVFSCTUI 0x294 -#define EVFSCTSI 0x295 -#define EVFSCTUF 0x296 -#define EVFSCTSF 0x297 -#define EVFSCTUIZ 0x298 -#define EVFSCTSIZ 0x29a - -#define EFSADD 0x2c0 -#define EFSSUB 0x2c1 -#define EFSABS 0x2c4 -#define EFSNABS 0x2c5 -#define EFSNEG 0x2c6 -#define EFSMUL 0x2c8 -#define EFSDIV 0x2c9 -#define EFSCMPGT 0x2cc -#define EFSCMPLT 0x2cd -#define EFSCMPEQ 0x2ce -#define EFSCFD 0x2cf -#define EFSCFUI 0x2d0 -#define EFSCFSI 0x2d1 -#define EFSCTUI 0x2d4 -#define EFSCTSI 0x2d5 -#define EFSCTUF 0x2d6 -#define EFSCTSF 0x2d7 -#define EFSCTUIZ 0x2d8 -#define EFSCTSIZ 0x2da - -#define EFDADD 0x2e0 -#define EFDSUB 0x2e1 -#define EFDABS 0x2e4 -#define EFDNABS 0x2e5 -#define EFDNEG 0x2e6 -#define EFDMUL 0x2e8 -#define EFDDIV 0x2e9 -#define EFDCMPGT 0x2ec -#define EFDCMPLT 0x2ed -#define EFDCMPEQ 0x2ee -#define EFDCFS 0x2ef -#define EFDCFUI 0x2f0 -#define EFDCFSI 0x2f1 -#define EFDCTUI 0x2f4 -#define EFDCTSI 0x2f5 -#define EFDCTUF 0x2f6 -#define EFDCTSF 0x2f7 -#define EFDCTUIZ 0x2f8 -#define EFDCTSIZ 0x2fa - -enum { - NONE, - SINGLE, - DOUBLE, - VECTOR, -}; - -static uint32_t fpscr_to_spefscr(uint32_t fpscr) -{ - uint32_t spefscr; - - spefscr = 0; - - if (fpscr & FPSCR_VX) - spefscr |= SPEFSCR_FINV; - if (fpscr & FPSCR_OX) - spefscr |= SPEFSCR_FOVF; - if (fpscr & FPSCR_UX) - spefscr |= SPEFSCR_FUNF; - if (fpscr & FPSCR_ZX) - spefscr |= SPEFSCR_FDBZ; - if (fpscr & FPSCR_XX) - spefscr |= SPEFSCR_FX; - - return (spefscr); -} - -/* Sign is 0 for unsigned, 1 for signed. */ -static int -spe_to_int(struct fpemu *fpemu, struct fpn *fpn, uint32_t *val, int sign) -{ - uint32_t res[2]; - - res[0] = fpu_ftox(fpemu, fpn, res); - if (res[0] != UINT_MAX && res[0] != 0) - fpemu->fe_cx |= FPSCR_OX; - else if (sign == 0 && res[0] != 0) - fpemu->fe_cx |= FPSCR_UX; - else - *val = res[1]; - - return (0); -} - -/* Masked instruction */ -/* - * For compare instructions, returns 1 if success, 0 if not. For all others, - * returns -1, or -2 if no result needs recorded. - */ -static int -spe_emu_instr(uint32_t instr, struct fpemu *fpemu, - struct fpn **result, uint32_t *iresult) -{ - switch (instr & SPE_INST_MASK) { - case EABS: - case ENABS: - case ENEG: - /* Taken care of elsewhere. */ - break; - case ECTUIZ: - fpemu->fe_cx &= ~FPSCR_RN; - fpemu->fe_cx |= FP_RZ; - case ECTUI: - spe_to_int(fpemu, &fpemu->fe_f2, iresult, 0); - return (-1); - case ECTSIZ: - fpemu->fe_cx &= ~FPSCR_RN; - fpemu->fe_cx |= FP_RZ; - case ECTSI: - spe_to_int(fpemu, &fpemu->fe_f2, iresult, 1); - return (-1); - case EADD: - *result = fpu_add(fpemu); - break; - case ESUB: - *result = fpu_sub(fpemu); - break; - case EMUL: - *result = fpu_mul(fpemu); - break; - case EDIV: - *result = fpu_div(fpemu); - break; - case ECMPGT: - fpu_compare(fpemu, 0); - if (fpemu->fe_cx & FPSCR_FG) - return (1); - return (0); - case ECMPLT: - fpu_compare(fpemu, 0); - if (fpemu->fe_cx & FPSCR_FL) - return (1); - return (0); - case ECMPEQ: - fpu_compare(fpemu, 0); - if (fpemu->fe_cx & FPSCR_FE) - return (1); - return (0); - default: - printf("Unknown instruction %x\n", instr); - } - - return (-1); -} - -static int -spe_explode(struct fpemu *fe, struct fpn *fp, uint32_t type, - uint32_t hi, uint32_t lo) -{ - uint32_t s; - - fp->fp_sign = hi >> 31; - fp->fp_sticky = 0; - switch (type) { - case SINGLE: - s = fpu_stof(fp, hi); - break; - - case DOUBLE: - s = fpu_dtof(fp, hi, lo); - break; - } - - if (s == FPC_QNAN && (fp->fp_mant[0] & FP_QUIETBIT) == 0) { - /* - * Input is a signalling NaN. All operations that return - * an input NaN operand put it through a ``NaN conversion'', - * which basically just means ``turn on the quiet bit''. - * We do this here so that all NaNs internally look quiet - * (we can tell signalling ones by their class). - */ - fp->fp_mant[0] |= FP_QUIETBIT; - fe->fe_cx = FPSCR_VXSNAN; /* assert invalid operand */ - s = FPC_SNAN; - } - fp->fp_class = s; - - return (0); -} - -/* - * Save the high word of a 64-bit GPR for manipulation in the exception handler. - */ -static uint32_t -spe_save_reg_high(int reg) -{ - uint32_t vec[2]; -#define EVSTDW(n) case n: __asm __volatile ("evstdw %1,0(%0)" \ - :: "b"(vec), "n"(n) : "memory"); break; - switch (reg) { - EVSTDW(0); EVSTDW(1); EVSTDW(2); EVSTDW(3); - EVSTDW(4); EVSTDW(5); EVSTDW(6); EVSTDW(7); - EVSTDW(8); EVSTDW(9); EVSTDW(10); EVSTDW(11); - EVSTDW(12); EVSTDW(13); EVSTDW(14); EVSTDW(15); - EVSTDW(16); EVSTDW(17); EVSTDW(18); EVSTDW(19); - EVSTDW(20); EVSTDW(21); EVSTDW(22); EVSTDW(23); - EVSTDW(24); EVSTDW(25); EVSTDW(26); EVSTDW(27); - EVSTDW(28); EVSTDW(29); EVSTDW(30); EVSTDW(31); - } -#undef EVSTDW - - return (vec[0]); -} - -/* - * Load the given value into the high word of the requested register. - */ -static void -spe_load_reg_high(int reg, uint32_t val) -{ -#define EVLDW(n) case n: __asm __volatile("evmergelo "#n",%0,"#n \ - :: "r"(val)); break; - switch (reg) { - EVLDW(1); EVLDW(2); EVLDW(3); EVLDW(4); - EVLDW(5); EVLDW(6); EVLDW(7); EVLDW(8); - EVLDW(9); EVLDW(10); EVLDW(11); EVLDW(12); - EVLDW(13); EVLDW(14); EVLDW(15); EVLDW(16); - EVLDW(17); EVLDW(18); EVLDW(19); EVLDW(20); - EVLDW(21); EVLDW(22); EVLDW(23); EVLDW(24); - EVLDW(25); EVLDW(26); EVLDW(27); EVLDW(28); - EVLDW(29); EVLDW(30); EVLDW(31); EVLDW(0); - } -#undef EVLDW - -} - -void -spe_handle_fpdata(struct trapframe *frame) -{ - struct fpemu fpemu; - struct fpn *result; - uint32_t instr, instr_sec_op; - uint32_t cr_shift, ra, rb, rd, src; - uint32_t high, low, res, tmp; /* For vector operations. */ - uint32_t spefscr = 0; - uint32_t ftod_res[2]; - int width; /* Single, Double, Vector, Integer */ - int err; - uint32_t msr; - - err = fueword32((void *)frame->srr0, &instr); - - if (err != 0) - return; - /* Fault. */; - - if ((instr >> OPC_SHIFT) != SPE_OPC) - return; - - msr = mfmsr(); - /* - * 'cr' field is the upper 3 bits of rd. Magically, since a) rd is 5 - * bits, b) each 'cr' field is 4 bits, and c) Only the 'GT' bit is - * modified for most compare operations, the full value of rd can be - * used as a shift value. - */ - rd = (instr >> 21) & 0x1f; - ra = (instr >> 16) & 0x1f; - rb = (instr >> 11) & 0x1f; - src = (instr >> 5) & 0x7; - cr_shift = 28 - (rd & 0x1f); - - instr_sec_op = (instr & 0x7ff); - - memset(&fpemu, 0, sizeof(fpemu)); - - width = NONE; - switch (src) { - case SPE: - mtmsr(msr | PSL_VEC); - switch (instr_sec_op) { - case EVFSABS: - high = spe_save_reg_high(ra) & ~(1U << 31); - frame->fixreg[rd] = frame->fixreg[ra] & ~(1U << 31); - spe_load_reg_high(rd, high); - break; - case EVFSNABS: - high = spe_save_reg_high(ra) | (1U << 31); - frame->fixreg[rd] = frame->fixreg[ra] | (1U << 31); - spe_load_reg_high(rd, high); - break; - case EVFSNEG: - high = spe_save_reg_high(ra) ^ (1U << 31); - frame->fixreg[rd] = frame->fixreg[ra] ^ (1U << 31); - spe_load_reg_high(rd, high); - break; - default: - /* High word */ - spe_explode(&fpemu, &fpemu.fe_f1, SINGLE, - spe_save_reg_high(ra), 0); - spe_explode(&fpemu, &fpemu.fe_f2, SINGLE, - spe_save_reg_high(rb), 0); - high = spe_emu_instr(instr_sec_op, &fpemu, &result, - &tmp); - - if (high < 0) - spe_load_reg_high(rd, tmp); - - spefscr = fpscr_to_spefscr(fpemu.fe_cx) << 16; - /* Clear the fpemu to start over on the lower bits. */ - memset(&fpemu, 0, sizeof(fpemu)); - - /* Now low word */ - spe_explode(&fpemu, &fpemu.fe_f1, SINGLE, - frame->fixreg[ra], 0); - spe_explode(&fpemu, &fpemu.fe_f2, SINGLE, - frame->fixreg[rb], 0); - spefscr |= fpscr_to_spefscr(fpemu.fe_cx); - low = spe_emu_instr(instr_sec_op, &fpemu, &result, - &frame->fixreg[rd]); - if (instr_sec_op == EVFSCMPEQ || - instr_sec_op == EVFSCMPGT || - instr_sec_op == EVFSCMPLT) { - res = (high << 3) | (low << 2) | - ((high | low) << 1) | (high & low); - width = NONE; - } else - width = VECTOR; - break; - } - goto end; - - case SPFP: - switch (instr_sec_op) { - case EFSABS: - frame->fixreg[rd] = frame->fixreg[ra] & ~(1U << 31); - break; - case EFSNABS: - frame->fixreg[rd] = frame->fixreg[ra] | (1U << 31); - break; - case EFSNEG: - frame->fixreg[rd] = frame->fixreg[ra] ^ (1U << 31); - break; - case EFSCFD: - mtmsr(msr | PSL_VEC); - spe_explode(&fpemu, &fpemu.fe_f3, DOUBLE, - spe_save_reg_high(rb), frame->fixreg[rb]); - result = &fpemu.fe_f3; - width = SINGLE; - break; - default: - spe_explode(&fpemu, &fpemu.fe_f1, SINGLE, - frame->fixreg[ra], 0); - spe_explode(&fpemu, &fpemu.fe_f2, SINGLE, - frame->fixreg[rb], 0); - width = SINGLE; - } - break; - case DPFP: - mtmsr(msr | PSL_VEC); - switch (instr_sec_op) { - case EFDABS: - high = spe_save_reg_high(ra) & ~(1U << 31); - frame->fixreg[rd] = frame->fixreg[ra]; - spe_load_reg_high(rd, high); - break; - case EFDNABS: - high = spe_save_reg_high(ra) | (1U << 31); - frame->fixreg[rd] = frame->fixreg[ra]; - spe_load_reg_high(rd, high); - break; - case EFDNEG: - high = spe_save_reg_high(ra) ^ (1U << 31); - frame->fixreg[rd] = frame->fixreg[ra]; - spe_load_reg_high(rd, high); - break; - case EFDCFS: - spe_explode(&fpemu, &fpemu.fe_f3, SINGLE, - frame->fixreg[rb], 0); - result = &fpemu.fe_f3; - width = DOUBLE; - break; - default: - spe_explode(&fpemu, &fpemu.fe_f1, DOUBLE, - spe_save_reg_high(ra), frame->fixreg[ra]); - spe_explode(&fpemu, &fpemu.fe_f2, DOUBLE, - spe_save_reg_high(rb), frame->fixreg[rb]); - width = DOUBLE; - } - break; - } - switch (instr_sec_op) { - case EFDCFS: - case EFSCFD: - /* Already handled. */ - break; - default: - res = spe_emu_instr(instr_sec_op, &fpemu, &result, - &frame->fixreg[rd]); - if (res != -1) - res <<= 2; - break; - } - - switch (instr_sec_op & SPE_INST_MASK) { - case ECMPEQ: - case ECMPGT: - case ECMPLT: - frame->cr &= ~(0xf << cr_shift); - frame->cr |= (res << cr_shift); - break; - case ECTUI: - case ECTUIZ: - case ECTSI: - case ECTSIZ: - break; - default: - switch (width) { - case NONE: - case VECTOR: - break; - case SINGLE: - frame->fixreg[rd] = fpu_ftos(&fpemu, result); - break; - case DOUBLE: - spe_load_reg_high(rd, fpu_ftod(&fpemu, result, ftod_res)); - frame->fixreg[rd] = ftod_res[1]; - break; - default: - panic("Unknown storage width %d", width); - break; - } - } - -end: - spefscr |= (mfspr(SPR_SPEFSCR) & ~SPEFSCR_FINVS); - mtspr(SPR_SPEFSCR, spefscr); - frame->srr0 += 4; - mtmsr(msr); - - return; -} - -void -spe_handle_fpround(struct trapframe *frame) *** 8 LINES SKIPPED *** From nobody Fri Jan 9 20:13:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntJK1PHdz6B9Gd for ; Fri, 09 Jan 2026 20:13: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntJD02q1z3HR2 for ; Fri, 09 Jan 2026 20:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ctG4w6VKePmrYfDjzj+rqGA8dtsZjycT/8d9su0hkc0=; b=i529Cbl29zTaPTrL7rOCw1g6LHxvMVf1MlVLUCNtvOAzrEYyeJO+7mLY+0RsLvWRHXnn6k Juqa0XuGxcN5NdIPCDKtS5nkV9mi74mgD8kV1dBeGLSWqeHeSpQd88iAxKdMtp/PAWiUS6 G9Ph6LyLYpQJXuSX4iWxoNBlSR2b8Ir63UJYuUKkUvgaTBOzgWLlaJGYGANRmupkk6VGtl KHRI5mV7IUP06RjPWny8GVESH5Ay9vmFNdncBJRIEYB4qFHXONJDDyREOg1TrFDU2sfURD zEGy8rpV0uoIDXfIZg/0VSX1w603gk0DLDSSQCB5L/Qm1dauE3gDccCTK5OcsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ctG4w6VKePmrYfDjzj+rqGA8dtsZjycT/8d9su0hkc0=; b=WSkQ2qpXiDzGKOBjZNYkXG6a2nLaTsxjUsDgjsvMkhO4wZEflRh/WRo/DkQJVCyszzc9V9 bLvjPFdb2Z6MV+p81fUAh+z7Gmyh5KtTB/3W5kX3A3/1czc735YmcEvF1gok+DeBqMB9lY zz26pAZZJBgx1sVJnFzJJeeLPOPOn+JFJfRkfiYRozC7eqZnQPmvVfeme6DENRpjR3IVmC VU5fX6PcLprsnbpn1rsLqTAHHq3bGDbwDROTG1eIQRpV/nRkTnBftarRvPXOorNvHSiom0 s08Byg+vLMxzDDoHfFn/sbicY1RjZzhldKsFgmrjaokmYaxFp9pTreGSl0WyaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989612; a=rsa-sha256; cv=none; b=fJOeNEQT2mbdbVu2XSZR5/SUFCa7gWRqLOqwUgS3k/pF/HgMfN7X2j7fXEz1Lf3ZKnTWWy 9WvU8Verf2IiQ04eIROYY2fUZVJ4SiW5H/TUYVGkg90Igsey/buhIXWQgMEl0hXhGJfmIb +9oGPHrARJguP7dXiS+ie/17EfaANoYBHTWAkNx8EaArW+da8hOuhSluC9cqJiNL0697dA GV5gFYF2szgsd+a8/9eXFXcxNOE2jTKUpybyCw6geIliA3MBtAabi+J/M8jEacAwmduXJb puB80i76l4pXSswhcndN04JMizXwEJsriPlXlVBU2gb/0qXn3ZxuRlso1ltfRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntJC6Rymz7b9 for ; Fri, 09 Jan 2026 20:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8a81 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:13:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: fa6736526e18 - main - stand: remove powerpcspe linker script List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa6736526e18a4343f908f41d8019982e6994f05 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:13:31 +0000 Message-Id: <6961616b.8a81.326bd4c8@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fa6736526e18a4343f908f41d8019982e6994f05 commit fa6736526e18a4343f908f41d8019982e6994f05 Author: Minsoo Choo AuthorDate: 2025-12-03 04:14:41 +0000 Commit: Ed Maste CommitDate: 2026-01-09 20:11:22 +0000 stand: remove powerpcspe linker script Signed-off-by: Minsoo Choo Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1914 (cherry picked from commit 9c72e8e3500408f7ce5fc7be500dd3efc0307674) --- stand/powerpc/ofw/powerpcspe.ldscript | 3 --- 1 file changed, 3 deletions(-) diff --git a/stand/powerpc/ofw/powerpcspe.ldscript b/stand/powerpc/ofw/powerpcspe.ldscript deleted file mode 100644 index aa48f257af1a..000000000000 --- a/stand/powerpc/ofw/powerpcspe.ldscript +++ /dev/null @@ -1,3 +0,0 @@ -OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", - "elf32-powerpc-freebsd") -INCLUDE "ppc-common.ldscript" From nobody Fri Jan 9 20:13:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntJJ5qPzz6MJrR for ; Fri, 09 Jan 2026 20:13: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntJJ3LgLz3HWF for ; Fri, 09 Jan 2026 20:13:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhRH9Yv8JB7VEYYbC208GNN7IfFl6BldvYVcL6b1yKE=; b=D0ln9sWX035l4W40PE6X76FBVbNEX9m2kH8gMH1uLBtztF1DyJ2Iisue3DRzA9UQyzCdi8 1e4l7yUkCrIJxCxIgbG/n7fQ5jrXCb8O2GEp0bfsWYpXkKGEQNHrWdGHIa8fCRmEfgPrpg 4l0RHBTAlsHlS1cz1pp57k0oqQJf19NYR86SZnzWfCTpQvM05kq5wkxeNGzLHFSNwni7B/ +NVegGyBiWeHb+JZ6zV28vLoHVwlPd5wF22ygcBmM7NebUdUn+vlR5rQx1hF+cUaxq9VJU VPF5dnmYVWsH4NeTZmB3x4HOF6df8mvHCzW6FxBz+R3THvVp4DoGT9338OvAHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhRH9Yv8JB7VEYYbC208GNN7IfFl6BldvYVcL6b1yKE=; b=dYJggbkiZhLdHza+WeGS3bNOwsxVM0I22kkR/eFqZqCzFYOdszfqU+ssQmkv8Ceo2Qu3Dq I2LfM5G0skiJBht/WcfYZ9Bw5qXpDwHzHCErUxZTyE/sf/KF66JWdZUlX/V8tg9sxZt5RW BHEBXBryoy+oPBP0qo2+8n2SD/8zd/zO7byAG2SDnaJKxfVF+fAEDtG/hL99gLAeFkxkno UscEEBgIkKJRYps6o+qzxOAvyk/Ne3iMcnS2RNXu/rdLeRwxuJLlIUFuhHOobqFKFGMnu7 cO0LDckxf3Kx/Z0nPJvmH7DOk32EAnKY54Hr3Y5JE9NZzKlb8mEKQa+mdcbN4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989616; a=rsa-sha256; cv=none; b=dlKukm2rlSTNQrjrMWWt0RGF2dcY9GF+V37wfLdpXvJpxgrFKn7hrRlqLjhC5LJJYhxUWF t7t0TQhxl+4ASQcvayR1sHn7ycMxzHbXzKaSktdgZdliS7cOO7jIgXzD60iw2pUx3LEorS joW6C3ffHBh0QBn2new7coGyFjV3COkzm5/+ujzpuf4suMyhKy/mI9v8HNpSTdG0myWFQw OBn70AF/qpsN7lec4q/as73r0WHAa4A0Rr1ZW453d6hk/jQlDIb/ZuUnMUScuz72J2DOt5 O25UMnmfxe7vfklHqye0urlX6YWyrZ06CUIjEAZaud2xvVdMME/EcyqoxATjIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntJJ1hMGz7bY for ; Fri, 09 Jan 2026 20:13:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 479a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:13:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: 9cdb2eb66823 - main - lib: remove powerpcspe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cdb2eb66823e19c86cc9d2ebcf0c70c32a40caf Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:13:36 +0000 Message-Id: <69616170.479a4.35114a6b@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9cdb2eb66823e19c86cc9d2ebcf0c70c32a40caf commit 9cdb2eb66823e19c86cc9d2ebcf0c70c32a40caf Author: Minsoo Choo AuthorDate: 2025-12-03 04:12:49 +0000 Commit: Ed Maste CommitDate: 2026-01-09 20:11:23 +0000 lib: remove powerpcspe Signed-off-by: Minsoo Choo Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1914 (cherry picked from commit 907cf3e4378f9d114af41d05a59ef4a075d3efb0) --- lib/libc/csu/powerpcspe/Makefile.inc | 3 - lib/libc/powerpcspe/Makefile.inc | 5 - lib/libc/powerpcspe/_fpmath.h | 56 ----- lib/libc/powerpcspe/gen/Makefile.inc | 5 - lib/libc/powerpcspe/gen/_setjmp.S | 115 ----------- lib/libc/powerpcspe/gen/fabs.S | 37 ---- lib/libc/powerpcspe/gen/flt_rounds.c | 54 ----- lib/libc/powerpcspe/gen/fpgetmask.c | 46 ----- lib/libc/powerpcspe/gen/fpgetround.c | 46 ----- lib/libc/powerpcspe/gen/fpgetsticky.c | 48 ----- lib/libc/powerpcspe/gen/fpsetmask.c | 50 ----- lib/libc/powerpcspe/gen/fpsetround.c | 50 ----- lib/libc/powerpcspe/gen/setjmp.S | 136 ------------- lib/libc/powerpcspe/gen/sigsetjmp.S | 148 -------------- lib/libc/powerpcspe/softfloat/milieu.h | 48 ----- lib/libc/powerpcspe/softfloat/powerpc-gcc.h | 91 --------- lib/libc/powerpcspe/softfloat/softfloat.h | 306 ---------------------------- lib/libsys/powerpcspe/Makefile.sys | 5 - 18 files changed, 1249 deletions(-) diff --git a/lib/libc/csu/powerpcspe/Makefile.inc b/lib/libc/csu/powerpcspe/Makefile.inc deleted file mode 100644 index ddead75f874d..000000000000 --- a/lib/libc/csu/powerpcspe/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# - -CFLAGS+= -DCRT_IRELOC_SUPPRESS diff --git a/lib/libc/powerpcspe/Makefile.inc b/lib/libc/powerpcspe/Makefile.inc deleted file mode 100644 index 0b5879574480..000000000000 --- a/lib/libc/powerpcspe/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -CFLAGS+= -I${LIBC_SRCTOP}/powerpc - -# Long double is 64-bits -SRCS+=machdep_ldisd.c -SYM_MAPS+=${LIBC_SRCTOP}/powerpc/Symbol.map diff --git a/lib/libc/powerpcspe/_fpmath.h b/lib/libc/powerpcspe/_fpmath.h deleted file mode 100644 index 9bc7450aacaf..000000000000 --- a/lib/libc/powerpcspe/_fpmath.h +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2003 David Schultz - * 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. - */ - -union IEEEl2bits { - long double e; - struct { -#if _BYTE_ORDER == _LITTLE_ENDIAN - unsigned int manl :32; - unsigned int manh :20; - unsigned int exp :11; - unsigned int sign :1; -#else /* _BYTE_ORDER == _LITTLE_ENDIAN */ - unsigned int sign :1; - unsigned int exp :11; - unsigned int manh :20; - unsigned int manl :32; -#endif - } bits; -}; - -#define mask_nbit_l(u) ((void)0) -#define LDBL_IMPLICIT_NBIT -#define LDBL_NBIT 0 - -#define LDBL_MANH_SIZE 20 -#define LDBL_MANL_SIZE 32 - -#define LDBL_TO_ARRAY32(u, a) do { \ - (a)[0] = (uint32_t)(u).bits.manl; \ - (a)[1] = (uint32_t)(u).bits.manh; \ -} while(0) diff --git a/lib/libc/powerpcspe/gen/Makefile.inc b/lib/libc/powerpcspe/gen/Makefile.inc deleted file mode 100644 index 502f3dc231bf..000000000000 --- a/lib/libc/powerpcspe/gen/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -.include "${LIBC_SRCTOP}/powerpc/gen/Makefile.common" - -SRCS += fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ - fpgetsticky.c fpsetmask.c fpsetround.c \ - _setjmp.S setjmp.S sigsetjmp.S diff --git a/lib/libc/powerpcspe/gen/_setjmp.S b/lib/libc/powerpcspe/gen/_setjmp.S deleted file mode 100644 index f282e0013f97..000000000000 --- a/lib/libc/powerpcspe/gen/_setjmp.S +++ /dev/null @@ -1,115 +0,0 @@ -/*- - * Copyright (c) 2016 Justin Hibbits - * 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. - */ -/* $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $ */ - -#include -/* - * C library -- _setjmp, _longjmp - * - * _longjmp(a,v) - * will generate a "return(v?v:1)" from the last call to - * _setjmp(a) - * by restoring registers from the stack. - * The previous signal state is NOT restored. - * - * jmpbuf layout: - * +------------+ - * | unused | - * +------------+ - * | unused | - * | | - * | (4 words) | - * | | - * +------------+ - * | saved regs | - * | ... | - */ - -ENTRY(_setjmp) - mflr %r11 - mfcr %r12 - evstdd %r1,24+0*8(%r3) - evstdd %r2,24+1*8(%r3) - evstdd %r11,24+2*8(%r3) - evstdd %r12,24+3*8(%r3) - evstdd %r13,24+4*8(%r3) - evstdd %r14,24+5*8(%r3) - evstdd %r15,24+6*8(%r3) - evstdd %r16,24+7*8(%r3) - evstdd %r17,24+8*8(%r3) - evstdd %r18,24+9*8(%r3) - evstdd %r19,24+10*8(%r3) - evstdd %r20,24+11*8(%r3) - evstdd %r21,24+12*8(%r3) - evstdd %r22,24+13*8(%r3) - evstdd %r23,24+14*8(%r3) - evstdd %r24,24+15*8(%r3) - evstdd %r25,24+16*8(%r3) - evstdd %r26,24+17*8(%r3) - evstdd %r27,24+18*8(%r3) - evstdd %r28,24+19*8(%r3) - evstdd %r29,24+20*8(%r3) - evstdd %r30,24+21*8(%r3) - evstdd %r31,24+22*8(%r3) - - li %r3,0 - blr -END(_setjmp) - -ENTRY(_longjmp) - evldd %r1,24+0*8(%r3) - evldd %r2,24+1*8(%r3) - evldd %r11,24+2*8(%r3) - evldd %r12,24+3*8(%r3) - evldd %r13,24+4*8(%r3) - evldd %r14,24+5*8(%r3) - evldd %r15,24+6*8(%r3) - evldd %r16,24+7*8(%r3) - evldd %r17,24+8*8(%r3) - evldd %r18,24+9*8(%r3) - evldd %r19,24+10*8(%r3) - evldd %r20,24+11*8(%r3) - evldd %r21,24+12*8(%r3) - evldd %r22,24+13*8(%r3) - evldd %r23,24+14*8(%r3) - evldd %r24,24+15*8(%r3) - evldd %r25,24+16*8(%r3) - evldd %r26,24+17*8(%r3) - evldd %r27,24+18*8(%r3) - evldd %r28,24+19*8(%r3) - evldd %r29,24+20*8(%r3) - evldd %r30,24+21*8(%r3) - evldd %r31,24+22*8(%r3) - - mtlr %r11 - mtcr %r12 - or. %r3,%r4,%r4 - bnelr - li %r3,1 - blr -END(_longjmp) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpcspe/gen/fabs.S b/lib/libc/powerpcspe/gen/fabs.S deleted file mode 100644 index df9196c3273d..000000000000 --- a/lib/libc/powerpcspe/gen/fabs.S +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016 Justin Hibbits - * 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. - */ - -#include -/* - * double fabs(double) - */ -ENTRY(fabs) - /* arg is split in two words, clear sign bit only, in r3. */ - clrlwi %r3,%r3,1 - blr -END(fabs) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpcspe/gen/flt_rounds.c b/lib/libc/powerpcspe/gen/flt_rounds.c deleted file mode 100644 index 26dfca0e0e3a..000000000000 --- a/lib/libc/powerpcspe/gen/flt_rounds.c +++ /dev/null @@ -1,54 +0,0 @@ -/* $NetBSD: flt_rounds.c,v 1.4.10.3 2002/03/22 20:41:53 nathanw Exp $ */ - -/* - * Copyright (c) 2016 Justin Hibbits - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Mark Brinicombe - * for the NetBSD Project. - * 4. 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 -#include -#include - -#ifndef _SOFT_FLOAT -static const int map[] = { - 1, /* round to nearest */ - 0, /* round to zero */ - 2, /* round to positive infinity */ - 3 /* round to negative infinity */ -}; - -int -__flt_rounds() -{ - uint32_t fpscr; - - __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - return map[(fpscr & 0x03)]; -} -#endif diff --git a/lib/libc/powerpcspe/gen/fpgetmask.c b/lib/libc/powerpcspe/gen/fpgetmask.c deleted file mode 100644 index f7679be4ca54..000000000000 --- a/lib/libc/powerpcspe/gen/fpgetmask.c +++ /dev/null @@ -1,46 +0,0 @@ -/* $NetBSD: fpgetmask.c,v 1.3 2002/01/13 21:45:47 thorpej Exp $ */ - -/* - * Copyright (c) 2016 Justin Hibbits - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dan Winship. - * - * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 -#include -#include - -#ifndef _SOFT_FLOAT -fp_except_t -fpgetmask() -{ - uint32_t fpscr; - - __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - return ((fp_except_t)((fpscr >> 2) & 0x1f)); -} -#endif diff --git a/lib/libc/powerpcspe/gen/fpgetround.c b/lib/libc/powerpcspe/gen/fpgetround.c deleted file mode 100644 index 9c01bcbaf327..000000000000 --- a/lib/libc/powerpcspe/gen/fpgetround.c +++ /dev/null @@ -1,46 +0,0 @@ -/* $NetBSD: fpgetround.c,v 1.3 2002/01/13 21:45:47 thorpej Exp $ */ - -/* - * Copyright (c) 2016 Justin Hibbits - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dan Winship. - * - * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 -#include -#include - -#ifndef _SOFT_FLOAT -fp_rnd_t -fpgetround() -{ - uint32_t fpscr; - - __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - return ((fp_rnd_t)(fpscr & 0x3)); -} -#endif diff --git a/lib/libc/powerpcspe/gen/fpgetsticky.c b/lib/libc/powerpcspe/gen/fpgetsticky.c deleted file mode 100644 index a97c27296cab..000000000000 --- a/lib/libc/powerpcspe/gen/fpgetsticky.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: fpgetsticky.c,v 1.3 2002/01/13 21:45:48 thorpej Exp $ */ - -/* - * Copyright (c) 2016 Justin Hibbits - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dan Winship. - * - * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "namespace.h" - -#include -#include -#include - -#ifndef _SOFT_FLOAT -fp_except_t -fpgetsticky() -{ - uint32_t fpscr; - - __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - return ((fp_except_t)((fpscr >> 25) & 0x1f)); -} -#endif diff --git a/lib/libc/powerpcspe/gen/fpsetmask.c b/lib/libc/powerpcspe/gen/fpsetmask.c deleted file mode 100644 index a7a2569df905..000000000000 --- a/lib/libc/powerpcspe/gen/fpsetmask.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $NetBSD: fpsetmask.c,v 1.3 2002/01/13 21:45:48 thorpej Exp $ */ - -/* - * Copyright (c) 2016 Justin Hibbits - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dan Winship. - * - * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 -#include -#include - -#ifndef _SOFT_FLOAT -fp_except_t -fpsetmask(fp_except_t mask) -{ - uint32_t fpscr; - fp_except_t old; - - __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - old = (fp_except_t)((fpscr >> 2) & 0x1f); - fpscr = (fpscr & 0xffffff83) | ((mask & 0x1f) << 2); - __asm__ __volatile("mtspr %1,%0;isync" :: "r"(fpscr), "K"(SPR_SPEFSCR)); - return (old); -} -#endif diff --git a/lib/libc/powerpcspe/gen/fpsetround.c b/lib/libc/powerpcspe/gen/fpsetround.c deleted file mode 100644 index 2280e190b2f9..000000000000 --- a/lib/libc/powerpcspe/gen/fpsetround.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $NetBSD: fpsetround.c,v 1.3 2002/01/13 21:45:48 thorpej Exp $ */ - -/* - * Copyright (c) 2016 Justin Hibbits - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dan Winship. - * - * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 -#include -#include - -#ifndef _SOFT_FLOAT -fp_rnd_t -fpsetround(fp_rnd_t rnd_dir) -{ - uint32_t fpscr; - fp_rnd_t old; - - __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR) ); - old = (fp_rnd_t)(fpscr & 0x3); - fpscr = (fpscr & 0xfffffffc) | rnd_dir; - __asm__ __volatile("mtspr %1, %0;isync" :: "r"(fpscr), "K"(SPR_SPEFSCR)); - return (old); -} -#endif diff --git a/lib/libc/powerpcspe/gen/setjmp.S b/lib/libc/powerpcspe/gen/setjmp.S deleted file mode 100644 index 1bd3edcf5239..000000000000 --- a/lib/libc/powerpcspe/gen/setjmp.S +++ /dev/null @@ -1,136 +0,0 @@ -/*- - * Copyright (c) 2016 Justin Hibbits - * 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. - */ -/* $NetBSD: setjmp.S,v 1.3 1998/10/03 12:30:38 tsubai Exp $ */ - -#include -#include - -/* - * C library -- setjmp, longjmp - * - * longjmp(a,v) - * will generate a "return(v?v:1)" from the last call to - * setjmp(a) - * by restoring registers from the stack. - * The previous signal state is restored. - * - * jmpbuf layout: - * +------------+ - * | unused | - * +------------+ - * | sig state | - * | | - * | (4 words) | - * | | - * +------------+ - * | saved regs | - * | ... | - */ - -ENTRY(setjmp) - mr %r6,%r3 - li %r3,1 /* SIG_BLOCK, but doesn't matter */ - /* since set == NULL */ - li %r4,0 /* set = NULL */ - mr %r5,%r6 /* &oset */ - addi %r5,%r5,4 - li %r0, SYS_sigprocmask /*sigprocmask(SIG_BLOCK, NULL, &oset)*/ - sc /*assume no error XXX */ - mflr %r11 /* r11 <- link reg */ - mfcr %r12 /* r12 <- condition reg */ - mr %r10,%r1 /* r10 <- stackptr */ - mr %r9,%r2 /* r9 <- global ptr */ - evstdd %r9,24+0*8(%r6) - evstdd %r10,24+1*8(%r6) - evstdd %r11,24+2*8(%r6) - evstdd %r12,24+3*8(%r6) - evstdd %r13,24+4*8(%r6) - evstdd %r14,24+5*8(%r6) - evstdd %r15,24+6*8(%r6) - evstdd %r16,24+7*8(%r6) - evstdd %r17,24+8*8(%r6) - evstdd %r18,24+9*8(%r6) - evstdd %r19,24+10*8(%r6) - evstdd %r20,24+11*8(%r6) - evstdd %r21,24+12*8(%r6) - evstdd %r22,24+13*8(%r6) - evstdd %r23,24+14*8(%r6) - evstdd %r24,24+15*8(%r6) - evstdd %r25,24+16*8(%r6) - evstdd %r26,24+17*8(%r6) - evstdd %r27,24+18*8(%r6) - evstdd %r28,24+19*8(%r6) - evstdd %r29,24+20*8(%r6) - evstdd %r30,24+21*8(%r6) - evstdd %r31,24+22*8(%r6) - - li %r3,0 /* return (0) */ - blr -END(setjmp) - - WEAK_REFERENCE(CNAME(__longjmp), longjmp) -ENTRY(__longjmp) - evldd %r9,24+0*8(%r3) - evldd %r10,24+1*8(%r3) - evldd %r11,24+2*8(%r3) - evldd %r12,24+3*8(%r3) - evldd %r13,24+4*8(%r3) - evldd %r14,24+5*8(%r3) - evldd %r15,24+6*8(%r3) - evldd %r16,24+7*8(%r3) - evldd %r17,24+8*8(%r3) - evldd %r18,24+9*8(%r3) - evldd %r19,24+10*8(%r3) - evldd %r20,24+11*8(%r3) - evldd %r21,24+12*8(%r3) - evldd %r22,24+13*8(%r3) - evldd %r23,24+14*8(%r3) - evldd %r24,24+15*8(%r3) - evldd %r25,24+16*8(%r3) - evldd %r26,24+17*8(%r3) - evldd %r27,24+18*8(%r3) - evldd %r28,24+19*8(%r3) - evldd %r29,24+20*8(%r3) - evldd %r30,24+21*8(%r3) - evldd %r31,24+22*8(%r3) - - mr %r6,%r4 /* save val param */ - mtlr %r11 /* r11 -> link reg */ - mtcr %r12 /* r12 -> condition reg */ - mr %r1,%r10 /* r10 -> stackptr */ - mr %r4,%r3 - li %r3,3 /* SIG_SETMASK */ - addi %r4,%r4,4 /* &set */ - li %r5,0 /* oset = NULL */ - li %r0,SYS_sigprocmask /* sigprocmask(SIG_SET, &set, NULL) */ - sc /* assume no error XXX */ - or. %r3,%r6,%r6 - bnelr - li %r3,1 - blr -END(__longjmp) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpcspe/gen/sigsetjmp.S b/lib/libc/powerpcspe/gen/sigsetjmp.S deleted file mode 100644 index 45c85c3fce23..000000000000 --- a/lib/libc/powerpcspe/gen/sigsetjmp.S +++ /dev/null @@ -1,148 +0,0 @@ -/*- - * Copyright (c) 2016 Justin Hibbits - * 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. - */ -/* $NetBSD: sigsetjmp.S,v 1.4 1998/10/03 12:30:38 tsubai Exp $ */ - -#include -/* - * C library -- sigsetjmp, siglongjmp - * - * siglongjmp(a,v) - * will generate a "return(v?v:1)" from the last call to - * sigsetjmp(a, savemask) - * by restoring registers from the stack. - * The previous signal state is restored if savemask is non-zero - * - * jmpbuf layout: - * +------------+ - * | savemask | - * +------------+ - * | sig state | - * | | - * | (4 words) | - * | | - * +------------+ - * | saved regs | - * | ... | - */ - - -#include - -ENTRY(sigsetjmp) - mr %r6,%r3 - stw %r4,0(%r3) - or. %r7,%r4,%r4 - beq 1f - li %r3,1 /* SIG_BLOCK, but doesn't matter */ - /* since set == NULL */ - li %r4,0 /* set = NULL */ - mr %r5,%r6 /* &oset */ - addi %r5,%r5,4 - li %r0, SYS_sigprocmask /* sigprocmask(SIG_BLOCK, NULL, &oset)*/ - sc /* assume no error XXX */ -1: - mflr %r11 - mfcr %r12 - mr %r10,%r1 - mr %r9,%r2 - - /* FPRs */ - evstdd %r9,24+0*8(%r6) - evstdd %r10,24+1*8(%r6) - evstdd %r11,24+2*8(%r6) - evstdd %r12,24+3*8(%r6) - evstdd %r13,24+4*8(%r6) - evstdd %r14,24+5*8(%r6) - evstdd %r15,24+6*8(%r6) - evstdd %r16,24+7*8(%r6) - evstdd %r17,24+8*8(%r6) - evstdd %r18,24+9*8(%r6) - evstdd %r19,24+10*8(%r6) - evstdd %r20,24+11*8(%r6) - evstdd %r21,24+12*8(%r6) - evstdd %r22,24+13*8(%r6) - evstdd %r23,24+14*8(%r6) - evstdd %r24,24+15*8(%r6) - evstdd %r25,24+16*8(%r6) - evstdd %r26,24+17*8(%r6) - evstdd %r27,24+18*8(%r6) - evstdd %r28,24+19*8(%r6) - evstdd %r29,24+20*8(%r6) - evstdd %r30,24+21*8(%r6) - evstdd %r31,24+22*8(%r6) - - li %r3,0 - blr -END(sigsetjmp) - -ENTRY(siglongjmp) - - /* FPRs */ - evldd %r9,24+0*8(%r3) - evldd %r10,24+1*8(%r3) - evldd %r11,24+2*8(%r3) - evldd %r12,24+3*8(%r3) - evldd %r13,24+4*8(%r3) - evldd %r14,24+5*8(%r3) - evldd %r15,24+6*8(%r3) - evldd %r16,24+7*8(%r3) - evldd %r17,24+8*8(%r3) - evldd %r18,24+9*8(%r3) - evldd %r19,24+10*8(%r3) - evldd %r20,24+11*8(%r3) - evldd %r21,24+12*8(%r3) - evldd %r22,24+13*8(%r3) - evldd %r23,24+14*8(%r3) - evldd %r24,24+15*8(%r3) - evldd %r25,24+16*8(%r3) - evldd %r26,24+17*8(%r3) - evldd %r27,24+18*8(%r3) - evldd %r28,24+19*8(%r3) - evldd %r29,24+20*8(%r3) - evldd %r30,24+21*8(%r3) - evldd %r31,24+22*8(%r3) - - lwz %r7,0(%r3) - mr %r6,%r4 - mtlr %r11 - mtcr %r12 - mr %r1,%r10 - or. %r7,%r7,%r7 - beq 1f - mr %r4,%r3 - li %r3,3 /* SIG_SETMASK */ - addi %r4,%r4,4 /* &set */ - li %r5,0 /* oset = NULL */ - li %r0,SYS_sigprocmask /* sigprocmask(SIG_SET, &set, NULL) */ - sc /* assume no error XXX */ -1: - or. %r3,%r6,%r6 - bnelr - li %r3,1 - blr -END(siglongjmp) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpcspe/softfloat/milieu.h b/lib/libc/powerpcspe/softfloat/milieu.h deleted file mode 100644 index 6139aa58b982..000000000000 --- a/lib/libc/powerpcspe/softfloat/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: milieu.h,v 1.1 2000/12/29 20:13:54 bjh21 Exp $ */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "powerpc-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/lib/libc/powerpcspe/softfloat/powerpc-gcc.h b/lib/libc/powerpcspe/softfloat/powerpc-gcc.h deleted file mode 100644 index d11198866e39..000000000000 --- a/lib/libc/powerpcspe/softfloat/powerpc-gcc.h +++ /dev/null @@ -1,91 +0,0 @@ -/* $NetBSD: arm-gcc.h,v 1.2 2001/02/21 18:09:25 bjh21 Exp $ */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- *** 408 LINES SKIPPED *** From nobody Fri Jan 9 20:17:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntNk2rfqz6MK5F for ; Fri, 09 Jan 2026 20:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntNj6cXJz3KWS for ; Fri, 09 Jan 2026 20:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XM90dZyvx9m6XwUXTWAZi/1KQff8b8ufn3iQtcV2gYE=; b=bh6X/lVLnTF4ZOzVpeQnQMfHhHcL1J9ZcsL1KOuFobL6pVJchej+XLx93pH264vGMUmHOn g2KLc/VbUDYg7FGiQ38vUu/iVc1/M7aaDZdW5n+y3W6J3z2ooSs9NYzqZvf8eOqX1X3AFL ajvDThy+3Pg2FdJgeFFBImEySSEhv6GR2Tcau0idmGvmb5Vxxpos2uKfcSBK+p35S1RJGi VdCZ/VWOI/3Pr3BgiQ8Zv84QA4fHipzqozZ5hUoRysJE/gV4Y+38iHqhSKwJIC/x0bpNtH r+T4lpcWf40JI2N8zU5aEVfIhnVAPM9l5dYm14He/st9ZJ8NM71jwkDrirWOIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XM90dZyvx9m6XwUXTWAZi/1KQff8b8ufn3iQtcV2gYE=; b=DVeVcRDaRPhOHrGUaZ4cJXS85GLCtr103zCYPr0NkDtWoC/fZ4yulABf3WmIQpJxzx8xsn DxHqw9wv61Mice5186fw0dwBMUH7zMPvBJYqCHuwkeqzXyzjEZhPYruLYs3ClSKQG+4Wt/ 0nTViU388L21TSTBY50KDn6eBBPpfjQQVgo6z8L8EipYzCVfwaG3zW25X/2rGqZMewphE+ psqqgdB6qDfX5YzbJLCrFKc/vqIn+TQ2Ejp5yVvtJAB96tvzvAFXta78chDJjsVEG0s0O6 dV5wLnGlZGD9Gs1+oblQBpB0QmWBFNI9sfcvtWIUrflGUUkwA+wci8GvIG5YhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989845; a=rsa-sha256; cv=none; b=sjZGeDYr71/w2HygSH6Dle6kVOnsRE5E6h52nExamp8Rs1R8fBqxBuyQ9aGlCBhrI24sNg vZE2P7Q/krlWxV7/HvZomU4ny6ckpUyFZjY/q8+6Fr32hep9wEDjMZSSMmYHgAyG4W7XHS GyfHLYQR9mBbOg1vrbaRCPeptWxEzSRIUpRLh3hvNu79aaY/FZwjjqwNjjPT1AtDmd4U5d jL5+3zVVLngYMu7ies0w+U1X4QQr2A8ASdUMyY4whGkcjkqNcSFl0kka8xnhbaiCttoUuL CsaIglKzduYkzKgqXLOqupBlTIEGjdNqyd1DmBlMFXf9AcVuezE7QW9t6Jj+Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntNj5fl3z7bb for ; Fri, 09 Jan 2026 20:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8a01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:17:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ankush Mondal From: Warner Losh Subject: git: 539547151678 - main - df: Fix -k flag consistency with other BLOCKSIZE flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 539547151678c63903dddda214b16b177cf418b8 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:17:25 +0000 Message-Id: <69616255.8a01.65a8a4dc@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=539547151678c63903dddda214b16b177cf418b8 commit 539547151678c63903dddda214b16b177cf418b8 Author: Ankush Mondal AuthorDate: 2025-11-29 11:15:30 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:17:12 +0000 df: Fix -k flag consistency with other BLOCKSIZE flags This patch resolves inconsistent behavior between the -k option and other related flags, including -P. Previously, using -k resulted in output displayed in 1024-byte blocks, which did not align with the behavior of similar options such as -m and -g, where output is shown in 1M-blocks and 1G-blocks respectively. The updated implementation ensures that -k now correctly displays sizes in 1K-blocks. In addition, the patch incorporates the POSIX requirement that when both -k -P are specified, the block size must be explicitly forced to 1024-blocks. Together, these changes make the behavior of -k consistent, predictable, and compliant with the standard. Signed-off-by: Ankush Mondal Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1906 --- bin/df/df.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/df/df.c b/bin/df/df.c index db5b8b18beae..12478d23a2ea 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -128,11 +128,12 @@ main(int argc, char *argv[]) /* * POSIX specifically discusses the behavior of * both -k and -P. It states that the blocksize should - * be set to 1024. Thus, if this occurs, simply break - * rather than clobbering the old blocksize. + * be set to 1024. */ - if (kflag) + if (kflag) { + setenv("BLOCKSIZE", "1024", 1); break; + } setenv("BLOCKSIZE", "512", 1); hflag = 0; break; @@ -154,7 +155,7 @@ main(int argc, char *argv[]) break; case 'k': kflag++; - setenv("BLOCKSIZE", "1024", 1); + setenv("BLOCKSIZE", "1k", 1); hflag = 0; break; case 'l': From nobody Fri Jan 9 20:17:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntNj3yp5z6MJyP for ; Fri, 09 Jan 2026 20:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntNj0dwWz3KfB for ; Fri, 09 Jan 2026 20:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5fgI6ojbWhCFoW0nEwsgrSffJNeKjd4Jd0lEWBC8x1M=; b=ZZ2escdodJZm7N7ROw3gv2oUIkBcSPnaePzOa1a1jjQ2jF7/8OU/hbmEN1F2sZ70RE8QlL WTP9TE7z2v53jMZ8tPx6W5Ihxi7j/iSwmAah1jonymPqJPUtHW5qJp/IrAH6VhP3n05HXy gUAENNNWXl88ahlT/Uj2w6BqCGvfkQi1b8BPqnZWePWm1rkZKjfmfVpN6jiN6UsMytTcSO 0dN+c1vDBeqxruY9o6KB5xmrGquhUb1ijt1yCW72/57AvTrgfsleEZiYT4MdLfNdnbYt8p BDiirBvFlnKof9+fMW/mcB0Ub0OXjmhNHoB3OS6baL55BH822IVh1DVWYQZPsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5fgI6ojbWhCFoW0nEwsgrSffJNeKjd4Jd0lEWBC8x1M=; b=XNnLyJXEP+6ZiXUgYBCnVrHORH9j51dT8gDTAfW3H85zeUAB4eXn1giCO/hHBdmXwoWZM9 k9dlxFLMf/HpiMmOP02KCIVEvHLVukvN41yvtyqC1qSq9sQR5WdwSA6N2TYlM7hoOnZv2f kHJ7WoFaWgMgFjYGGR1QMYNlFnMM5csqc8dsEeOHmBDOvNFO9V9kjt3g8vr0xdBKgADnzH IIL8DlpaFMAXcBJ35+r39iDOJRHsgqta6GAYitP/+8Itp0CE1cRk/SM1CZ9xAvdD1f2QQH XfSpjm3sGXRXWzgR92XRiLWo55g4uGhrAhfzs3/dDYDy2J6KzRyeox86Km23NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989845; a=rsa-sha256; cv=none; b=wnlI4YATZ4yfE6cj3Hg/HJORmq6yEjq5Qxa3+w85aMnmOONiDHDM28Nz6hNen86ROFgmsW ptupoaVHpyErsVPR/+f6maKVATTrXw9GwtpJyAv7YQl57nobrgCzejEXtgINERsLtjTrYZ UVHqEPN+wiOsDAMXkBoE89T6VA73Ls/PcfYf18fHTA25ypTWPXcTr/Lu5xWt8ZfMzYG48F NOo+qSby+Hryf7eVp8qjNpmJ9th2VLEnHzD5VgjWdybZ84gkjNZCQ4TdEM6W9df2ICr42i unK/ILz5a6HCTuUrHOWZ/WU+aGdSlLUzw39VaJwiAH+xe0brQAamOItN7bf0LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntNj0B1Yz7b5 for ; Fri, 09 Jan 2026 20:17:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 801d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:17:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 2727bdebb366 - main - sdio: add sdio_{read,write}_2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2727bdebb366c3741509eb3553f0fee2453729d3 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:17:24 +0000 Message-Id: <69616254.801d.784d49f6@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2727bdebb366c3741509eb3553f0fee2453729d3 commit 2727bdebb366c3741509eb3553f0fee2453729d3 Author: Minsoo Choo AuthorDate: 2026-01-06 16:57:25 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:17:12 +0000 sdio: add sdio_{read,write}_2 This is equivalent of sdio_readw and sdio_writew in linuxkpi Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1951 --- sys/dev/sdio/sdio_subr.c | 30 ++++++++++++++++++++++++++++++ sys/dev/sdio/sdio_subr.h | 2 ++ 2 files changed, 32 insertions(+) diff --git a/sys/dev/sdio/sdio_subr.c b/sys/dev/sdio/sdio_subr.c index f234eb8bdc84..64b1145e2057 100644 --- a/sys/dev/sdio/sdio_subr.c +++ b/sys/dev/sdio/sdio_subr.c @@ -166,6 +166,36 @@ sdio_write_1(struct sdio_func *f, uint32_t addr, uint8_t val, int *err) *err = error; } +uint16_t +sdio_read_2(struct sdio_func *f, uint32_t addr, int *err) +{ + int error; + uint16_t v; + + error = SDIO_READ_EXTENDED(device_get_parent(f->dev), f->fn, addr, + sizeof(v), (uint8_t *)&v, true); + if (error) { + if (err != NULL) + *err = error; + return (0xffff); + } else { + if (err != NULL) + *err = 0; + return (le16toh(v)); + } +} + +void +sdio_write_2(struct sdio_func *f, uint32_t addr, uint16_t val, int *err) +{ + int error; + + error = SDIO_WRITE_EXTENDED(device_get_parent(f->dev), f->fn, addr, + sizeof(val), (uint8_t *)&val, true); + if (err != NULL) + *err = error; +} + uint32_t sdio_read_4(struct sdio_func *f, uint32_t addr, int *err) { diff --git a/sys/dev/sdio/sdio_subr.h b/sys/dev/sdio/sdio_subr.h index 2d2ae9b01230..96df2e7d658a 100644 --- a/sys/dev/sdio/sdio_subr.h +++ b/sys/dev/sdio/sdio_subr.h @@ -95,6 +95,8 @@ int sdio_set_block_size(struct sdio_func *, uint16_t); uint8_t sdio_read_1(struct sdio_func *, uint32_t, int *); void sdio_write_1(struct sdio_func *, uint32_t, uint8_t, int *); +uint16_t sdio_read_2(struct sdio_func *, uint32_t, int *); +void sdio_write_2(struct sdio_func *, uint32_t, uint16_t, int *); uint32_t sdio_read_4(struct sdio_func *, uint32_t, int *); void sdio_write_4(struct sdio_func *, uint32_t, uint32_t, int *); From nobody Fri Jan 9 20:17:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntNh398Tz6B9fp for ; Fri, 09 Jan 2026 20:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntNg73f4z3KTG for ; Fri, 09 Jan 2026 20:17:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R111xsowtqC64YJuKctubv55j2o4grAR5XbuHXeEA2A=; b=EFVo4Ho4agc/jYgDSQa+UVa47z5RBIKIYgO6M3l74Af67YFvZqwp+pKQhk5ngV2MIWdaWI WCA75xbB7Dt2WH9yMy1Ct/cc/GCBHCoqMKyIgti5Plbw5ch/nd0Xk4k1i9FbZ3ejVHuAv8 fzAaD/Br/5YQw1SNzhHbuBxyI3t/dayv6s5LnLmNtT5e7o5hMWAMQDNjA7Wna0ZjZsHTKI RBfejfIyIPH/WmkPjjFfGgTITZUqPPdkPJZD7PdI0kATCAO/1G9+s932YgKDlm478VUVDL Q41rC+9IKaQkZ5q+asgZPoljDHPi0OBZb/uxPSGzHlhnQCGA2fsGZQHjgnX03A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R111xsowtqC64YJuKctubv55j2o4grAR5XbuHXeEA2A=; b=FzggVIwGsw11e34rjtovlVFJ5bffdple84d0Bvs5JvZlrkW3q7xGyQaKLqEMYfP/c9sMnK 2/4oAID6oP0rzR+V43Sti844ja3TnY4To/RBpsLZ5vOpg7bFXkXqgrJI+QXWcSbZU/LwTG HdnBJxQnbYtGGIEvUQUTXAZBolmmCXfjqubbstlofOyKs8sUGLO9STFkEH+ke0Ciwoqn+o /1yHUkcz5hLD4IlUhKtqs33GEO+i1KPkFitP8RH5Wf5Cla6OLcXL1G1W9EGw04AMToO+Lx IEo17+oJpWJSXZ8L/ZHm78kcqRLa5SWZKc/LJMU4XrL+2TyY1iy29VHAs6j/dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989844; a=rsa-sha256; cv=none; b=HtqBp4iYnFtCBjW3H9lXskuNQnpryJnkMplATVBlqERY4hwOeQ2j4LoN87saQgb/kjNGYl 3sT0pgAVvVrH1PFW7cquDAIPd9ncVBXPAqd5pReR7N39a4MmsrjHtPFn4hwtB69EHNTuDP R0oFj6Abs2bSNxGkplAh6CXX194XBlaoTxzyWJIlSR1mMuK1fircP7U6UdrztH8lNYnzkq RjVgC+qVg73aACvjNvd4b+/iDEqEXu1ypWkVutZ2UptU6NVRFwepJLrg3ek4vZMTnok0gU zCTD6tr3EL/jYyMxT/g+KVx5GW/H6VesJxPrVIL8FWqhPET7fcPz1vev9Lavbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntNg5Kpvz7bF for ; Fri, 09 Jan 2026 20:17:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8368 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:17:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: AZero13 From: Warner Losh Subject: git: 930a1341d62c - main - device_delete_child should be destroying the child, not the dev List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 930a1341d62ccc4be969c2261e3abaf0c0573a9f Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:17:23 +0000 Message-Id: <69616253.8368.67a63d9f@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=930a1341d62ccc4be969c2261e3abaf0c0573a9f commit 930a1341d62ccc4be969c2261e3abaf0c0573a9f Author: AZero13 AuthorDate: 2025-12-18 02:09:31 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:17:12 +0000 device_delete_child should be destroying the child, not the dev MFC After: 1 week Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1934 --- sys/kern/subr_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d2363d6c625e..c9d64e3674c6 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1557,7 +1557,7 @@ device_delete_child(device_t dev, device_t child) return (error); } - device_destroy_props(dev); + device_destroy_props(child); if (child->devclass) devclass_delete_device(child->devclass, child); if (child->parent) From nobody Fri Jan 9 20:17:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntNl3fS2z6MJw7 for ; Fri, 09 Jan 2026 20:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntNk6Txxz3KWT for ; Fri, 09 Jan 2026 20:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xvl1eU+0I7bFQiELZim5tqyD4eK4bwPg6qNaAK2lMqg=; b=IWz0D0RdFx8sdETJAgZRZhVVBp7zOmUP1SI5Cr7JKBusdRU0/d3dpZknrNE67UBXYpwxce DHpINbkgcNo3ztZ3mLua0NvW9IMpsUdDBefeNiuF/02Sya7nXCJqlWUwrIgfQJZa+mYglk pPJWJHCQEEFN7/bATuAz3kkOvjo+Mi7abm2+u2ZF+uGistAb1WljI+J7J1g52PDU5rbSO6 sbfWzmjfR6EydZpc5qGeclxBOzIBCHorTOIOQOP73eB0ETsxIdaO7JPp1UClrbn1JPPxp8 DfzL5JXHEJdMeNtMZ+NsQqtX+SUzO062JghZqi18wANq3cv9WBz2QnSUVogTQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xvl1eU+0I7bFQiELZim5tqyD4eK4bwPg6qNaAK2lMqg=; b=IoWCXG+9jjtxG7J7Nwjpp4DdElaPWAifYbs3gm93hK0b0VMFHe2l7SwpFINligRtAyrlve GFk6jzrw4O2XO3XaIQXGXHLBLj1G0DLd3BOsbmMp7Vg+K6pav+6c9pegbpODhP3dIWK78c bTCnIApY98EgRFEVlNxIgDIF4/XrbXTEGjt+VdeixpPRaaH/q3G6PFZB/5EfDE+h2h4aVs NgqlYD5/201NUrWTrsGE1+NPGRsvsuKtUQPT1RLifBR6PyzJ/J3IKLCQu9HsTJvPCSvwgP 9RHuQAfAntW4XCnvdfc7tctS3PLgIQCRN+T+Wh/0q+tki/FDpgBXQh/sNLnmAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989846; a=rsa-sha256; cv=none; b=f6fsEHcijtX+kh/MPLWbgUQoWAMN22nTsw0ziha8KjX87SQ3SaBzpijqEXM57gyigl2MIF xP8iWNf0lcrBBmjf7JHZENabuoVkDaU9IdjfSSqDjsBMJ08b2A1ihY3Azcd34GNhZZ39Ja xepuAqQF23gs2eXQHbu+QXThejsfs0QU4rSMCErwoKw+K7sY6w0Ph9KE9UqmcXmdgCLNP5 bUFFODfJtK+IaxQ1guOwEs+9piNiIeAm1t8H7Y7KiEBHkp5XYJ5Dg0kX9pbpzp1kObnyni 0CSJX+vcvMR4M3XaLMfT6JTvkMIjqIywxnAu5ZdNoFInllMZcOEfEPBy1ecQSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntNk64rSz7gb for ; Fri, 09 Jan 2026 20:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8983 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:17:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Lakshmikanth Ayyadevara From: Warner Losh Subject: git: 3e72ce4081f4 - main - Cron: add CC and BCC option for crontab variables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e72ce4081f4a8d6b1d879dae201d569ce450261 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:17:26 +0000 Message-Id: <69616256.8983.4372cc3b@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3e72ce4081f4a8d6b1d879dae201d569ce450261 commit 3e72ce4081f4a8d6b1d879dae201d569ce450261 Author: Lakshmikanth Ayyadevara AuthorDate: 2025-10-02 16:08:09 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:17:12 +0000 Cron: add CC and BCC option for crontab variables Signed-off-by: Lakshmikanth Ayyadevara Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1865 --- usr.sbin/cron/cron/do_command.c | 6 +++++- usr.sbin/cron/crontab/crontab.5 | 14 +++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/usr.sbin/cron/cron/do_command.c b/usr.sbin/cron/cron/do_command.c index 43b3269d3087..58eed70c1be6 100644 --- a/usr.sbin/cron/cron/do_command.c +++ b/usr.sbin/cron/cron/do_command.c @@ -82,7 +82,7 @@ child_process(entry *e, user *u) { int stdin_pipe[2], stdout_pipe[2]; char *input_data; - const char *usernm, *mailto, *mailfrom; + const char *usernm, *mailto, *mailfrom, *mailcc, *mailbcc; PID_T jobpid, stdinjob, mailpid; FILE *mail; int bytes = 1; @@ -104,6 +104,8 @@ child_process(entry *e, user *u) */ usernm = env_get("LOGNAME", e->envp); mailto = env_get("MAILTO", e->envp); + mailcc = env_get("MAILCC", e->envp); + mailbcc = env_get("MAILBCC", e->envp); mailfrom = env_get("MAILFROM", e->envp); #ifdef PAM @@ -547,6 +549,8 @@ child_process(entry *e, user *u) fprintf(mail, "From: Cron Daemon <%s>\n", mailfrom); fprintf(mail, "To: %s\n", mailto); + fprintf(mail, "CC: %s\n", mailcc); + fprintf(mail, "BCC: %s\n", mailbcc); fprintf(mail, "Subject: Cron <%s@%s> %s\n", usernm, first_word(hostname, "."), e->cmd); diff --git a/usr.sbin/cron/crontab/crontab.5 b/usr.sbin/cron/crontab/crontab.5 index e4e6fae0b01b..5353e3de1b00 100644 --- a/usr.sbin/cron/crontab/crontab.5 +++ b/usr.sbin/cron/crontab/crontab.5 @@ -128,9 +128,19 @@ If is defined (and non-empty), mail is sent to the user so named. If +.Ev MAILCC +is defined (and non-empty), mail is carbon copied to the user(s) so named. +.Ev MAILBCC +is defined (and non-empty), +mail is blind carbon copied to the user(s) so named. +If .Ev MAILFROM is defined (and non-empty), its value will be used as the from address. .Ev MAILTO +, +.Ev MAILCC +and +.Ev MAILBCC may also be used to direct mail to multiple recipients by separating recipient users with a comma. If @@ -298,7 +308,9 @@ is started or the crontab entry is reloaded. SHELL=/bin/sh # mail any output to `paul', no matter whose crontab this is MAILTO=paul -# +# CC and BCC mail to `lakshmikanth@example.com' and 'paul@example.com' +MAILCC=lakshmikanth@example.com,paul@example.com +MAILBCC=peter@example.com # run five minutes after midnight, every day 5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1 # run at 2:15pm on the first of every month -- output mailed to paul From nobody Fri Jan 9 20:17:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dntNm2v50z6B9fw for ; Fri, 09 Jan 2026 20:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntNl74Pjz3KWV for ; Fri, 09 Jan 2026 20:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA54Poiw4fQG7sTBNdaYsmnzLpLip5/hkDz23FPMGOY=; b=LzMe/k6tJknebb1fpmBMvdE1YbTZomKP1C0SX6SMKESNeCUtBDQj26Ky4IPLevbPCQpgeT F+Q+rnVj0PE45DqJXBvnbCfK2+7fgUshEAc64VIKZDh7ILJmYVsNGUDQwP5SlK0YVK7Cfv xwI1dN+K9l+C3pyEZnR5N0o7Cq5kUxHEh6AgDRIJMnrNzL+yCDZh1qmmLo7Y0sPil1Xj3z 3+mM5fa3kd8nT0XGXOgXWr+NcNLBfkS1AgAvoWnL/4/42JQFN5oMkKk/1EGCvfjEcGNw2/ KhZjppH9BjLD6HRkVoQZm4Br9dVaFp4t15mg6D3xNbDTSp1ouoWa5nuIhMFpCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA54Poiw4fQG7sTBNdaYsmnzLpLip5/hkDz23FPMGOY=; b=C3eRCkvlFqP55D5dWDkjuTUNG6y7TEE9Wp0jt5TiUhwPzL+8owracbwtQZGU4SMy4UtEcS d+d1F2I6tE7Rkc1ApJylZoOMz9OIawCFNmOJ2EamWp2rEpu4v77rLqmrBvm3rY4L0qJTG6 lB2atTu7oDenvJCC5J61IAaKdjA3iI2Xk+Lttly7yTP4OLIXWsJ3rA5ZzU/rHlw0G9XMmp p1jXndtLf/ORH1RXU7Z1tP+VXku7BbUJEzXxQY/drCq3/5JJgmuHi7zTdzQkQpc+M8NAlB RjiCLvYHktbUtMRb0zI2cH1r5NiEW8AM9VAAPpibjRBdrDYwJ6k5UTHVYhvC2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989848; a=rsa-sha256; cv=none; b=MePH4f4svlr8tYGeOoAVNLSl+SZfbdxZI597NnnrJ/oKD0ItHIl8XQYEWp8gp3uwzjTrUt hUcRjL8ylKwulUy/EXEQmI+LqySPj83ffU8JcLPvoRscwGS2xs2lpEuXR14KR3PSX2+cC9 u6zvthljJ2s3QmQfv6eZTj/Dju/F+9AUVaUTamr6K+uUoh0G+KAhahYuQYegneCVR+/Stz Rf/MqqHEQ7Go3Gu04Rnkbq8uTIS/Jta3AQvB4o6YiUnLMqgub462pKZihJO1xVzD/F2jCg 3q5pwVONcDTsnlE7nwG2iOU5KIRE8p66iQNkf+U0BvqEg/VC2X8jK7EK+r02qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dntNl6XYMz7d8 for ; Fri, 09 Jan 2026 20:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8255 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 20:17:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jack Bendtsen From: Warner Losh Subject: git: 763179042246 - main - Fix NULL deref segfault in bhyve's usb_mouse.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7631790422464de1aec309018e2c444defe5f629 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 20:17:27 +0000 Message-Id: <69616257.8255.cd9e3ac@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7631790422464de1aec309018e2c444defe5f629 commit 7631790422464de1aec309018e2c444defe5f629 Author: Jack Bendtsen AuthorDate: 2025-06-19 07:40:31 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:17:13 +0000 Fix NULL deref segfault in bhyve's usb_mouse.c Some of the cases inside umouse_request() (usr.sbin/bhyve/usb_mouse.c) use the data component of an event, while only partially checking if it's NULL. 'data' has a NULL check, but then 'data' is immediately deferenced anyway after the check regardless of if it's NULL or not. For example: case UREQ(UR_GET_STATUS, UT_READ_INTERFACE): case UREQ(UR_GET_STATUS, UT_READ_ENDPOINT): DPRINTF(("umouse: (UR_GET_STATUS, UT_READ_INTERFACE)")); if (data != NULL && len > 1) { USETW(udata, 0); data->blen = len - 2; data->bdone += 2; } eshort = data->blen > 0; break; There are actually four occurrences of this same bug, each in a different case in this switch block. Signed-off-by: Jack Bendtsen PR: 282237 Reviewed by: imp, jhb, vexeduxr MFC After: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1728 --- usr.sbin/bhyve/usb_mouse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/usb_mouse.c b/usr.sbin/bhyve/usb_mouse.c index 82b1159d5f61..5caad886e082 100644 --- a/usr.sbin/bhyve/usb_mouse.c +++ b/usr.sbin/bhyve/usb_mouse.c @@ -538,7 +538,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer) data->bdone += 2; } - eshort = data->blen > 0; + eshort = data != NULL && data->blen > 0; break; case UREQ(UR_GET_STATUS, UT_READ_INTERFACE): @@ -549,7 +549,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer) data->blen = len - 2; data->bdone += 2; } - eshort = data->blen > 0; + eshort = data != NULL && data->blen > 0; break; case UREQ(UR_SET_ADDRESS, UT_WRITE_DEVICE): @@ -634,7 +634,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer) data->blen = len - 1; data->bdone += 1; } - eshort = data->blen > 0; + eshort = data != NULL && data->blen > 0; break; case UREQ(UMOUSE_GET_PROTOCOL, UT_READ_CLASS_INTERFACE): @@ -643,7 +643,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer) data->blen = len - 1; data->bdone += 1; } - eshort = data->blen > 0; + eshort = data != NULL && data->blen > 0; break; case UREQ(UMOUSE_SET_REPORT, UT_WRITE_CLASS_INTERFACE): From nobody Fri Jan 9 21:03:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPZ0vFfz6MMkP for ; Fri, 09 Jan 2026 21:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvPY6zM1z3SWb for ; Fri, 09 Jan 2026 21:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WzT+rWHWiSByVQ4t0Kar3CUGPJNJ2IkijtxNeb7Dbmc=; b=F4GF3epbULsOQUr4VHkvrJ+hzqi9tXLgWMu3BJ3O3RL9lcsqUNSkJKNe9XQGmwYILLB/uB LU+92V4Zx1WdkCZSpVXFNXBZeqY6+U5RJPE/YjvXQiNWGfKCdXlK9fe3pyOY4HgsgbFSVm HkKBcnFVAHq9ii7l4UQ3WjR7naCS0EC3l4LR9F1jXHFwa2QByyzhuULw4Z9q0xBnU76qWF v0vjcjUPPP6nsn2wabeECedlwPkNRZV9wbA3y1GMZKYSkhHj2CZekRCYU0sj1obI5vppxD CltCW/5uuQMZLwOchONS63W9kh9dwgZR6E0FJv0kjtArQA2D/UZtAC6iZu2SVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WzT+rWHWiSByVQ4t0Kar3CUGPJNJ2IkijtxNeb7Dbmc=; b=qjwGLiHwDKIgLYL8paz9Ntay2SAp0latUnk6tjq+YVyi9xTTZ31T3JX/B8sfjClNnk0KlH xC3JVriu7mDssvo4f8XaOjeIT55WHVnOIzmRd44W5XXbAmrm/URZxczEPX2W2U6zBCV8vd 7xRUomPANA2Tj2HP4NGO2t6hNcmjCwedrJyu/9/fZxnYC+EhPAMQNi/Kal3JMQcRvoj5XS LVjP+hW6A6erWJUzLlG5x64NKvky0MwvpqfKkS1JgyOSSWijnYN9o/fInGMc4Jt7Mh2uz9 sb/z0CjrshfYZ/lC8iZapXGKX8aL1fZ/BfTjDSW8Y4okxjnkCHse86H5VM6v9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767992594; a=rsa-sha256; cv=none; b=Qmplgm7B7H9vPYOdLClJ0eyYpem84yntjQjnY0Nl+nrR7iTpg8mKXtn9zjjiCdi7BUaYLO lwbGCDTOm/OVkO2ngUrRR1bcLqWGTvSS/zUkZTUXF4Q5Pe2PUrlCHP/pEoXeTYO7XxNTiJ DXsARt6e+UiUMNo6U1j7826W6QrgDlTNUGHuitEUzMUVOnI2E3gIe6vuxSINOn5yYIz1L8 MW7OuLIDy8+1LCSxCUbjfhQH12hcmaFvbWhG+T7xR1/nQzEnXmUfEmT8ooclG1GDFwvMPG Pp54LeiTMHJE2TfWeuoWbpX+B9QuTvZIP0HqOC8bDdRzDTw+E3KE4nEKQH4Sbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPY6Tjgz8Wd for ; Fri, 09 Jan 2026 21:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d880 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:03:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Alexey Sukhoguzov From: Warner Losh Subject: git: 4c18ec0e75e1 - main - nvme: Handle get/set feature payloads List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c18ec0e75e1f2ca99e587d749a9191513e63a29 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:03:13 +0000 Message-Id: <69616d11.d880.61fff2c0@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c18ec0e75e1f2ca99e587d749a9191513e63a29 commit 4c18ec0e75e1f2ca99e587d749a9191513e63a29 Author: Alexey Sukhoguzov AuthorDate: 2024-10-30 10:48:09 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:32:48 +0000 nvme: Handle get/set feature payloads Signed-off-by: Alexey Sukhoguzov Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1444 --- sys/dev/nvme/nvme_ctrlr_cmd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr_cmd.c b/sys/dev/nvme/nvme_ctrlr_cmd.c index 5a44ed425acb..1a48a058edd8 100644 --- a/sys/dev/nvme/nvme_ctrlr_cmd.c +++ b/sys/dev/nvme/nvme_ctrlr_cmd.c @@ -171,7 +171,11 @@ nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, uint8_t feature, struct nvme_request *req; struct nvme_command *cmd; - req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg); + if (payload != NULL) + req = nvme_allocate_request_vaddr(payload, payload_size, + M_WAITOK, cb_fn, cb_arg); + else + req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg); cmd = &req->cmd; cmd->opc = NVME_OPC_SET_FEATURES; @@ -193,7 +197,11 @@ nvme_ctrlr_cmd_get_feature(struct nvme_controller *ctrlr, uint8_t feature, struct nvme_request *req; struct nvme_command *cmd; - req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg); + if (payload != NULL) + req = nvme_allocate_request_vaddr(payload, payload_size, + M_WAITOK, cb_fn, cb_arg); + else + req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg); cmd = &req->cmd; cmd->opc = NVME_OPC_GET_FEATURES; From nobody Fri Jan 9 21:03:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPb3gyRz6MMkQ for ; Fri, 09 Jan 2026 21:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvPb1DTMz3SZ3 for ; Fri, 09 Jan 2026 21:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dImSlSENP4g7suHF1HfwEw8OJCbLTNW6k58zXk93QT8=; b=XVy1ZnH3T8CuVBKEflR9BOBCNu/1lw+dCaFVdiBucjYSFAtCGA7RsoQTHJh6JTrGqCXsX8 rI4P8zfD3tDfRIuOlK4ZHIXzNHFEkyo4Q0xQU8oDzBH6Mc3RWP50L6Q5A2O3SbFOJBfzw+ YFJtztXc0g+wxJoH5vQU9qQHfp11KVjTgtZFT06/XtDmZgACfJw60/AZXUUeLGzcRWWmWE s3tsHiIZhIzhVgmvrTagDKup/lbM4GRKngigwP4SwLBxM1QxIgASlBq0It5AB7LZecrDY0 BbblAF//gaJeQUpO/pmgLt15uxmr+GRR9udo6RtW+t5NuMYo6tE/+pTAYvFeWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dImSlSENP4g7suHF1HfwEw8OJCbLTNW6k58zXk93QT8=; b=bDffJMyM3SPQoTA4v9owwBThColHeINKNuuonwnYp6gGGhOi6D+SV18+30qzlHyhrVQfB3 B9rnRRAZdmVVDYG1MPB1fz/HTEn2jMjeBCF0wJGOuYuWAdVUdXMmyC5nYY1F8rLqOr4TkA YFi50L4Z5Y9HO49vI0goxkW1DAtlLQ/a7GiFOTUiRth7bBOoBxVXPf962mCZRm1ju2WZx6 QTWsvz/eqOw5/Ya0GfbYUrYiydGn46s5Nw92BHA94eGQygiox/+nO2A8QLwcdoMiKIp4wL B2FpA/gatmnzxwxH0mXlH+Svq9cFtPoITMImlCzAanwjE+EwHeEu8t2q7iPTeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767992595; a=rsa-sha256; cv=none; b=PZkc0yJIWMQtCUnJjNy9H06LckZDR27UGF2RabY4TeVRP/LhdLs2u9HNn/krbYmReUJE36 7dPe+GlqJUckTQwZLJVRDMVVI+liZgmeKGbW5e2zRtPMXniW2h/nB6JdlChAz01+DsLY9T MIampsmQdqIBFu6Vm5ExXZUX/eC0xCokVwP4uMYzi1dsl4xKoC98Og1f1L/NolDF1Gh2Vm 2IZxMfcmwKyl8nUhiGGkGhO/oyoKPUQpHJBihiGhkIfzhaPln7OcxU/rlrk2Wfcc4o0FDT sbu44Btcc+OqO3+IzNN+XwuyJ72QDY2TmgBmdDTf0KChlsbhctzwY7UYXs5QJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPb09yyz8v3 for ; Fri, 09 Jan 2026 21:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ca13 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:03:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Alexey Sukhoguzov From: Warner Losh Subject: git: a24932dcec45 - main - nvme: Support Autonomous Power State Transition (APST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a24932dcec45ca68fa5ca2f49bbf0df539cfd710 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:03:15 +0000 Message-Id: <69616d13.ca13.6b6492c6@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a24932dcec45ca68fa5ca2f49bbf0df539cfd710 commit a24932dcec45ca68fa5ca2f49bbf0df539cfd710 Author: Alexey Sukhoguzov AuthorDate: 2024-10-30 11:03:30 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:32:49 +0000 nvme: Support Autonomous Power State Transition (APST) APST is an optional NVMe power-saving feature that allows devices to autonomously enter higher non-operational power states after a certain amount of idle time, reducing the controller's overall power consumption. Signed-off-by: Alexey Sukhoguzov Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1444 --- share/man/man4/nvme.4 | 9 +++++++++ sys/dev/nvme/nvme_ctrlr.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/share/man/man4/nvme.4 b/share/man/man4/nvme.4 index dcd2ec86f5fa..d24ffc07ef9e 100644 --- a/share/man/man4/nvme.4 +++ b/share/man/man4/nvme.4 @@ -128,6 +128,15 @@ hw.nvme.hmb_max .Pp The default value is 5% of physical memory size per device. .Pp +To enable Autonomous Power State Transition (APST), set the following +tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.nvme.apst_enable=1 +.Ed +.Pp +The default vendor-provided settings, if any, will be applied. +.Pp The .Xr nvd 4 driver is used to provide a disk driver to the system by default. diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 7e1a3f02f326..2c13dac96342 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -781,6 +781,41 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr) } } +static void +nvme_ctrlr_configure_apst(struct nvme_controller *ctrlr) +{ + struct nvme_completion_poll_status status; + uint64_t *data; + int data_size; + bool enable, error = true; + + if (TUNABLE_BOOL_FETCH("hw.nvme.apst_enable", &enable) == 0 || + ctrlr->cdata.apsta == 0) + return; + + data_size = 32 * sizeof(*data); + data = malloc(data_size, M_NVME, M_WAITOK | M_ZERO); + + status.done = 0; + nvme_ctrlr_cmd_get_feature(ctrlr, + NVME_FEAT_AUTONOMOUS_POWER_STATE_TRANSITION, 0, + data, data_size, nvme_completion_poll_cb, &status); + nvme_completion_poll(&status); + if (nvme_completion_is_error(&status.cpl)) + goto out; + + status.done = 0; + nvme_ctrlr_cmd_set_feature(ctrlr, + NVME_FEAT_AUTONOMOUS_POWER_STATE_TRANSITION, enable, 0, 0, + 0, 0, data, data_size, nvme_completion_poll_cb, &status); + nvme_completion_poll(&status); + error = nvme_completion_is_error(&status.cpl); +out: + if (error && bootverbose) + nvme_printf(ctrlr, "failed to configure APST\n"); + free(data, M_NVME); +} + static void nvme_ctrlr_configure_int_coalescing(struct nvme_controller *ctrlr) { @@ -1047,6 +1082,7 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting) } nvme_ctrlr_configure_aer(ctrlr); + nvme_ctrlr_configure_apst(ctrlr); nvme_ctrlr_configure_int_coalescing(ctrlr); for (i = 0; i < ctrlr->num_io_queues; i++) From nobody Fri Jan 9 21:03:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPc4ZQpz6MN3n for ; Fri, 09 Jan 2026 21:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvPc110Fz3SnY for ; Fri, 09 Jan 2026 21:03:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8vTzhZL4OaNB6PCuZzkqq3wx+TGUMlf34TWZbRFanc=; b=hBM98u1vfyokVTY//EcE9nOU5K6rTJw0dfjSuUVNR5Dv0mNaRN/34DE8waN3S16wx5wjXh 5TJeog5qf8+JuNgD2QXgbg2SI33lPS2hslkOGpkY1W8ezeuzMZ59scGP0DrzEPvMY+DXwE ilwGgnA/DVjpgus6xxa+v26fW1DVKumIZogT/meSzUKv2y16bPjwoCi4ivYqJ2rfkT/tfO BiX0VAP+mapgV/s0w6eaCoqKBExKydFEcqpBaNO3IhkzcRx9m+xiMdk3+yK4SYfQAIWd7M HQzNXvdEnpvw318F7d+EwPUanPxyOK+X4eb9AOCciYlU65QMCq+qmDFgH2LQ9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8vTzhZL4OaNB6PCuZzkqq3wx+TGUMlf34TWZbRFanc=; b=OTknP4ZnAMwnOsJcS4p5T0ppK/D6CF8ifcun+3PXOVzMjFr3i+n2rMQkdKe4TDHrfDIEuA b3jxk0XWnf85TDqO86GOavFYfteNb9nsv60FwANNCVoPLvGNaKsZIe/J7tf0a2mR2nmpib yrhiHo2u95uTzkpcyjO8M9YKiOVbUQZuCCueRQFEodwHr9hcbtk05KaFNAUAbbxLOtuNGv +RiGvU3f/ONWMOtNs6mUQwlgS86BQv2syQQ15YJyLZOoiIoQqI/mPRDNt5hXAZeHZ/5oVH xDjTYqVbiIrY9rPet3VZBQcvkdWHDvP4nLZFuoyJTGOYVobeuzpQIYIDzVw/gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767992596; a=rsa-sha256; cv=none; b=hkQTKyojKmp6pqJwtGSRHr9FvXK19sFy/khJJTKw+H9I6MJOHqV6K9IN4QbgF9XaeuLneQ lNO1OxlVgoJT5mXd4OaYgj6OSiF00bt0Lhsqdcf46weWZoCyXWz3L/nyrd6H8E5sXDE+zk QrUjWrtB7lFWXNCodxwYCH54QWzN3INaWlDWTFhl1zCSxfW92fVwymWyAe7va2Jwc2U4q9 YvtAZZhVRQ/8ouuiKqhIZQB/c7uuPh2TLjOHbU+K/fB82PcXRuuUCoRL6EstS3Hj8JZtJI DjIRTmwONaXI7kd99hOixipnbt3qzIzx8C9F7vRkerwpGKvvuezGJ4mtAatnnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPc0Vs3z985 for ; Fri, 09 Jan 2026 21:03:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d0b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:03:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Alexey Sukhoguzov From: Warner Losh Subject: git: f0d44ee06b68 - main - nvme: Add APST payload overriding List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0d44ee06b6814224653324e09a948e15a177d1f Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:03:16 +0000 Message-Id: <69616d14.d0b7.4059aed4@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f0d44ee06b6814224653324e09a948e15a177d1f commit f0d44ee06b6814224653324e09a948e15a177d1f Author: Alexey Sukhoguzov AuthorDate: 2024-10-30 11:04:49 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:32:59 +0000 nvme: Add APST payload overriding The apst_data tunable allows APST configuration to be adjusted during controller initialization. It accepts an array of encoded integers, each defining specific transition parameters. Relnotes: YES Signed-off-by: Alexey Sukhoguzov Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1444 --- share/man/man4/nvme.4 | 12 ++++++++++++ sys/dev/nvme/nvme_ctrlr.c | 22 ++++++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/share/man/man4/nvme.4 b/share/man/man4/nvme.4 index d24ffc07ef9e..76960a7e06c8 100644 --- a/share/man/man4/nvme.4 +++ b/share/man/man4/nvme.4 @@ -136,6 +136,18 @@ hw.nvme.apst_enable=1 .Ed .Pp The default vendor-provided settings, if any, will be applied. +To override this, set the following tunable: +.Bd -literal -offset indent +hw.nvme.apst_data +.Ed +.Pp +The string must contain up to 32 encoded integers, e.g. "0x6418 0 +0 0x3e820". +Each value corresponds to a specific available power state starting +from the lowest, and defines the target state (bits 3..7) to +transition to, as well as the idle time in milliseconds (bits 8..31) +to wait before that transition. +Bits 0..2 must be zero. .Pp The .Xr nvd 4 diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 2c13dac96342..26194ccbb8f8 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -786,7 +786,7 @@ nvme_ctrlr_configure_apst(struct nvme_controller *ctrlr) { struct nvme_completion_poll_status status; uint64_t *data; - int data_size; + int data_size, i, read_size; bool enable, error = true; if (TUNABLE_BOOL_FETCH("hw.nvme.apst_enable", &enable) == 0 || @@ -796,13 +796,19 @@ nvme_ctrlr_configure_apst(struct nvme_controller *ctrlr) data_size = 32 * sizeof(*data); data = malloc(data_size, M_NVME, M_WAITOK | M_ZERO); - status.done = 0; - nvme_ctrlr_cmd_get_feature(ctrlr, - NVME_FEAT_AUTONOMOUS_POWER_STATE_TRANSITION, 0, - data, data_size, nvme_completion_poll_cb, &status); - nvme_completion_poll(&status); - if (nvme_completion_is_error(&status.cpl)) - goto out; + if (getenv_array("hw.nvme.apst_data", data, data_size, + &read_size, sizeof(*data), GETENV_UNSIGNED) != 0) { + for (i = 0; i < read_size / sizeof(*data); ++i) + data[i] = htole64(data[i]); + } else { + status.done = 0; + nvme_ctrlr_cmd_get_feature(ctrlr, + NVME_FEAT_AUTONOMOUS_POWER_STATE_TRANSITION, 0, + data, data_size, nvme_completion_poll_cb, &status); + nvme_completion_poll(&status); + if (nvme_completion_is_error(&status.cpl)) + goto out; + } status.done = 0; nvme_ctrlr_cmd_set_feature(ctrlr, From nobody Fri Jan 9 21:03:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPd5Zy3z6MMkb for ; Fri, 09 Jan 2026 21:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvPd2rJ8z3Stg for ; Fri, 09 Jan 2026 21:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E4cFnFjfT5XkCXo2sAlFGgInotwM7ZJHhqdTa3NRUgQ=; b=BRYGoPqLfDNtMJ1qIZOHP+diguYYtNbVJGI0eUwgBJNDQ+Jb1My/d/oLUmxia5qC/21ZP7 oo8JJLzwXSuYKd0THpnTVQTE2H4zI5jgOGoWsFAvkCw5qqSZDBD865lheYzGBfZxXorQx1 HNsuPuNtH70+UdLWaBcclofqDrx0JUOj4w+TOT6tNY9caXDwcweyNmKxXl2to+yahb2tTF ioj/4FBkip0q6eZdwiyRVH4PJRblKGuA5hCXLRfCOCQm4dbPExb81kc0SZ7/1WD7UFJKwF 2PIrnX/yt3p4td743H8Q8Mn+3Agf9eX2SyEyaoKKFjmFXkz4N00PxPmNI6gs4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E4cFnFjfT5XkCXo2sAlFGgInotwM7ZJHhqdTa3NRUgQ=; b=nSbF4UvnSlu35blrhA2FsxFbtkykcG+Ebtz0Gn1s1Mv3dVJq5IynY/mH/auhP/R0944Qhe qwUOuPKtKMa2W9Q4QjfAkOV8LL3d34g+yosSoVTaagHAWzI/wEYeojhUbvIUzrMRumgI8G X80dCiAIREdRZYwdccRWfpa5gnaZoiiiNebGgutCmF8q5msofwIGo6MsVB9szB5KzMA11F rr0o0iKYdyVHNG0sZaMBKehCDeK/3R3VJYy7tTvpa4uwlv5Q9ruEbgY6y7v+xIO0lXYRdN rcLATGN7V8T2Tz3Btwq6UP+Qs9RV6xVlargsnTHp/x2WgpwQFbUXME6pfs3XsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767992597; a=rsa-sha256; cv=none; b=ktkaZhfmFDMcwcWfGTX1lxbuuF24yFHkFzlJsvt7M3+4qegXL6L7XzpvU5k1V0KjRFb1ul 5cvbKJEsyAM3HVsbBqHzlNXLe/u/v81s7/3Q2TPHG2nqIs4EDm9qSsbdo4WVBSKfMSBbNY u2uzt4UtIqk3yqxyoFC81RHWSZyHTnNZ1+f7IZtYlPyjfqTvkak3GDQVfasSO+sInVoX24 soD2xWCBw4Ft64DyBDAixuorEZ+y2I0uvOeAoZlJ1qjWa4FhuGHLeMYoK+O6SlwJT3rVw7 fUCiuIKi08V6Xo7PUIsLUM1mIlTFjywXl6keyGcTHT8pE86dEEX3n7RAhvHXbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPd1KMQz8RT for ; Fri, 09 Jan 2026 21:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id cbdf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:03:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Quent=?utf-8?Q?in Th=C3=A9?=bault From: Warner Losh Subject: git: e881b8ee0bc7 - main - acpi_ibm: register all appropriate sysctls as uint List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e881b8ee0bc7bf552c9c0a63c7d84542243f9f0d Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:03:17 +0000 Message-Id: <69616d15.cbdf.16e065a8@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e881b8ee0bc7bf552c9c0a63c7d84542243f9f0d commit e881b8ee0bc7bf552c9c0a63c7d84542243f9f0d Author: Quentin Thébault AuthorDate: 2025-08-27 10:05:27 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:54:27 +0000 acpi_ibm: register all appropriate sysctls as uint All sysctls except thermal sensor readings and the handlerevents whitelist-separated string are bitmasks or small integers. This avoids some bitmasks being erroneously displayed as negative values. Signed-off-by: Quentin Thébault Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1824 --- sys/dev/acpi_support/acpi_ibm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpi_support/acpi_ibm.c b/sys/dev/acpi_support/acpi_ibm.c index c1302508b8a2..f895d48bb6d0 100644 --- a/sys/dev/acpi_support/acpi_ibm.c +++ b/sys/dev/acpi_support/acpi_ibm.c @@ -568,14 +568,14 @@ acpi_ibm_attach(device_t dev) SYSCTL_ADD_PROC(sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, acpi_ibm_sysctls[i].name, - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, i, acpi_ibm_sysctl, "I", acpi_ibm_sysctls[i].description); } else { SYSCTL_ADD_PROC(sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, acpi_ibm_sysctls[i].name, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, i, acpi_ibm_sysctl, "I", acpi_ibm_sysctls[i].description); } From nobody Fri Jan 9 21:03:19 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPh0cQmz6MN40 for ; Fri, 09 Jan 2026 21:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvPg4ZyFz3Stt for ; Fri, 09 Jan 2026 21:03:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrwVGtnISj6lKos3Fo8Olv5FUZwo9ElZk9AsS+ShDsQ=; b=oqENLL3fAQ+xG1OaEKT7umS/8NxUQ4VYyT5wn5USyAeFTNNIzsba9wTSuOVAnHs+WX/41y g+I089hJWwQj1sL6IZf1wBarf/jSoxGslcQQuLZ6itK6gofIkb9eK8qx4htSWNwpl5e/kO jUCfzg4aLTnnxZrmcIKLx3WQEGMyvp1RRot1PqCt5Tt5pI8PdeyzRmS2kJspZf6ylQRUTl ry5Pa2c/QDMyvuScsQx3NA1Ph37IxW7zT0f4xjejjbIx4WXeuomPRsEVrEgjBNe+MVSJcE Fef8xBsTvy+jLYD5pq574G1bgp0Y7EVzOizPm+myi5Dfp95IAJ9QfShy+Vdpgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrwVGtnISj6lKos3Fo8Olv5FUZwo9ElZk9AsS+ShDsQ=; b=QxJo4HFytGuiO0FRzr0WeiLIAXGEh605mC53aAN6Cdgq8kvUELpEmHme2NxRjNJU0hGHSd L3emlgljoMiWR4bZrJyOQNhevyZEkki+opWS+OYC8j7ghcDb0TbEgAgSS7rP1KZPNB7BFO m4OFOnltsxK+59Rp6I+HzQbT4gnOUK641pLcSmRGccogj5tQ0leF/HCnB9re0Aks1iSr5R oco9U5JoqUfkOzhPfBlVsiBn2+YsfsUy38/Wf+bc+QUl9VNtWa4arp9zxvWapsuVe2RkhC zqr8CpIzV57B1b86GFRE9eckxqkrZjIHqmYWnzJ2tkzDREWZxZz1NbeBxLKqmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767992599; a=rsa-sha256; cv=none; b=j+rkXukP8vCAlEaUtu8PYeoGzierwuGHfH45UliJViVr/7eM5QH0XAO+WZHVghSiYIlBbE rF7TUpwewLWDUWWd1ZwZwFqwACo/g+5fJPAEOeDXS30yeqBzYaQyOboRh8aa41vA0WNY5N +Z51y4hWYTvOBwfnfkVegjJPX5GLAJfjvouUBOmohu63cRJY89cIpKnJUeJSASbwcXqU20 mUvyM7gzQvEserTe4uOiKzCKVuvCVFhrLWDM57SuPVJ2Z+kPmYqikciETok1t4AphqLDnb 8wYS9569Nsu+FeXQtyOD20d+xqxbEZACNjXfQsY6IWevXy5ghYZyQv7Ua8QG6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPg2t8Jz8v6 for ; Fri, 09 Jan 2026 21:03:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id aa5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:03:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Simon Wollwage From: Warner Losh Subject: git: 4b2a8aab43ff - main - getopt(3): be more explicit about :: extension List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b2a8aab43ff747bcba6c28f5c0431141ec198a0 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:03:19 +0000 Message-Id: <69616d17.aa5b.549e3dbb@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4b2a8aab43ff747bcba6c28f5c0431141ec198a0 commit 4b2a8aab43ff747bcba6c28f5c0431141ec198a0 Author: Simon Wollwage AuthorDate: 2025-12-12 05:11:40 +0000 Commit: Warner Losh CommitDate: 2026-01-09 21:02:23 +0000 getopt(3): be more explicit about :: extension Make it possible to search for literal two colons (::) and actually find something. Make the "x"/"x:"/"x::" examples more explicit and more visibile. Signed-off-by: Simon Wollwage Obtained from: NetBSD, nbuwe , 856d5b6 PR: 291374 Reviewed by: imp, jlduran Pull Request: https://github.com/freebsd/freebsd-src/pull/1923 --- lib/libc/stdlib/getopt.3 | 49 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index a5b5bff9d1a7..1b40f6dfea7e 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 5, 2014 +.Dd December 14, 2025 .Dt GETOPT 3 .Os .Sh NAME @@ -60,30 +60,49 @@ if it has been specified in the string of accepted option characters, The option string .Fa optstring may contain the following elements: individual characters, and -characters followed by a colon to indicate an option argument -is to follow. -If an individual character is followed by two colons, then the -option argument is optional; +characters followed by a colon +.Pq Ql \&: +to indicate an option argument is to follow. +If an individual character is followed by two colons +.Pq Ql \&:\&: , +then the option argument is optional; .Va optarg is set to the rest of the current -.Va argv +.Fa argv word, or .Dv NULL if there were no more characters in the current word. -This is a -.Tn GNU -extension. +This is an extension not covered by POSIX. +.Pp For example, an option string .Li \&"x" recognizes an option -.Dq Fl x , -and an option string +.Dq Fl x . +.Pp +An option string .Li \&"x:" -recognizes an option and argument -.Dq Fl x Ar argument . +recognizes an option with an argument, both +.Dq Fl x Ns Ar arg\^ , +and +.Dq Fl x Ar arg\^ . It does not matter to .Fn getopt -if a following argument has leading white space. +if the option's argument is a separate word or not. +.Pp +An option string +.Li \&"x::" +recognizes the option both without an argument +.Dq Fl x , +and with an argument +.Dq Fl x Ns Ar arg\^ . +In the latter case the argument must be part of the same +.Fa argv +word. +The +.Dq Fl x +and +.Dq Ar arg\^ +must not be separated by a whitespace on the command line. .Pp On return from .Fn getopt , @@ -267,7 +286,7 @@ Care should be taken not to use as the first character in .Fa optstring to avoid a semantic conflict with -.Tn GNU +GNU .Fn getopt , which assigns different meaning to an .Fa optstring From nobody Fri Jan 9 21:03:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPg6MbXz6MMhW for ; Fri, 09 Jan 2026 21:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvPf2bb6z3Snp for ; Fri, 09 Jan 2026 21:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bBLuLZ8Xyj0+TAR6oSIPDsSbg9XZWbJRHmfJT1lyv9I=; b=vvWKj0lGK30vs8vK1japzLJ+aj6DyQwE68Udez+HfzJHFXJTR6vYuwi2SB+ZEt3R+WtBiF p/0tnLpaU2pdHeIPIaowVfkZy36uv1ZYw+j8POr19m7osJVtD0+S9+05gG1hfSYgIyv4ds oo9nXfvn7evKBdmBvm6N5LTaQKNgXSQ/6GPdjhus4kckagsDi8/ckFHL7FWKRkG34busQn GzseY2PKZImb9BdBA2PwFjiHZF3jkARRtSIRv6Ho8j2zIeYmFKW29gUyDDrOqn/UDQQdnF f1A0q4lkEXm6MYdBPJOP4RnLOA6JZ+CTDhUDPqSpGVRQdxgxM52Jz/VHlmGgzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767992598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bBLuLZ8Xyj0+TAR6oSIPDsSbg9XZWbJRHmfJT1lyv9I=; b=wEMZQehChLAXD4QGPqHZPhyyAUXpSe+FRuKuoMNh0SwBQ2KSQlJn1n0IViKk42Jg6D+A0u hao6KlOIrrC0JHUZkx69dv3Krd3EAWzKEBgqgMIbpgZm71vkHIB+YsnWwGC2C3QcKNHnH0 LOGNAyx29zshBRXFEluhP0SvrfrrL1QbrDToYiF6h4sFba9JL54WJtkTdFmHlJgI/ygXkP 7V6Kw5QVWJcIH20O+hjzd791m6q6SKmQMo7GemRmU5CtMyKhx2zCtJu/M4Weply5Z78V7v cImV+W51Hc6vzM0MRZZObx+4NzajTnmoIxk9t5LNSX0YN2/zxeBwwSUb1wZqTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767992598; a=rsa-sha256; cv=none; b=eRBRnFdIWbAHc5x2e/YGca6GXBA1sR1owTHqvTmYwHWK4uHxRUnG2vOPTQxHZ3aP6u8OZq yaAxFHSa1jDcjUOAYchqSicur+tUjwwy0aUl18Itgyr5wsOzjLyY7T05qkOB1x36qwq+Mx HOXj/wBoXQ+KY5uvBo+tzhauzycC9AMefeUiNp8a7DoNxZkqBtykxhlLUFMIYoKqqj+t4g S6BL2/m1da7wAucEgyudymVCBOvcnop+6dHOqfWVI4wHt8iWg+csmrOCODYAxBlf2UD4Cb Q/DngnJVw1roFQPnSlQTwxCKOX5k1Om5T1tOhyqKkSDRQvNJ9w9vg22dl+4zpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvPf25Hyz8n6 for ; Fri, 09 Jan 2026 21:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id be43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:03:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: mothcompute From: Warner Losh Subject: git: 85bf328868c8 - main - linux: support termios2 ioctls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85bf328868c8f6d8fede9d8d4b4ff8a589636990 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:03:18 +0000 Message-Id: <69616d16.be43.bc04c3d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=85bf328868c8f6d8fede9d8d4b4ff8a589636990 commit 85bf328868c8f6d8fede9d8d4b4ff8a589636990 Author: mothcompute AuthorDate: 2026-01-06 03:19:21 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:58:25 +0000 linux: support termios2 ioctls Signed-off-by: mothcompute Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1949 --- sys/compat/linux/linux_ioctl.c | 69 +++++++++++++++++++++++++++++++++++++++++- sys/compat/linux/linux_ioctl.h | 10 ++++++ 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index ceb17bd040b5..f6c239b08ac2 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -331,6 +331,17 @@ struct linux_termios { unsigned char c_cc[LINUX_NCCS]; }; +struct linux_termios2 { + unsigned int c_iflag; + unsigned int c_oflag; + unsigned int c_cflag; + unsigned int c_lflag; + unsigned char c_line; + unsigned char c_cc[LINUX_NCCS]; + unsigned int c_ispeed; + unsigned int c_ospeed; +}; + struct linux_winsize { unsigned short ws_row, ws_col; unsigned short ws_xpixel, ws_ypixel; @@ -386,7 +397,7 @@ bsd_to_linux_speed(int speed, struct speedtab *table) for ( ; table->sp_speed != -1; table++) if (table->sp_speed == speed) return (table->sp_code); - return (-1); + return (LINUX_BOTHER); } static void @@ -508,6 +519,14 @@ bsd_to_linux_termios(struct termios *bios, struct linux_termios *lios) lios->c_line = 0; } +static void +bsd_to_linux_termios2(struct termios *bios, struct linux_termios2 *lios2) +{ + bsd_to_linux_termios(bios, (struct linux_termios *)lios2); + lios2->c_ospeed = bios->c_ospeed; + lios2->c_ispeed = bios->c_ispeed; +} + static void linux_to_bsd_termios(struct linux_termios *lios, struct termios *bios) { @@ -628,6 +647,16 @@ linux_to_bsd_termios(struct linux_termios *lios, struct termios *bios) linux_to_bsd_speed(lios->c_cflag & LINUX_CBAUD, sptab); } +static void +linux_to_bsd_termios2(struct linux_termios2 *lios2, struct termios *bios) +{ + linux_to_bsd_termios((struct linux_termios *)lios2, bios); + if ((lios2->c_cflag & LINUX_CBAUD) == LINUX_BOTHER) + bios->c_ospeed = lios2->c_ospeed; + if ((lios2->c_cflag & LINUX_CIBAUD) == LINUX_BOTHER << LINUX_IBSHIFT) + bios->c_ispeed = lios2->c_ispeed; +} + static void bsd_to_linux_termio(struct termios *bios, struct linux_termio *lio) { @@ -664,6 +693,7 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args) { struct termios bios; struct linux_termios lios; + struct linux_termios2 lios2; struct linux_termio lio; struct file *fp; int error; @@ -1001,6 +1031,43 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args) args->cmd = TIOCCBRK; error = (sys_ioctl(td, (struct ioctl_args *)args)); break; + + case LINUX_TCGETS2: + error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bios, td->td_ucred, + td); + if (error) + break; + bsd_to_linux_termios2(&bios, &lios2); + error = copyout(&lios2, (void *)args->arg, sizeof(lios2)); + break; + + case LINUX_TCSETS2: + error = copyin((void *)args->arg, &lios2, sizeof(lios2)); + if (error) + break; + linux_to_bsd_termios2(&lios2, &bios); + error = (fo_ioctl(fp, TIOCSETA, (caddr_t)&bios, td->td_ucred, + td)); + break; + + case LINUX_TCSETSW2: + error = copyin((void *)args->arg, &lios2, sizeof(lios2)); + if (error) + break; + linux_to_bsd_termios2(&lios2, &bios); + error = (fo_ioctl(fp, TIOCSETAW, (caddr_t)&bios, td->td_ucred, + td)); + break; + + case LINUX_TCSETSF2: + error = copyin((void *)args->arg, &lios2, sizeof(lios2)); + if (error) + break; + linux_to_bsd_termios2(&lios2, &bios); + error = (fo_ioctl(fp, TIOCSETAF, (caddr_t)&bios, td->td_ucred, + td)); + break; + case LINUX_TIOCGPTN: { int nb; diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index 8345b7e4b719..d01a30538981 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -383,6 +383,11 @@ #define LINUX_TIOCSBRK 0x5427 #define LINUX_TIOCCBRK 0x5428 +#define LINUX_TCGETS2 0x542A +#define LINUX_TCSETS2 0x542B +#define LINUX_TCSETSW2 0x542C +#define LINUX_TCSETSF2 0x542D + #define LINUX_TIOCGPTN 0x5430 #define LINUX_TIOCSPTLCK 0x5431 @@ -501,6 +506,7 @@ #define LINUX_FF1 0x0008000 #define LINUX_CBAUD 0x0000100f +#define LINUX_CIBAUD (LINUX_CBAUD << LINUX_IBSHIFT) #define LINUX_B0 0x00000000 #define LINUX_B50 0x00000001 @@ -537,8 +543,12 @@ #define LINUX_HUPCL 0x00000400 #define LINUX_CLOCAL 0x00000800 +#define LINUX_BOTHER 0x00001000 + #define LINUX_CRTSCTS 0x80000000 +#define LINUX_IBSHIFT 16 + /* Linux c_lflag masks */ #define LINUX_ISIG 0x00000001 #define LINUX_ICANON 0x00000002 From nobody Fri Jan 9 21:25:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvvV20Hxz6MNkW for ; Fri, 09 Jan 2026 21:25: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvvT6Rkqz3XYq for ; Fri, 09 Jan 2026 21:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1llS0rwF0bjj62I5QcfCkJA8RJW4SmEUZx58pxKHwZg=; b=Ja0him8udOs650Pt9XnW85skdP1lAC6McNSXhdNNGoLebdXuFj3Th0vRi6j/Zf8eq14ToU 9L/3KkdEwpl9HP3EnB/c9hs8nsDe/Dqfzx2tT3T6XcUdnnpdOQiLAQeM8zcEA5kbPlWF/o tptzr4Fclhzfnm8b2NsB6+bZbtcqP055Mv8BmyhnKL2LLuknpkZukoSPa2AIZfCol9Ab3n z+V6M2I3/E5iyK/ZMGjfzjpXOrACX3/zpcw8qp/m7lttJ3t+sIKXHaSg9aOeQQCavEybH3 31fH0UZBP74FOXacEJz/U/icrZ1YvEXYA/K3IHCj/9YOTNzY3rt/CzkoEjC5hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1llS0rwF0bjj62I5QcfCkJA8RJW4SmEUZx58pxKHwZg=; b=W5VpXQq6v1NoVvn5EcLegtxqw9P1SxOitS7m6H/yOt9OAuHt4q99AgHBnQ0Y7mqirRfI28 DHMATLS+d69blrkVip1cJYH5pgjy8sgcW2ATf+3v/ENv8PEJeXcicfxhW5XR+YIk4J8KI0 59CKNKkNkVJIzZFkSbGwnySiVDNJnkGYApLIn+Oa2sx2Bckrtq91X4UvYZj6yVYxY4zGCA AdDts9Dfl7D5OkSkkV8f2jerT83Gapv0C9JaxyriphJFpeabSA5Yhra2kuNoMNnO3+Zl9A FjlobHXz375QN9AH0t4f9XwrUlKfg5vTMEm4L0UwXHEE6bfQqZR0hCk7N5in2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767993941; a=rsa-sha256; cv=none; b=hSd2GYHSHhiyxpRaEcmDyGLIo1qO2KJEoPN8Bu2xt94K3Itdv3J22wpN/8q0CPVEyPRsJL uutRxwcQ9PwNJ2riKQ14Z3CI7Atw851/FomyiiMCMmWm1nseSXQC13rFziU8SRT0tEgj/5 aDnf/BA+W/lKvte5TNH91MnK5gZaGnpYX/bPGiwVtSQNpHR4ZawJRs43k6f5RAZXV8JKMR HXZJ903UiJFw2+kknlv6wvHbPwbLLrZPFrOdja46Mc2RDvjQ+0nRZSjhAfIzOxtwbOkYJt 5BvpvJ56Eou5BnEqhe+Zlh/iRwvpskHsNvBH/d/rhus5PUUuHA22YCaN//bArw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvvT4w4nz9Rj for ; Fri, 09 Jan 2026 21:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d27a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:25:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Simon Wollwage From: Warner Losh Subject: git: 54ce6b2c4c16 - main - login.conf.5: Remove mention of login copyright setting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54ce6b2c4c163d85b2a8804edbac69d4e8cb3355 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:25:41 +0000 Message-Id: <69617255.d27a.53ad621c@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=54ce6b2c4c163d85b2a8804edbac69d4e8cb3355 commit 54ce6b2c4c163d85b2a8804edbac69d4e8cb3355 Author: Simon Wollwage AuthorDate: 2025-12-15 06:27:19 +0000 Commit: Warner Losh CommitDate: 2026-01-09 21:13:37 +0000 login.conf.5: Remove mention of login copyright setting PR: 291649 Fixes: 905571c03119 ("Remove copyright strings printed at login time via login(1) or sshd(8).") Signed-off-by: Simon Wollwage rootnode+freebsd@wollwage.com Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1926 --- lib/libutil/login.conf.5 | 3 +-- usr.bin/login/login.conf | 2 -- usr.sbin/etcupdate/tests/conflicts_test.sh | 2 -- usr.sbin/etcupdate/tests/tests_test.sh | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5 index 942f3ecd2661..d4bbc1d67780 100644 --- a/lib/libutil/login.conf.5 +++ b/lib/libutil/login.conf.5 @@ -17,7 +17,7 @@ .\" 5. Modifications may be freely made to this file providing the above .\" conditions are met. .\" -.Dd September 25, 2025 +.Dd December 15, 2025 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -288,7 +288,6 @@ explicitly indicates not to change the umask. .Bl -column passwd_prompt indent indent .It Sy "Name Type Default Description" .\" .It "approve program Program to approve login. -.It "copyright file File containing additional copyright information" .It "host.allow list List of remote host wildcards from which users in" the class may access. .It "host.deny list List of remote host wildcards from which users" diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index c65a83caa565..267b0f1ad826 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -23,7 +23,6 @@ default:\ :passwd_format=sha512:\ - :copyright=/etc/COPYRIGHT:\ :welcome=/var/run/motd:\ :setenv=BLOCKSIZE=K:\ :mail=/var/mail/$:\ @@ -127,7 +126,6 @@ russian|Russian Users Accounts:\ ## standard - standard user defaults ## #standard:\ -# :copyright=/etc/COPYRIGHT:\ # :welcome=/var/run/motd:\ # :setenv=BLOCKSIZE=K:\ # :mail=/var/mail/$:\ diff --git a/usr.sbin/etcupdate/tests/conflicts_test.sh b/usr.sbin/etcupdate/tests/conflicts_test.sh index 87857e7cd0a9..a2ccabaa17ee 100644 --- a/usr.sbin/etcupdate/tests/conflicts_test.sh +++ b/usr.sbin/etcupdate/tests/conflicts_test.sh @@ -80,7 +80,6 @@ EOF cat > $NEW/etc/login.conf < $TEST/etc/login.conf < $CONFLICTS/etc/login.conf < $NEW/etc/login.conf <; Fri, 09 Jan 2026 21: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvvV5cZGz3Xdg for ; Fri, 09 Jan 2026 21:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q235yFWrOwgGW6aEWxpB+dLnGrn7FMza0Vl6ZtpNe5M=; b=HsmO+q0/aAsHGvbhX1Q+bhZgsXNPL+7RyFfdepQB/mKAuyZ55bQBQIBxnR4n9P+gTz8Zn2 xGOFQXWQ726AaZbjZ2HCcj891hLEOkjyLqxvk/5D2XJyKBp3RAjMF6oZLwG8+dzfNU/V54 ZOlwxdEenFgVYn9+tE7PC/MJ0AOCNsjG3v0KKFC84Xx0xALpFoDI19dz20zOND6aIsJh+P QQiY8JpHt1hvQGx7UDMOPdT8WShtjTJkim5/qYfXwUv8/gaElDM9WFvGAi6aklEspoWZvg LfnPySonNl4Pl/CG/M34Dd8PlsuMWSRwgOsMj1p+aLYKbmYS9go1PhkHIhCEng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q235yFWrOwgGW6aEWxpB+dLnGrn7FMza0Vl6ZtpNe5M=; b=sOaVlpS4UsejmplN0DpweIoeem4/wCtBd3WyoSSimJ7e4v58TZq4e2RrBH9uf/fEMBxZ5A FnMYp1Y616Yi1iK4IVZ6K7i1zZAEl7MFrcYmSlDlQG8J9s/+CkszeA2ISIVAOsBuGC2xZl U+AEdmouzg77YNdzPyafULHPQsD5ktGQ+y6NQ5ishhT97cnABccpsU9FSFLyZgwEI8z2cy RvupEtfvDAg5VIQRHdJHzUkYgtTzRknYCg5JYTmb7AQRHOmLa4JytPijdPtKMGyk7s5F8d 0XwabtlvRsFO9yzU+pslqDr1rTqyH95Eyh/jTxBgfWpCN8SCuxInhmadKgI/aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767993942; a=rsa-sha256; cv=none; b=p5TWyMYJAfg9HF2lLMRHFBDxZ77yoLcPebWmASQQX6YKcMYQqHynyepVymM74N3U7TBu81 B+ixPDs1icw4Z8cSgSUMn9SbndQ51D78uLyJ9y2BmD7lrfsB3+nYYMXU14hWiW5gmwjlfy GJkUl/eYF27yNrSaRaDFsY4iJFjoF0I8XCww1J70CVJjYU0HDFpRmqxpMSg7G9qg6Uwwuc 06TwBhhLHE58ykTzZ8oJBRl2jQDWXy8HLFb2Aqa3xc5JCsV8XVe0kFxdu8Qjls11k0KFEV gYzN+k3hqZiCF6F1k0ygE690nN4GODGD3Jhjm3B5P9s490go9c2FYFOTzlI5Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvvV4s25z8Xb for ; Fri, 09 Jan 2026 21:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id dc2a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:25:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: kitkat1424 From: Warner Losh Subject: git: 7b3fb3caef94 - main - loader.efi(8): clarify UEFI boot path and boot1.efi usage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b3fb3caef9495cdfcc1c8ec39907defb65ce860 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:25:42 +0000 Message-Id: <69617256.dc2a.7c368872@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b3fb3caef9495cdfcc1c8ec39907defb65ce860 commit 7b3fb3caef9495cdfcc1c8ec39907defb65ce860 Author: kitkat1424 AuthorDate: 2025-12-31 19:41:08 +0000 Commit: Warner Losh CommitDate: 2026-01-09 21:16:24 +0000 loader.efi(8): clarify UEFI boot path and boot1.efi usage Reorganise and clarify the legacy role of boot1.efi in DESCRIPTION to improve clarity. Add a minor missing word in the BUGS section ["...caution is required*..."]. See also - PR: 290794 Signed-off-by: Aaditya Singh Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1939 --- stand/man/loader.efi.8 | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index d9a5c827ba71..80d16d45670a 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -41,20 +41,28 @@ On UEFI systems, .Nm loads the kernel. .Pp -.Xr boot1.efi 8 -is used to load -.Nm -when it is placed within a UFS or ZFS file system. -Alternatively, .Nm -is used directly when configured with -.Xr efibootmgr 8 , -or when placed directly as the default boot program as described in -.Xr uefi 8 . -When a system is built using +is invoked directly from the EFI System Partition (ESP) +on systems installed using .Xr bsdinstall 8 , -.Nm -will be used directly. +when installed as the default EFI boot program as described in +.Xr uefi 8 +or when configured as an EFI boot entry with +.Xr efibootmgr 8 . +.Pp +On systems upgraded from FreeBSD 10 or earlier, the EFI System Partition (ESP) +can be too small to accommodate +.Nm . +In such cases, +.Xr boot1.efi 8 +may be retained as the firmware boot program. It +will chain-load the current +.Pa /boot/loader.efi , +which is updated during the +.Cm installworld +process. +.Xr boot1.efi 8 +is deprecated for new installations. .Ss Console Considerations The EFI BIOS provides a generic console. In @@ -485,15 +493,6 @@ Typically in these embedded situations, there is only one .efi file (loader.efi or a copy of loader.efi). The path to this file is typically the default removable path above. .Pp -Managing booting multiple OSes on UEFI varies greatly, so extra caution when -updating the UEFI default loader. -.Pp -The old, now obsolete, boot1.efi was installed as bootx64.efi in -.Fx 10 -and earlier. -Since it was quite limited in functionality, we created very small -ESPs by default. -A modern loader.efi will not fit. -However, if the old boot1.efi still works, there's no need to update -it since it will chain boot /boot/loader.efi from a copy that -make installworld updates. +Managing booting multiple OSes on UEFI varies greatly, so extra caution is required +when updating the UEFI default loader. +.Pp From nobody Fri Jan 9 21:25:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvvX1Ybsz6MPD8 for ; Fri, 09 Jan 2026 21: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvvW6Sstz3XyM for ; Fri, 09 Jan 2026 21:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2vDI7mjeHoqUoHH7p+tn4Q8UU95D6U/AHpVAahaxis=; b=c1ZOzj4l9Heg6RWzH3iyEf1yTYq5tl8DuOA9If/oQ1I/h8rMvI5cxcv2h0w377SEZPDDNa gtQBm9H1jYV4eAz7JKVIO94DMA4qirzRcAESlJ2bF8a123Peo4bGC9Px+HPRV9O4bx00VQ EnD/ypo1d/6IGJLl6veXvWZHXDjTNYnJKH2zz+hhrIBG1LtTtDvC4hJAmacw/ctvOjyYSm aPWo3UAg/CnJuq2ZoEWWmaKsEaAlxp369ELHeM/AEcu7Sdl69ZniL1A2pXe4CWc0xCjhtx GXqziJYhNrW60mmFSHg1kBtyFceTh3pjR+YrW+lCTNPIf9+LFFGLjKQ97//3qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2vDI7mjeHoqUoHH7p+tn4Q8UU95D6U/AHpVAahaxis=; b=EK51oOwCPeWZRpr/302cjdBxHmRE9YYloZPH0Us4xVKP5PFxgtd1ca6/jyWQ3ZCwOqYxF6 QCsghSdv4kIb/ebc51KXGxOZBu2E+SPhOU73/tQUG7TdhwE73Gs7QPzCdDZkIm3njVlaEd y8pOKp+hS6dHzKP5WqYHX34OsOBfCjnBlF1WRMNTUQr6GEntzITXUL9XP6tLvzvTFi/jEg ZpUXsdDBYTX/GAXgsGxDJL9RbDC6CKR3wtAHzQZQlZuPntTfvuAj1Noogt3ufZ642csIYN +4Twz05iGuOSKOVQz1Wc8vBA5r2UMi3MZsDaqFuABBD0bNVEgEexRfQCLlEtlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767993943; a=rsa-sha256; cv=none; b=ENbQ4RHD+pQupi1fphZW0+rvX8Xx6Z8VNMpyKDZ4rZklof8szwSYtsY4vvVRO+98kl8cOY 3m7Egd4uK1k2xLVKiPpuCNW1F4DnwYIOWy0CNkuQaMtDIw4ea2EBTaz7MVHjbMaLFE5Tef XgNEZGE1WQMA/OzbFNQOl9oWc2JAzdRE6sQqwOchUIHKHLJZzpw7MSg8+w9rvFh/C59VmK ZNFDasvZmEgOoTS9itnhHJXnVNr+z+O5MI1ciI/5WFC/omO5/Tf3+PUU7Ib9raUkcWrgqM pbW2riZkRF3GVaNiUrzUDOaERNIcToV4BIlirc+BHpPPA5AghkmRlch4e4CUmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvvW52Y8z9dd for ; Fri, 09 Jan 2026 21:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ea0b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:25:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Alex S From: Warner Losh Subject: git: d5e5fed1edfc - main - linux: add hidraw ioctl handler List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5e5fed1edfc3828f594fa8727d1c62c36b54e16 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:25:43 +0000 Message-Id: <69617257.ea0b.156c9f4a@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d5e5fed1edfc3828f594fa8727d1c62c36b54e16 commit d5e5fed1edfc3828f594fa8727d1c62c36b54e16 Author: Alex S AuthorDate: 2025-12-31 09:11:53 +0000 Commit: Warner Losh CommitDate: 2026-01-09 21:18:16 +0000 linux: add hidraw ioctl handler First step towards getting the Linux version of SDL with HIDAPI gamepad drivers to work. Not quite complte as SDL expects to find some information in sysfs as well. Signed-off-by: Alex S Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1938 --- sys/compat/linux/linux_ioctl.c | 51 ++++++++++++++++++++++++++++++++++++++++++ sys/compat/linux/linux_ioctl.h | 19 ++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index f6c239b08ac2..d2fa0331026b 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -58,6 +58,7 @@ #include #include +#include #include #ifdef COMPAT_LINUX32 @@ -113,6 +114,7 @@ DEFINE_LINUX_IOCTL_SET(kcov, KCOV); #ifndef COMPAT_LINUX32 DEFINE_LINUX_IOCTL_SET(nvme, NVME); #endif +DEFINE_LINUX_IOCTL_SET(hidraw, HIDRAW); #undef DEFINE_LINUX_IOCTL_SET @@ -3637,6 +3639,55 @@ linux_ioctl_nvme(struct thread *td, struct linux_ioctl_args *args) } #endif +static int +linux_ioctl_hidraw(struct thread *td, struct linux_ioctl_args *args) +{ + int len = (args->cmd & 0x3fff0000) >> 16; + if (len > 8192) + return (EINVAL); + + switch (args->cmd & 0xffff) { + case LINUX_HIDIOCGRDESCSIZE: + args->cmd = HIDIOCGRDESCSIZE; + break; + case LINUX_HIDIOCGRDESC: + args->cmd = HIDIOCGRDESC; + break; + case LINUX_HIDIOCGRAWINFO: + args->cmd = HIDIOCGRAWINFO; + break; + case LINUX_HIDIOCGRAWNAME: + args->cmd = HIDIOCGRAWNAME(len); + break; + case LINUX_HIDIOCGRAWPHYS: + args->cmd = HIDIOCGRAWPHYS(len); + break; + case LINUX_HIDIOCSFEATURE: + args->cmd = HIDIOCSFEATURE(len); + break; + case LINUX_HIDIOCGFEATURE: + args->cmd = HIDIOCGFEATURE(len); + break; + case LINUX_HIDIOCGRAWUNIQ: + args->cmd = HIDIOCGRAWUNIQ(len); + break; + case LINUX_HIDIOCSINPUT: + args->cmd = HIDIOCSINPUT(len); + break; + case LINUX_HIDIOCGINPUT: + args->cmd = HIDIOCGINPUT(len); + break; + case LINUX_HIDIOCSOUTPUT: + args->cmd = HIDIOCSOUTPUT(len); + break; + case LINUX_HIDIOCGOUTPUT: + args->cmd = HIDIOCGOUTPUT(len); + break; + } + + return (sys_ioctl(td, (struct ioctl_args *)args)); +} + /* * main ioctl syscall function */ diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index d01a30538981..116a4e676228 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -806,6 +806,25 @@ #define LINUX_IOCTL_NVME_MIN LINUX_NVME_IOCTL_ID #define LINUX_IOCTL_NVME_MAX LINUX_NVME_IOCTL_RESCAN +/* + * hidraw + */ +#define LINUX_HIDIOCGRDESCSIZE 0x4801 +#define LINUX_HIDIOCGRDESC 0x4802 +#define LINUX_HIDIOCGRAWINFO 0x4803 +#define LINUX_HIDIOCGRAWNAME 0x4804 +#define LINUX_HIDIOCGRAWPHYS 0x4805 +#define LINUX_HIDIOCSFEATURE 0x4806 +#define LINUX_HIDIOCGFEATURE 0x4807 +#define LINUX_HIDIOCGRAWUNIQ 0x4808 +#define LINUX_HIDIOCSINPUT 0x4809 +#define LINUX_HIDIOCGINPUT 0x480A +#define LINUX_HIDIOCSOUTPUT 0x480B +#define LINUX_HIDIOCGOUTPUT 0x480C + +#define LINUX_IOCTL_HIDRAW_MIN LINUX_HIDIOCGRDESCSIZE +#define LINUX_IOCTL_HIDRAW_MAX LINUX_HIDIOCGOUTPUT + /* * Pluggable ioctl handlers */ From nobody Fri Jan 9 21:25:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnvvY6MzFz6MNkZ for ; Fri, 09 Jan 2026 21: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnvvX6HWCz3Y1r for ; Fri, 09 Jan 2026 21:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N1ZRfZ3Iq2fl+c8hqWY58uGdkm7Iy+UiEvhbvg9+cAo=; b=vQcChZ2HeOEM8/td3i1X23wSXwnavnqw6z0Xunxl0vgwuPALjJiN1+1nv16Ysj82SrW9UZ k8tvkxXiEjGowF4m6REgebrR50p/uajh88kkadoSXy9NZpGiXwOyYF4ZjKNVnYK1yYMvIy tbxpUOXoAcseWaCfloE8a/J/qC8ROJEd/Px6sU3dShAYn+c5rb41mECpGHrxT5bsTFhJnK vmr72qJ/5bJz4s2NkfEC+ywrPOlDZ5b/YsOyo8IIgQlbAz+7Q04LE7Whp7cbruvYr2SXDU cjQTS0y55zRoC2pC1eAWyqj+wxOQsFYlKU21EAhHYRvnv78n7yYkrbX0VMywEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767993944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N1ZRfZ3Iq2fl+c8hqWY58uGdkm7Iy+UiEvhbvg9+cAo=; b=s1rBx+bKVSX6c36m2dG6RmMzOXMEFHSYKzLiJ2ItSW0tp6BQKzxy5icD7+/7gA1uQ6pxtp nUD+E14VziQbrDWv/Dshw9OagJrFbhW8pqv3eojPSA+8s/251LiIvhjedKFsPqa/ETS1/W bPoLjjsklcBjVYzUHFWsXeToXZNfosttDqBcE4OlKp/KHKPWKG9KfTpiiqntmQ6rXVOJml xrJh0sS9WG7IVWPR8bD5Hnw4/hT0FMflErZRYgyh322lHmaQlqf09Bl6sygUtHcTm0FbcL lN0SF3Ko/HcjLrpiPTkGWt6i49cliEUfcXthSf9RD15hZV6hvJOEYEDAW6ahhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767993944; a=rsa-sha256; cv=none; b=j09WpSLENMh4UjxNAJEa4AFdV7l6WbWBSDD37pLYIakcDHvqLn2fZ/iI+i+JN7OPt2QkI0 a/5qnFOFrd37FUBg/5/TSYPMzBQ3JqkxxgOdDDNyEplvXFgHvLeflYNroygkO3yu0L8LVG HbA/jP4oiuWmRBNl0kPo4IpYGD8AD401sjLb6sL6tHbGTTFEwAw3Oy+AbZBkpZTnl4DXEP rk004PkNLvHBiwQq2YpnUX4AbRm5eY71Ncqzui4/VQ9Cw5jQWvAWu4nhcIhRpxVYoEHLOM S9lErok06hH3XUbwcgnLmf61AKD7Qn7adrx+8lYXPcN80H1dVRVqQYbiBtw0Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnvvX5fw4z8vl for ; Fri, 09 Jan 2026 21:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d27f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 21:25:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Dmitry Borisov From: Warner Losh Subject: git: 247d24a694af - main - ata-serverworks: Fix incorrect port count for BCM5770 SATA controller List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 247d24a694af84f0c80708ff0a6c4baa7fcca14d Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 21:25:44 +0000 Message-Id: <69617258.d27f.620e4350@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=247d24a694af84f0c80708ff0a6c4baa7fcca14d commit 247d24a694af84f0c80708ff0a6c4baa7fcca14d Author: Dmitry Borisov AuthorDate: 2025-10-29 14:06:57 +0000 Commit: Warner Losh CommitDate: 2026-01-09 21:23:42 +0000 ata-serverworks: Fix incorrect port count for BCM5770 SATA controller The 1166:0241 PCI device has 8 ports instead of 4. Signed-off-by: Dmitry Borisov Reviewed by: imp, jlduran Pull Request: https://github.com/freebsd/freebsd-src/pull/1883 --- sys/dev/ata/ata-pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index 630d0184c820..5ff3e344c411 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -430,8 +430,8 @@ struct ata_pci_controller { #define ATA_HT1000_S1 0x024b1166 #define ATA_HT1000_S2 0x024a1166 #define ATA_K2 0x02401166 -#define ATA_FRODO4 0x02411166 -#define ATA_FRODO8 0x02421166 +#define ATA_FRODO8 0x02411166 +#define ATA_FRODO4 0x02421166 #define ATA_SILICON_IMAGE_ID 0x1095 #define ATA_SII3114 0x31141095 From nobody Fri Jan 9 22:44:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnxdr5kQHz6MThs for ; Fri, 09 Jan 2026 22:44: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnxdr4mRBz3fSD for ; Fri, 09 Jan 2026 22:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767998640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xH3+tFzbbMLYaKmaMAUZ6Krc4lEOmWmGu7Exmkk9MpI=; b=rHaYpGwKRQ+VrVgJsrIoGU0IQMGcuW63qJsjFYZgiXU8tRyT3PJoaG0XExD5gdx0NCEROb U/A9PUnSqqijW7nUnv03dCG5mIZ412xp47n/Kcx/F5STlpfz+9noWndwTxPE7bwRrKXben O5HNxuWmEqD7S/4av8/CBw4LBTVx1web3okO+C8HZ0WdLyCIwZ6fmRLmCB9MZQmk9cDZCo g3Cxys40zAeIXsn66AeKez4GqTyaGQ/PyO30jwfTc3gQKMWc900Zq2R2jSSkt7BDnBlXpC L9+ikZY5HEQ2DhZzZNE/kfCvzj2qIUUue/89WsswbBdhbFIQpjZrerJdIjYS8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767998640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xH3+tFzbbMLYaKmaMAUZ6Krc4lEOmWmGu7Exmkk9MpI=; b=RlSfrHWvW8iUbVGadpQoUmFO2zgl4rNLhtRdCCC1RUYtmwRm6M65rWP9OzLn/ghtkZe7F/ YyGylPsE0JoglQwTEAqYM6/hyeBfgIUjK+gRAe7/IjI96yGTxfyivGN7aadUNT61H2aDsh vD1iTT0yr3lG9T1X+1siYpiUNFqVRU9kT9kCN7RVDb2rRwdKqAf3cM+8HXWuXf8yk7L8vI qgmsE5CExfa+EYK59uAwu8O7N/qPH1x8GPuT/cYkNiBgXe+uvlTWaI722wWCyCbG5TAY1y YyPsP2cl8FPvRSr8mKiKO4CKHDVdWnxadFnPq8NoZuPrxbYijZXU8dZnLjPHfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767998640; a=rsa-sha256; cv=none; b=e3tBo+vQKmHVM8VsMWMAInN8EgK7irRTJcdiSNqT/Mme/pLtTZWGAlsTSvKRfy/kusnFQy 3JTDlXMMFVqiG8t4AVmAnuIryAb7X9Hbo1njUNHRRR3q1u3d1kbg62vcmyWckRx4qegt4L dThRJR7O4eL1+N8lalukOypg1rCCXx2Yhg1a8LHock0pctBaKE41TDEpJL5qVBRyGSUrwt 98gJPd4FB2/kgN26pyaiUhbnO/hgTw162TkUvsngah6Fswu4kHXDZ+l24IA6I6tq//xU+A ktr/2sGM3ZNw+l4Dbq/PCaQvIalBXLjOc5TF/Dn+4yZwEC/Hi8IDRkl6zyUS+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnxdr4KThzByx for ; Fri, 09 Jan 2026 22:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26f06 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 22:44:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Krzysztof Galazka Subject: git: a3d472219c5a - main - ixl(4): Enable building driver on ARM64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3d472219c5aa3c211371aebd2effbfade61cb5c Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 22:44:00 +0000 Message-Id: <696184b0.26f06.30854b9f@gitrepo.freebsd.org> The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d472219c5aa3c211371aebd2effbfade61cb5c commit a3d472219c5aa3c211371aebd2effbfade61cb5c Author: Krzysztof Galazka AuthorDate: 2026-01-09 22:36:10 +0000 Commit: Krzysztof Galazka CommitDate: 2026-01-09 22:43:22 +0000 ixl(4): Enable building driver on ARM64 For consistency with other drivers enable building ixl on ARM64 target. Please be advised that it is only compile tested. Intel will continue to test Ethernet drivers only on x86-64 platforms, and is not going to provide support for issues, which cannot be reproduced in such environment. Signed-off-by: Krzysztof Galazka Suggested by: Dave Cottlehuber Reviewed by: manu Approved by: kbowling (mentor) MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D54289 --- sys/arm64/conf/NOTES | 1 + sys/conf/files.arm64 | 29 +++++++++++++++++++++++++++++ sys/conf/options.arm64 | 3 +++ sys/modules/Makefile | 4 ++-- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index e773253da6d7..102066025e8f 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -92,6 +92,7 @@ device al_eth # Annapurna Alpine Ethernet NIC device dwc # Synopsys Designware GMAC Ethernet device dwc_rk # Rockchip Designware device dwc_socfpga # Altera SOCFPGA Ethernet MAC +device ixl # Intel 700 Series Physical Function device ice # Intel 800 Series Physical Function device ice_ddp # Intel 800 Series DDP Package diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 4bd03989afa0..ee1108eca0d4 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -413,6 +413,35 @@ dev/ipmi/ipmi_smbus.c optional ipmi smbus dev/ipmi/ipmi_smic.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus +dev/ixl/if_ixl.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_main.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_iflib.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_qmgr.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_iov.c optional ixl pci pci_iov \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_i2c.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_txrx.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_osdep.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_lan_hmc.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_hmc.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_common.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_nvm.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_adminq.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_dcb.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" + dev/mailbox/arm/arm_doorbell.c optional fdt arm_doorbell dev/mbox/mbox_if.m optional soc_brcm_bcm2837 diff --git a/sys/conf/options.arm64 b/sys/conf/options.arm64 index 4bdd408f4651..5e6f25cd8db8 100644 --- a/sys/conf/options.arm64 +++ b/sys/conf/options.arm64 @@ -16,6 +16,9 @@ COMPAT_FREEBSD32 opt_global.h # Emulate SWP/SWPB for COMPAT_FREEBSD32 EMUL_SWP opt_global.h +# iWARP client interface support in ixl +IXL_IW opt_ixl.h + # EFI Runtime services support EFIRT opt_efirt.h diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 31e56be5360f..f7e104489fa8 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -666,7 +666,7 @@ _genet= genet .endif .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" || \ - ${MACHINE_ARCH:Mpowerpc64*} + ${MACHINE_ARCH:Mpowerpc64*} != "" _ice= ice .if ${MK_SOURCELESS_UCODE} != "no" _ice_ddp= ice_ddp @@ -676,6 +676,7 @@ _ice_ddp= ice_ddp _irdma= irdma .endif .endif +_ixl= ixl .endif .if ${MACHINE_CPUARCH} == "aarch64" @@ -917,7 +918,6 @@ _ffec= ffec .endif .if ${MACHINE_ARCH:Mpowerpc64*} != "" -_ixl= ixl _nvram= opal_nvram .endif From nobody Fri Jan 9 22:44:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnxg53hfMz6MTky for ; Fri, 09 Jan 2026 22:45:05 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnxg51ZSLz3gLY for ; Fri, 09 Jan 2026 22:45:05 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-4f1ab2ea5c1so64252071cf.3 for ; Fri, 09 Jan 2026 14:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; t=1767998699; x=1768603499; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TbZhPpHO00e2VZDYixAeikV0NAacnXJpHyVSfX8IzOo=; b=lywxXFAugV0QS6XPHh4YT/z56RYmzT2obZqMo8KOEtB7oTUrRwGw0b5lLUK3Y1p+6K 9NgOVkgFvyZl2NaMmeqGeBuqN9kga1Dwrue1t9N0hkKlhHH36Q1/MkxFQqWuAXN1g2OI 2D5Sb5etaBiPt5uQXdOZrELvAuo4tzPZOMqGA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767998699; x=1768603499; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TbZhPpHO00e2VZDYixAeikV0NAacnXJpHyVSfX8IzOo=; b=SDN5Wizdgwe11+ON9VvMlPKQmWSrmcN+DvbL8izn0JVdn2kemhSBR+DvhrhQ8lXGjv XQpyVt5PWe4SsXHR2zjCwi/E0USxSPBie9h9A81Wh7ddHolzhvMcRrKTnxXv0yTkGRxl uxrbjBHM0RlSt36sTwD7cw8sG4pMKGJGlCNKHy+N3izBB70b2r68N9PRCUwJC+cZAUKr /SdNAl9bBncPshMKzB2y4QHgQhncF+iyFFEyxHQcTTyVjF+XJ1/QrdecLzAortHWnVSY eCtUlpB1qkITPDqXj5NVSWxVvGVSyGleGdwVGomI83lfDj/eTEmNgLO8bvRIosAzCBA9 KkVA== X-Forwarded-Encrypted: i=1; AJvYcCX7QVRxcjKLgi3rSulSU2tboCclfRJp3acpz8eKsugak6TZlQdLKDVXhR6Gsx5qJBksrQHIo6ncBln1973qqLMyN8/9RA==@freebsd.org X-Gm-Message-State: AOJu0YzPkCcwfSQjSVORhngHLAGLG/u4moYBA6EtUXHFH+tZUXsfBvH/ ximkJ7FkDL8xzvOVJIL7NdXB0V421ytVhpFAIUXlquUW75zg57cMi8pkuXeqGxaq6KkItXZ0qW2 yiK93l9qbL2khgA7Hq8a6Lk9D9m3D5Mk6UMKOruOA X-Gm-Gg: AY/fxX5oft3Ed/Ng5eftINC8QGUHlNfUd4HQMnAQi09tetD7EiwFzJATIudx1FEkZ73 SsxVlVu2vJIYoq2caHYBPsMtpI0zuNhWIz6gBh+rQdxq3OAZMRlgASS+CDcmfiWf3cpf1RiHMqb AjwQuzwCdjC9qTb9rtGuffLLj26gUNP77yyswJZuO66+oPJPgyFSwLgqHwVcb4N+eSoIo74d/vU 09KwWP6cj9EqC0JSFAnQa5DanZcZUsuqtunq43TeH/JqCTG7CUHS6+RbFxITd7IO7U8knjM3DIU lGsCh/F5CIXTvUtB31LFksTbWAcdddE7Zj6nHak3oQfH1hepiKHm7WOVmkcSZlIr5t01 X-Google-Smtp-Source: AGHT+IHXVTLUnNcG4VqRswAfFgmBgZyNwC6z/IsG70WDv+2w6VscxjGcm5TS0XRe07XQKEHOLSojqSNeV6zroagqj3g= X-Received: by 2002:a05:622a:554:b0:4ee:4a3a:bd1c with SMTP id d75a77b69052e-4ffb4a364a4mr140195021cf.63.1767998699488; Fri, 09 Jan 2026 14:44:59 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <696113e6.f233.5c1a099f@gitrepo.freebsd.org> In-Reply-To: <696113e6.f233.5c1a099f@gitrepo.freebsd.org> From: Kevin Bowling Date: Fri, 9 Jan 2026 15:44:47 -0700 X-Gm-Features: AQt7F2pSMZVS6Ez8QPoi-Z7fUJKJ6F5xmlI-E3lPnRacQ7AfreNPJcdahu7mEyY Message-ID: Subject: Re: git: 31e7dc6b9a00 - main - iflib: remove convoluted custom zeroing code To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dnxg51ZSLz3gLY Can you mark for MFC? On Fri, Jan 9, 2026 at 7:42=E2=80=AFAM Brooks Davis wr= ote: > > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D31e7dc6b9a000b02353bfc41cb= d897533287cda2 > > commit 31e7dc6b9a000b02353bfc41cbd897533287cda2 > Author: Brooks Davis > AuthorDate: 2026-01-09 14:19:49 +0000 > Commit: Brooks Davis > CommitDate: 2026-01-09 14:19:49 +0000 > > iflib: remove convoluted custom zeroing code > > Replace a collection of aliasing violations and ifdefs with memset > (which now expands to __builtin_memset and should be quite reliably > inlined.) The old code is hard to maintain as evidenced by the most > recent change to if_pkt_info_t updating the defines, but not the zero= ing > code. > > Reviewed by: gallatin, erj > Effort: CHERI upstreaming > Sponsored by: Innovate UK > Fixes: 43d7ee540efe ("iflib: support for transmit side nic K= TLS offload") > Differential Revision: https://reviews.freebsd.org/D54605 > --- > sys/net/iflib.c | 65 +++++----------------------------------------------= ------ > 1 file changed, 5 insertions(+), 60 deletions(-) > > diff --git a/sys/net/iflib.c b/sys/net/iflib.c > index fcd847ab6f7a..5c37f199e84c 100644 > --- a/sys/net/iflib.c > +++ b/sys/net/iflib.c > @@ -504,61 +504,6 @@ typedef struct if_rxsd { > iflib_fl_t ifsd_fl; > } *if_rxsd_t; > > -/* multiple of word size */ > -#ifdef __LP64__ > -#define PKT_INFO_SIZE 7 > -#define RXD_INFO_SIZE 5 > -#define PKT_TYPE uint64_t > -#else > -#define PKT_INFO_SIZE 12 > -#define RXD_INFO_SIZE 8 > -#define PKT_TYPE uint32_t > -#endif > -#define PKT_LOOP_BOUND ((PKT_INFO_SIZE / 3) * 3) > -#define RXD_LOOP_BOUND ((RXD_INFO_SIZE / 4) * 4) > - > -typedef struct if_pkt_info_pad { > - PKT_TYPE pkt_val[PKT_INFO_SIZE]; > -} *if_pkt_info_pad_t; > -typedef struct if_rxd_info_pad { > - PKT_TYPE rxd_val[RXD_INFO_SIZE]; > -} *if_rxd_info_pad_t; > - > -CTASSERT(sizeof(struct if_pkt_info_pad) =3D=3D sizeof(struct if_pkt_info= )); > -CTASSERT(sizeof(struct if_rxd_info_pad) =3D=3D sizeof(struct if_rxd_info= )); > - > -static inline void > -pkt_info_zero(if_pkt_info_t pi) > -{ > - if_pkt_info_pad_t pi_pad; > - > - pi_pad =3D (if_pkt_info_pad_t)pi; > - pi_pad->pkt_val[0] =3D 0; pi_pad->pkt_val[1] =3D 0; pi_pad->pkt_v= al[2] =3D 0; > - pi_pad->pkt_val[3] =3D 0; pi_pad->pkt_val[4] =3D 0; pi_pad->pkt_v= al[5] =3D 0; > -#ifndef __LP64__ > - pi_pad->pkt_val[6] =3D 0; pi_pad->pkt_val[7] =3D 0; pi_pad->pkt_v= al[8] =3D 0; > - pi_pad->pkt_val[9] =3D 0; pi_pad->pkt_val[10] =3D 0; > -#endif > -} > - > -static inline void > -rxd_info_zero(if_rxd_info_t ri) > -{ > - if_rxd_info_pad_t ri_pad; > - int i; > - > - ri_pad =3D (if_rxd_info_pad_t)ri; > - for (i =3D 0; i < RXD_LOOP_BOUND; i +=3D 4) { > - ri_pad->rxd_val[i] =3D 0; > - ri_pad->rxd_val[i + 1] =3D 0; > - ri_pad->rxd_val[i + 2] =3D 0; > - ri_pad->rxd_val[i + 3] =3D 0; > - } > -#ifdef __LP64__ > - ri_pad->rxd_val[RXD_INFO_SIZE - 1] =3D 0; > -#endif > -} > - > /* > * Only allow a single packet to take up most 1/nth of the tx ring > */ > @@ -1068,7 +1013,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int= flags) > if (nm_i !=3D head) { /* we have new packets to send */ > uint32_t pkt_len =3D 0, seg_idx =3D 0; > int nic_i_start =3D -1, flags =3D 0; > - pkt_info_zero(&pi); > + memset(&pi, 0, sizeof(pi)); > pi.ipi_segs =3D txq->ift_segs; > pi.ipi_qsidx =3D kring->ring_id; > nic_i =3D netmap_idx_k2n(kring, nm_i); > @@ -1261,7 +1206,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int= flags) > nm_i =3D netmap_idx_n2k(kring, nic_i); > MPASS(nm_i =3D=3D kring->nr_hwtail); > for (n =3D 0; avail > 0 && nm_i !=3D hwtail_lim; n++, ava= il--) { > - rxd_info_zero(&ri); > + memset(&ri, 0, sizeof(ri)); > ri.iri_frags =3D rxq->ifr_frags; > ri.iri_qsidx =3D kring->ring_id; > ri.iri_ifp =3D ctx->ifc_ifp; > @@ -2998,7 +2943,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) > /* > * Reset client set fields to their default values > */ > - rxd_info_zero(&ri); > + memset(&ri, 0, sizeof(ri)); > ri.iri_qsidx =3D rxq->ifr_id; > ri.iri_cidx =3D *cidxp; > ri.iri_ifp =3D ifp; > @@ -3580,7 +3525,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) > } > m_head =3D *m_headp; > > - pkt_info_zero(&pi); > + memset(&pi, 0, sizeof(pi)); > pi.ipi_mflags =3D (m_head->m_flags & (M_VLANTAG | M_BCAST | M_MCA= ST)); > pi.ipi_pidx =3D pidx; > pi.ipi_qsidx =3D txq->ift_id; > @@ -4256,7 +4201,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) > if (ctx->isc_txq_select_v2) { > struct if_pkt_info pi; > uint64_t early_pullups =3D 0; > - pkt_info_zero(&pi); > + memset(&pi, 0, sizeof(pi)); > > err =3D iflib_parse_header_partial(&pi, &m, &early_pullup= s); > if (__predict_false(err !=3D 0)) { > From nobody Fri Jan 9 23:04:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dny636rjkz6MWTs for ; Fri, 09 Jan 2026 23:04:59 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dny634Jw5z3k7b for ; Fri, 09 Jan 2026 23:04:54 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-64b83949fdaso7727990a12.2 for ; Fri, 09 Jan 2026 15:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767999887; x=1768604687; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GW6mDVJ7uP6LyU8cUen2ZlrV576K4qt85EajDk2p2HE=; b=IYeFtKbnJVUioUDtCVB0V2wIMmkc7Idd0l3Vxixe1TYi9LjGa2UqXmyOQZWLoi3v5t cTCt9UyDvvlrKcmuKaofDZAhowCN2PMSUDP7UVKK01kX7/AuJ5s2ro+r7oSADCuRUVVI HjpQeS2AwU23c3GUBnewjrSIZkRegMWMD3WN7CQ/aKwK10N/luQj2vtSjxz6nhBKKnXW hAJb5ACWHlulIfQYYxmufzCVab1ZQg2U5gNsRpDRcoASnnhKqxy3verHXE3eQJ8n8cbQ fIUuC/63vZrVLb4jYHjFN+CHzoKytu7weVKXAIR3rgcCldrvu1rOApNsewCrrVl8JVhm DRpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767999887; x=1768604687; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GW6mDVJ7uP6LyU8cUen2ZlrV576K4qt85EajDk2p2HE=; b=uuiszwVRa3c5U3gBVGXRa8fgWidebwYUh07W7PNuP+W03CJUcDox25OPXCNEXNkD1p J9WK+39JdClIKpJi3yubpT7mmUxAmc9QsUphR+ekn4w/InfnEekGapuyuqKRhQRS6+TX O5xlzz/4zNKMgf1wC5lUnm7MFzhwuPWNPSPmA76zN26tXrztqTq+cc7u9mSs5c/XK/Ad puPqdNUNMb9eQLiPlzejGHatvylJXpCuc+ssy0f/GwB/+4oq6jrrDCVq/XdcJfPGh7dB nYLfNy2u9epxM33tADwNaap/16ca2u8SwMLgsN1Xf1NNfgxl0qGdhiDGbm25cxjeNc26 RT4Q== X-Forwarded-Encrypted: i=1; AJvYcCUdx12drKvjivDWUwNo0/W3IYuWSpIt26hZA8NIbEBWRYwmFaZO2b6zDQxg2ZSWb4nGe2FBGkEoAV+Kics2X7jHqDqbWQ==@freebsd.org X-Gm-Message-State: AOJu0YwYBJPJG2/gq7UYPAe61SXQiy8v2ie95MrkMkzuR2/oVgbhoG3L RAoRvQ76G+5dKMkVsK0eJF9kpkdgI5cF3GvI1cjZNgVMfcvw4y2qnk2zp6EcAsgfJwGKOicRGZH r8n1/8Zsz2LI6RIL+JXBmWsOZxCRKJw== X-Gm-Gg: AY/fxX65obGi/D6Kn/liVC+SMRwaRQSAkIWi5eeJmuRMM9Nix3/fw/Xg+IODaGvXQf5 kgV7VtIVWX/IZvYqfcJaTpdrVvNDMSD177VWnjGFWnZdjFBqj8iWZQuqs3vdmIWRlhDKjr4jtvc Ucg1aCleZMWwXGoaFlbBUOx7uYhH43QtMddz9WlJML9q+i4o1DQEd97Ywd5Frw41hEmfSjfzvNG 66kzHh2K3vXfHJLqH8aEsg76K7PPujQLs7InCOh89bwSiFJ2wZ19Wq4vdoeTsYc/873eJYYGHFW 3ktNPkIF1yBLWCg56GjoR336MABB X-Google-Smtp-Source: AGHT+IEEDFa24qhneQR7MgNabmBZk+s/5mgb2sSYUICMt8Hy13dY/l1BEZl4f9EoL/Nm2Ws4qhuQUUNx29MCTQaeb2s= X-Received: by 2002:a05:6402:40ca:b0:64b:7fbb:fbd6 with SMTP id 4fb4d7f45d1cf-65097e8abf4mr11366902a12.28.1767999886896; Fri, 09 Jan 2026 15:04:46 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> In-Reply-To: From: Rick Macklem Date: Fri, 9 Jan 2026 15:04:33 -0800 X-Gm-Features: AZwV_QgM7MnAlV6HOD6fzzou3RQt_OKE-NEl09Mm1spsHnk2X6fGPbG4SvtXwmI Message-ID: Subject: Re: git: a6d57f312f18 - main - nfsd: Fix handling of hidden/system during Open/Create To: Benjamin Kaduk Cc: Rick Macklem , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dny634Jw5z3k7b On Fri, Jan 9, 2026 at 11:56=E2=80=AFAM Benjamin Kaduk = wrote: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > On Thu, Jan 8, 2026 at 4:33=E2=80=AFPM Rick Macklem wrote: >> >> The branch main has been updated by rmacklem: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Da6d57f312f18bbeeda8a34e99= d0a662b0db9a190 >> >> commit a6d57f312f18bbeeda8a34e99d0a662b0db9a190 >> Author: Rick Macklem >> AuthorDate: 2026-01-08 16:27:32 +0000 >> Commit: Rick Macklem >> CommitDate: 2026-01-08 16:27:32 +0000 >> >> nfsd: Fix handling of hidden/system during Open/Create >> >> When an NFSv4.n client specifies settings for the archive, >> hidden and/or system attributes during a Open/Create, the >> Open/Create fails for ZFS. This is caused by ZFS doing >> a secpolicy_xvattr() call, which fails for non-root. >> If this check is bypassed, ZFS panics. >> >> This patch resolves the problem by disabling va_flags >> for the VOP_CREATE() call in the NFSv4.n server and >> then setting the flags with a subsequent VOP_SETATTR(). >> > > The diff doesn't really include enough context to tell -- does this intro= duce a race window where a file that's supposed to be hidden and/or system = is visible without that attribute from a different process? I believe that the answer is no. VOP_CREATE() returns the new file's vnode exclusively locked and the update via VOP_SETATTR() happens before the vnode lock is released. rick > > Thanks, > > Ben From nobody Fri Jan 9 23:23:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnyW45Q0Mz6MY0Q for ; Fri, 09 Jan 2026 23:23: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnyW44WYvz3mLQ for ; Fri, 09 Jan 2026 23:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768000992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CI6ngJk90B9LTTxdNPss0rleIRK6yOA28KtZRuPRQFQ=; b=uLMeCRAkuW9IbpDPxk7O/GjKbraudnLYmxWYPECymk7auBFdcV/2KSGOhBA4pF2e+Mxa+O SshmF7pwg6BvW/9oqizJDCThk24LA6mFEndSUaOZVis1D6ZP0l6QCvLCHiEtOrb3a1NZSy qOBLZuHH6LLxygmwkovD3Lmx+vH0HCp6pUzX2/R9nB+TwqRnox+uCB1ACVtET6ULjkZt3o E2BmkogpROwGmpqXxQSQ6QsVu6dGg/aPAMAjCNAPG5DvWQUz4HBnFxWm8976Ic3o3qKBRf bBwd97P5R+zeo2P0dYeJYtbGIdo+tOHxcfCSfkoG2bVmio8nzk4kWxlaYoERrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768000992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CI6ngJk90B9LTTxdNPss0rleIRK6yOA28KtZRuPRQFQ=; b=IcXsti2VBjkvznv4KuxgGE3F1d4CwtDh5tMNWK72MnG8gbcauoLwFIylzXbndGUuJtAr1C bSL9tIRc8LfzA9E4chdR/lM1PXLU5fgqPhaYiWEM+yMvL5p7M0QLdYWQ+qsNfWqH/+MPrm pRlmOZYydt2aFiwOZBTKIkP+CJpl5G/unlSSEFmshdZsRWkiK2ORFrFckWAIcKp19KhPA4 7ttVmVvGfaaujlh33L1to/71j9D8oWWh73FUnDKVF6iu6Lo5jzMIaKbV8vA5jZNfo0y5NR 7G4BiYPj5IjaejZS/OPd+PVh1yye9oQwj4RAY8pLWJdwMCb67R897k5kUPAA/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768000992; a=rsa-sha256; cv=none; b=PleG4SoZ736PXSZZt9V2+8sH1epASJkHTsi7KJNMlTLb5F/wP85p778uwPXAATLUr5O0b2 blaxM1KTgAD4QIxZ9NIIDtfYBWifqkwd/7DLjAOWTXtWh9/MDDyONqAl3GJjvtGuzHNY4z XMc0cISUS9HTssG/zLLKNIsjqwzE8lXUWWNZ+L4XQgJpDaV3q30FAVg9H6iOp6McYLUDfS Xpe089LBEAp7EwkmsHP1LlPvXvfrIpKJ3WIUj5KCPYF667FY8+/Qhk6PeC6M4gbhNRRZ7T 5xsJGFUXoTgZA/8xlWjdYnmTjiIjBDf3fsUvcerm/b2RC7xFzq+L+Hm31bCHlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnyW4427yzD7Q for ; Fri, 09 Jan 2026 23:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31acf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:23:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Viacheslav Chimishuk From: Warner Losh Subject: git: 0a5535d1c520 - main - grep: add testcase to test color when matches is greater than MAX_MATCHES List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a5535d1c5209e73c6b2f3fd6118f9ffcb7e296e Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:23:12 +0000 Message-Id: <69618de0.31acf.2374a448@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0a5535d1c5209e73c6b2f3fd6118f9ffcb7e296e commit 0a5535d1c5209e73c6b2f3fd6118f9ffcb7e296e Author: Viacheslav Chimishuk AuthorDate: 2024-10-06 22:18:17 +0000 Commit: Warner Losh CommitDate: 2026-01-09 23:22:48 +0000 grep: add testcase to test color when matches is greater than MAX_MATCHES Reviewed by: imp, kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/1442 --- contrib/netbsd-tests/usr.bin/grep/d_color_d.out | 1 + contrib/netbsd-tests/usr.bin/grep/t_grep.sh | 6 ++++++ usr.bin/grep/tests/Makefile | 1 + 3 files changed, 8 insertions(+) diff --git a/contrib/netbsd-tests/usr.bin/grep/d_color_d.out b/contrib/netbsd-tests/usr.bin/grep/d_color_d.out new file mode 100644 index 000000000000..a9ce473965ea --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/grep/d_color_d.out @@ -0,0 +1 @@ +foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar diff --git a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh index c4ba9a9657db..9f92160bc372 100755 --- a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh +++ b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh @@ -422,6 +422,12 @@ color_body() atf_check -o file:"$(atf_get_srcdir)/d_color_c.out" \ grep --color=always -f grepfile "$(atf_get_srcdir)/d_color_b.in" + # Begin FreeBSD + MAX_MATCHES=32 + for _ in $(seq $((MAX_MATCHES + 1))); do printf "foobar"; done > grepfile + atf_check -o file:"$(atf_get_srcdir)/d_color_d.out" \ + grep --color=always foo grepfile + # End FreeBSD } atf_test_case f_file_empty diff --git a/usr.bin/grep/tests/Makefile b/usr.bin/grep/tests/Makefile index b3c79657e53c..1db5ebea5c62 100644 --- a/usr.bin/grep/tests/Makefile +++ b/usr.bin/grep/tests/Makefile @@ -12,6 +12,7 @@ ${PACKAGE}FILES+= d_color_a.out ${PACKAGE}FILES+= d_color_b.in ${PACKAGE}FILES+= d_color_b.out ${PACKAGE}FILES+= d_color_c.out +${PACKAGE}FILES+= d_color_d.out ${PACKAGE}FILES+= d_context2_a.out ${PACKAGE}FILES+= d_context2_b.out ${PACKAGE}FILES+= d_context2_c.out From nobody Fri Jan 9 23:42:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnyxv3Mbfz6MpxJ for ; Fri, 09 Jan 2026 23:42:59 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnyxv0T9mz3y9d for ; Fri, 09 Jan 2026 23:42:59 +0000 (UTC) (envelope-from kaduk@mit.edu) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mit.edu header.s=outgoing header.b=VHjkQCMA; dmarc=pass (policy=none) header.from=mit.edu; spf=pass (mx1.freebsd.org: domain of kaduk@mit.edu designates 18.9.28.11 as permitted sender) smtp.mailfrom=kaduk@mit.edu Received: from kduck.mit.edu ([73.151.147.203]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 609Ngku5030349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Jan 2026 18:42:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1768002170; bh=RIwAzYRJlLNsRu2vgRdjfWZp3sbofVQe89HfNsKOBhQ=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=VHjkQCMAigPiUJvRL03anYvkhziIvZKFLseyvXcQVdwbgaehlRGlQnDK4bPHnIwT/ /unYBj+o0leSSWNVyrBHDVL7JCAOPNWmjbWvx/MqVYzYAyc0J4+aXZO5Xwlj4+CjNh VBMbJYc5T5zzN5kfEvzxyMB3NHgcb6SpYOlziV0vOXjPvw6W+tCiQUsyhFgP6MYQvw fMomWsYeKMOCYfgesU2HifhXvMFRaxFX5igOfRiL3gk6LaVCt+0eVcuYZ8KMXun9e6 9TweE/wQKtZwxc+Bplxbi2ke9cq7osDwTm7iVPK661flsf3J8dhO8QXG1TbloCey9+ Tif3WxEMNyzRw== Date: Fri, 9 Jan 2026 15:42:45 -0800 From: "Benjamin Kaduk" To: Rick Macklem Cc: Benjamin Kaduk , Rick Macklem , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a6d57f312f18 - main - nfsd: Fix handling of hidden/system during Open/Create Message-ID: References: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.79 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[mit.edu:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.988]; DMARC_POLICY_ALLOW(-0.50)[mit.edu,none]; R_DKIM_ALLOW(-0.20)[mit.edu:s=outgoing]; R_SPF_ALLOW(-0.20)[+ip4:18.9.28.0/24]; ONCE_RECEIVED(0.20)[]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; DKIM_TRACE(0.00)[mit.edu:+]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:3, ipnet:18.9.0.0/16, country:US]; RCVD_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; TAGGED_RCPT(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4dnyxv0T9mz3y9d On Fri, Jan 09, 2026 at 03:04:33PM -0800, Rick Macklem wrote: > On Fri, Jan 9, 2026 at 11:56 AM Benjamin Kaduk wrote: > > > > On Thu, Jan 8, 2026 at 4:33 PM Rick Macklem wrote: > >> > >> The branch main has been updated by rmacklem: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=a6d57f312f18bbeeda8a34e99d0a662b0db9a190 > >> > >> commit a6d57f312f18bbeeda8a34e99d0a662b0db9a190 > >> Author: Rick Macklem > >> AuthorDate: 2026-01-08 16:27:32 +0000 > >> Commit: Rick Macklem > >> CommitDate: 2026-01-08 16:27:32 +0000 > >> > >> nfsd: Fix handling of hidden/system during Open/Create > >> > >> When an NFSv4.n client specifies settings for the archive, > >> hidden and/or system attributes during a Open/Create, the > >> Open/Create fails for ZFS. This is caused by ZFS doing > >> a secpolicy_xvattr() call, which fails for non-root. > >> If this check is bypassed, ZFS panics. > >> > >> This patch resolves the problem by disabling va_flags > >> for the VOP_CREATE() call in the NFSv4.n server and > >> then setting the flags with a subsequent VOP_SETATTR(). > >> > > > > The diff doesn't really include enough context to tell -- does this introduce a race window where a file that's supposed to be hidden and/or system is visible without that attribute from a different process? > I believe that the answer is no. > > VOP_CREATE() returns the new file's vnode exclusively locked > and the update via VOP_SETATTR() happens before the vnode > lock is released. I expected/hoped that that was the case, but just couldn't tell from the diff itself. Thanks! -Ben From nobody Fri Jan 9 23:47:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnz354L5Xz6MqCr for ; Fri, 09 Jan 2026 23:47:29 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnz350GBgz40VD for ; Fri, 09 Jan 2026 23:47:28 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-64daeb28c56so7516483a12.2 for ; Fri, 09 Jan 2026 15:47:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768002443; x=1768607243; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tloYfPmLCv705EtH61HN1NuHoyWMUikkXQbeZCZ3r+4=; b=DZZ7FQNvOb92DujjM8uIl4q8VOvjbCXmv7PBDYTGJvzqiEriccS1OIYRinaAHCGKI3 s7VOk0xFswynwK3fPLLx6d34p2FIBNVS5RcgZDFF+PJL5yRmm3+BD2SG+pLb6bqF+GYD S5yLsAMrnL+GEJAk/VKLbjT8hZR1BU+Lq2X16F1DWM5b0BBFhDveVyG5X5/uWdHCyO8Y L+RRTFU2qJo5Vos5uqm6n9K0bEbjjCik7gUdMYj+kljff2mpqGVZBdukCR1IPQ313hR7 0v2wzI/518paPrOKQLEhijzzZq6pOln9tfc4dXJYR7LLom/16x+wlRomcUhOwdznPmc7 T9qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768002443; x=1768607243; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tloYfPmLCv705EtH61HN1NuHoyWMUikkXQbeZCZ3r+4=; b=sgUYeE0KhUs7DY9vlqTDFzNTjpFZwb3LvUrzf78Cyq0RNCEAB1YW9x/xNWIGWDh7ya JylGCjb5Xlsq6jA7OMlXrjWYsNDbXQ3SkuZLSRkpMpDpZm8f37cm+aBTKDDAzFPtqG2p cN1gKr3F9Vc3dyNzw51tOCJTzt86wecze7tGbO0huBbwus4mcAl2/WuYnJL0nLthD76n Vrvp8Ky7iSCXUogYfd/WQLrzCK648Sac463iIFWKEbRjY6GUz3hSQFmsypMoFc9wbVEO YQkbr+T0XH8r9kUTDqzOLgm6pXl9h0ff6Rhee4BizbzJB0UGEXgiJuswt4Iy/85shB1k diXg== X-Forwarded-Encrypted: i=1; AJvYcCVObTdextrU/SfJambx564QmW7sXOc5KuW2dZqtPkzL2IjCxVEwtMwFlkbdO0u+6z0ty2dp3XIroMWbiAWN768li5YH7Q==@freebsd.org X-Gm-Message-State: AOJu0YzSRMacFxYdd3JR35Hj5CaxqmqyuqAPxC4YdIaWaoK9DzRxMoMA DXQ0WuHsyvHpAaOUw9XVZy+VoubBxmLNpIRz1CIumqe4DBYdEl4E7xWPH8N/GCP9exjT1JiveEh Qt6yvC9WjwGVDLPv6J7qng5+eCxepGQ== X-Gm-Gg: AY/fxX4uTD1cNGeFQ1hyeZcgev5/I1XcWUqX65eP9zDZqGUzUSDVIRwilOTkyIYBloR 0+fcwEho0nWE2tar2HmnOdN2xJRbJnB42JWrcqHJTXmT5Ho8mk4+EufLkK+jWtHPeweYwa1Qiq3 ObK0e4IU0LZXIx63Ux2Q4DuvzVNdaAwLUy1zePo01k2kCpuUbTyFUpDXtdvJHVDY7oSyobVBYGy sd27Zk+Eh0a5PvUo/iRJ9btrnVplfDgLzB3i0lajKQmkbR9uxdl7DvgC44Bo9o3kZxDqHt9T6gk TsXInev2rUum90mEVJ4h7je7GQ4i X-Google-Smtp-Source: AGHT+IHLr8hlwHdsX+fH/2evXzfzsrWH7OKbwYbGGCfBKCUAgVI+Ep4Zl97FMGod4Y/FKVjJ7R1LYeqUhQ6+n4m27FY= X-Received: by 2002:a05:6402:4307:b0:640:ff5f:47a8 with SMTP id 4fb4d7f45d1cf-65097decb95mr9663434a12.8.1768002442659; Fri, 09 Jan 2026 15:47:22 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <69604cd7.3aebd.7fdcb739@gitrepo.freebsd.org> In-Reply-To: From: Rick Macklem Date: Fri, 9 Jan 2026 15:47:09 -0800 X-Gm-Features: AZwV_QgSnsuMG5VUYKfVYzPEf5_AXyV03i3Qp55c-2jD3j-2dvYZIfYmbjkDdf4 Message-ID: Subject: Re: git: a6d57f312f18 - main - nfsd: Fix handling of hidden/system during Open/Create To: Benjamin Kaduk Cc: Benjamin Kaduk , Rick Macklem , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dnz350GBgz40VD On Fri, Jan 9, 2026 at 3:42=E2=80=AFPM Benjamin Kaduk wrote= : > > On Fri, Jan 09, 2026 at 03:04:33PM -0800, Rick Macklem wrote: > > On Fri, Jan 9, 2026 at 11:56=E2=80=AFAM Benjamin Kaduk wrote: > > > > > > On Thu, Jan 8, 2026 at 4:33=E2=80=AFPM Rick Macklem wrote: > > >> > > >> The branch main has been updated by rmacklem: > > >> > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Da6d57f312f18bbeeda8a3= 4e99d0a662b0db9a190 > > >> > > >> commit a6d57f312f18bbeeda8a34e99d0a662b0db9a190 > > >> Author: Rick Macklem > > >> AuthorDate: 2026-01-08 16:27:32 +0000 > > >> Commit: Rick Macklem > > >> CommitDate: 2026-01-08 16:27:32 +0000 > > >> > > >> nfsd: Fix handling of hidden/system during Open/Create > > >> > > >> When an NFSv4.n client specifies settings for the archive, > > >> hidden and/or system attributes during a Open/Create, the > > >> Open/Create fails for ZFS. This is caused by ZFS doing > > >> a secpolicy_xvattr() call, which fails for non-root. > > >> If this check is bypassed, ZFS panics. > > >> > > >> This patch resolves the problem by disabling va_flags > > >> for the VOP_CREATE() call in the NFSv4.n server and > > >> then setting the flags with a subsequent VOP_SETATTR(). > > >> > > > > > > The diff doesn't really include enough context to tell -- does this i= ntroduce a race window where a file that's supposed to be hidden and/or sys= tem is visible without that attribute from a different process? > > I believe that the answer is no. > > > > VOP_CREATE() returns the new file's vnode exclusively locked > > and the update via VOP_SETATTR() happens before the vnode > > lock is released. > > I expected/hoped that that was the case, but just couldn't tell from the > diff itself. I suppose I should have said that "if there is a race, it is in the FreeBSD OpenZFS port and I would consider that a bug". I am not ZFS guy. rick > > Thanks! > > -Ben From nobody Sat Jan 10 00:07:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnzTc61zwz6MrNs for ; Sat, 10 Jan 2026 00:07: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnzTc5cdbz42Fv for ; Sat, 10 Jan 2026 00:07:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768003620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1u/xEhSH7rIYyPeyeoBMKrvoUyiKlczh70o0GYjs40Y=; b=Mt+zDzg64LvfKmv1or/Esri7bFoFHcFrVlZLNwtbtGci9UWDkjdX60NrMu2HYsYxLOKvXy SndEjgC+eoqUiM2ihaPdrVCKO67iLF+PdHLPfYDnxZ8iXfBHXyDxRG/juukqhPIaGH/gN3 L3Hqu/IHWlvZlwTFc4ZlSdRf+vSF+qvSk5PWmPBm3pQb6CXaGy+dJZqgKRQDVAexZ/UIYC N1y4HU+yf8a5SJ1z8sKzbDptOKr+0K9H3uEZEk/TRbIMdc55YobRh6lBgTxqi5+kNmtlWt clNhW2pchTq3TGNNKYhx5p0RAuSJrsc4whjPks7b3TGv86qy4t9tr9UG9F2JXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768003620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1u/xEhSH7rIYyPeyeoBMKrvoUyiKlczh70o0GYjs40Y=; b=by1Qa/r3JYbQz+q3DU2wqDCdhOHjfSfeCVTIko6yMcKFDOKfMxqwcbnIEiB2emLxEcZ3Jg PLdmq6DD++jF5Ty0K6+eVlpZ037+Ecbr5GjdTeVjok1/fabLRE4Hl1RiHbbMMpypwcnak1 ROQ1yEvYlTyuO7n6WEg+CINcwMx1rlSVUkNSUEwQQxx1QOx2eG4e0G+18l1H58YPq8Z0Kn G0+vTYihBPTmAdYuT1WPBNRPGka6d7tlfP1dbabkvhqg64GT5ZoCoT3ue2iVqR7oiXz5Om 3i5JGtqvT+Idiv6fjivBnjakdkzNJartN/ZoQWH0zzlb+v7LAh7mK1vz05vufA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768003620; a=rsa-sha256; cv=none; b=WpmdC6+IcIa8InRNQosJsT5FsKezN0YAxr95YyGdLk8HXOO1YXFSMt8BiWQtgCh9v8xlmg GNKbFQAUJS6YO3lZH5dIrfRU+L71t7k5dScjPtz/OIkHNk5+VE6G8NAJXs6Knj2BDzXNOm 66E8BzV/xeWhSQnIJievybmwLE914m+GezajM6m69oSxHfNZYmSE1RX2lQq5l0jAaGd7wU 5oZfWHG/gEaR8mgSIuqWd40pk3LNbvKUhhOEfGPPySj7J+SPGQDbNa/Sz0KcALAS7tDZ/p h7+Msp8klcavKn+KwZ8hMfazdNGVBcCQ3/WMREzi+NWqIcwo1Lq1avVHvBD1mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnzTc4mCrzWH9 for ; Sat, 10 Jan 2026 00:07:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3634e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 00:07:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: CismonX From: Warner Losh Subject: git: 17ba6f428683 - main - fusefs: support FUSE_IOCTL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17ba6f428683b661178b50a9d59f8b9e0dd2138a Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 00:07:00 +0000 Message-Id: <69619824.3634e.83e2f70@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=17ba6f428683b661178b50a9d59f8b9e0dd2138a commit 17ba6f428683b661178b50a9d59f8b9e0dd2138a Author: CismonX AuthorDate: 2025-07-05 12:46:27 +0000 Commit: Warner Losh CommitDate: 2026-01-10 00:06:21 +0000 fusefs: support FUSE_IOCTL MFC After: 1 week Signed-off-by: CismonX Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1470 --- sys/fs/fuse/fuse_internal.c | 3 +- sys/fs/fuse/fuse_ipc.c | 4 + sys/fs/fuse/fuse_vnops.c | 95 +++++++++++++++++-- tests/sys/fs/fusefs/Makefile | 1 + tests/sys/fs/fusefs/ioctl.cc | 213 ++++++++++++++++++++++++++++++++++++++++++ tests/sys/fs/fusefs/mockfs.cc | 13 ++- tests/sys/fs/fusefs/mockfs.hh | 2 + 7 files changed, 322 insertions(+), 9 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index eba0a8a79ff3..a3590060f44a 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -1103,7 +1103,6 @@ fuse_internal_send_init(struct fuse_data *data, struct thread *td) * FUSE_SPLICE_WRITE, FUSE_SPLICE_MOVE, FUSE_SPLICE_READ: FreeBSD * doesn't have splice(2). * FUSE_FLOCK_LOCKS: not yet implemented - * FUSE_HAS_IOCTL_DIR: not yet implemented * FUSE_AUTO_INVAL_DATA: not yet implemented * FUSE_DO_READDIRPLUS: not yet implemented * FUSE_READDIRPLUS_AUTO: not yet implemented @@ -1116,7 +1115,7 @@ fuse_internal_send_init(struct fuse_data *data, struct thread *td) * FUSE_MAX_PAGES: not yet implemented */ fiii->flags = FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_EXPORT_SUPPORT - | FUSE_BIG_WRITES | FUSE_WRITEBACK_CACHE + | FUSE_BIG_WRITES | FUSE_HAS_IOCTL_DIR | FUSE_WRITEBACK_CACHE | FUSE_NO_OPEN_SUPPORT | FUSE_NO_OPENDIR_SUPPORT | FUSE_SETXATTR_EXT; diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index bc36f0070d7d..f3d92d861352 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -835,6 +835,10 @@ fuse_body_audit(struct fuse_ticket *ftick, size_t blen) err = (blen == 0) ? 0 : EINVAL; break; + case FUSE_IOCTL: + err = (blen >= sizeof(struct fuse_ioctl_out)) ? 0 : EINVAL; + break; + case FUSE_FALLOCATE: err = (blen == 0) ? 0 : EINVAL; break; diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 0e049b1f07a9..22d5893d4fbc 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -91,6 +91,7 @@ #include #define EXTERR_CATEGORY EXTERR_CAT_FUSE_VNOPS #include +#include #include #include @@ -374,6 +375,84 @@ fuse_inval_buf_range(struct vnode *vp, off_t filesize, off_t start, off_t end) return (0); } +/* Send FUSE_IOCTL for this node */ +static int +fuse_vnop_do_ioctl(struct vnode *vp, u_long cmd, void *arg, int fflag, + struct ucred *cred, struct thread *td) +{ + struct fuse_dispatcher fdi; + struct fuse_ioctl_in *fii; + struct fuse_ioctl_out *fio; + struct fuse_filehandle *fufh; + uint32_t flags = 0; + uint32_t insize = 0; + uint32_t outsize = 0; + int err; + + err = fuse_filehandle_getrw(vp, fflag, &fufh, cred, td->td_proc->p_pid); + if (err != 0) + return (err); + + if (vnode_isdir(vp)) { + struct fuse_data *data = fuse_get_mpdata(vnode_mount(vp)); + + if (!fuse_libabi_geq(data, 7, 18)) + return (ENOTTY); + flags |= FUSE_IOCTL_DIR; + } +#ifdef __LP64__ +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) + flags |= FUSE_IOCTL_32BIT; +#endif +#else /* !defined(__LP64__) */ + flags |= FUSE_IOCTL_32BIT; +#endif + + if ((cmd & IOC_OUT) != 0) + outsize = IOCPARM_LEN(cmd); + /* _IOWINT() sets IOC_VOID */ + if ((cmd & (IOC_VOID | IOC_IN)) != 0) + insize = IOCPARM_LEN(cmd); + + fdisp_init(&fdi, sizeof(*fii) + insize); + fdisp_make_vp(&fdi, FUSE_IOCTL, vp, td, cred); + fii = fdi.indata; + fii->fh = fufh->fh_id; + fii->flags = flags; + fii->cmd = cmd; + fii->arg = (uintptr_t)arg; + fii->in_size = insize; + fii->out_size = outsize; + if (insize > 0) + memcpy((char *)fii + sizeof(*fii), arg, insize); + + err = fdisp_wait_answ(&fdi); + if (err != 0) { + if (err == ENOSYS) + err = ENOTTY; + goto out; + } + + fio = fdi.answ; + if (fdi.iosize > sizeof(*fio)) { + size_t realoutsize = fdi.iosize - sizeof(*fio); + + if (realoutsize > outsize) { + err = EIO; + goto out; + } + memcpy(arg, (char *)fio + sizeof(*fio), realoutsize); + } + if (fio->result > 0) + td->td_retval[0] = fio->result; + else + err = -fio->result; + +out: + fdisp_destroy(&fdi); + return (err); +} /* Send FUSE_LSEEK for this node */ static int @@ -1294,25 +1373,29 @@ fuse_vnop_ioctl(struct vop_ioctl_args *ap) struct vnode *vp = ap->a_vp; struct mount *mp = vnode_mount(vp); struct ucred *cred = ap->a_cred; - off_t *offp; - pid_t pid = ap->a_td->td_proc->p_pid; + struct thread *td = ap->a_td; int err; + if (fuse_isdeadfs(vp)) { + return (ENXIO); + } + switch (ap->a_command) { case FIOSEEKDATA: case FIOSEEKHOLE: /* Call FUSE_LSEEK, if we can, or fall back to vop_stdioctl */ if (fsess_maybe_impl(mp, FUSE_LSEEK)) { + off_t *offp = ap->a_data; + pid_t pid = td->td_proc->p_pid; int whence; - offp = ap->a_data; if (ap->a_command == FIOSEEKDATA) whence = SEEK_DATA; else whence = SEEK_HOLE; vn_lock(vp, LK_SHARED | LK_RETRY); - err = fuse_vnop_do_lseek(vp, ap->a_td, cred, pid, offp, + err = fuse_vnop_do_lseek(vp, td, cred, pid, offp, whence); VOP_UNLOCK(vp); } @@ -1320,8 +1403,8 @@ fuse_vnop_ioctl(struct vop_ioctl_args *ap) err = vop_stdioctl(ap); break; default: - /* TODO: implement FUSE_IOCTL */ - err = ENOTTY; + err = fuse_vnop_do_ioctl(vp, ap->a_command, ap->a_data, + ap->a_fflag, cred, td); break; } return (err); diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 6366676b6fc5..8e5fe112a1e4 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -29,6 +29,7 @@ GTESTS+= fsyncdir GTESTS+= getattr GTESTS+= interrupt GTESTS+= io +GTESTS+= ioctl GTESTS+= last_local_modify GTESTS+= link GTESTS+= locks diff --git a/tests/sys/fs/fusefs/ioctl.cc b/tests/sys/fs/fusefs/ioctl.cc new file mode 100644 index 000000000000..da048efc51c6 --- /dev/null +++ b/tests/sys/fs/fusefs/ioctl.cc @@ -0,0 +1,213 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 CismonX + * + * 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. + */ + +extern "C" { +#include +#include +#include +#include +} + +#include "mockfs.hh" +#include "utils.hh" + +using namespace testing; + +using IoctlTestProcT = std::function; + +static const char INPUT_DATA[] = "input_data"; +static const char OUTPUT_DATA[] = "output_data"; + +class Ioctl: public FuseTest { +public: +void expect_ioctl(uint64_t ino, ProcessMockerT r) +{ + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_IOCTL && + in.header.nodeid == ino); + }, Eq(true)), _) + ).WillOnce(Invoke(r)).RetiresOnSaturation(); +} + +void expect_ioctl_rw(uint64_t ino) +{ + /* + * _IOR(): Compare the input data with INPUT_DATA. + * _IOW(): Copy out OUTPUT_DATA. + * _IOWR(): Combination of above. + * _IOWINT(): Return the integer argument value. + */ + expect_ioctl(ino, ReturnImmediate([](auto in, auto& out) { + uint8_t *in_buf = in.body.bytes + sizeof(in.body.ioctl); + uint8_t *out_buf = out.body.bytes + sizeof(out.body.ioctl); + uint32_t cmd = in.body.ioctl.cmd; + uint32_t arg_len = IOCPARM_LEN(cmd); + int result = 0; + + out.header.error = 0; + SET_OUT_HEADER_LEN(out, ioctl); + if ((cmd & IOC_VOID) != 0 && arg_len > 0) { + memcpy(&result, in_buf, sizeof(int)); + goto out; + } + if ((cmd & IOC_IN) != 0) { + if (0 != strncmp(INPUT_DATA, (char *)in_buf, arg_len)) { + result = -EINVAL; + goto out; + } + } + if ((cmd & IOC_OUT) != 0) { + memcpy(out_buf, OUTPUT_DATA, sizeof(OUTPUT_DATA)); + out.header.len += sizeof(OUTPUT_DATA); + } + +out: + out.body.ioctl.result = result; + })); +} +}; + +/** + * If the server does not implement FUSE_IOCTL handler (returns ENOSYS), + * the kernel should return ENOTTY to the user instead. + */ +TEST_F(Ioctl, enosys) +{ + unsigned long req = _IO(0xff, 0); + int fd; + + expect_opendir(FUSE_ROOT_ID); + expect_ioctl(FUSE_ROOT_ID, ReturnErrno(ENOSYS)); + + fd = open("mountpoint", O_RDONLY | O_DIRECTORY); + ASSERT_LE(0, fd) << strerror(errno); + + EXPECT_EQ(-1, ioctl(fd, req)); + EXPECT_EQ(ENOTTY, errno); + + leak(fd); +} + +/* + * For _IOR() and _IOWR(), The server is allowed to write fewer bytes + * than IOCPARM_LEN(req). + */ +TEST_F(Ioctl, ior) +{ + char buf[sizeof(OUTPUT_DATA) + 1] = { 0 }; + unsigned long req = _IOR(0xff, 1, buf); + int fd; + + expect_opendir(FUSE_ROOT_ID); + expect_ioctl_rw(FUSE_ROOT_ID); + + fd = open("mountpoint", O_RDONLY | O_DIRECTORY); + ASSERT_LE(0, fd) << strerror(errno); + + EXPECT_EQ(0, ioctl(fd, req, buf)) << strerror(errno); + EXPECT_EQ(0, memcmp(buf, OUTPUT_DATA, sizeof(OUTPUT_DATA))); + + leak(fd); +} + +/* + * For _IOR() and _IOWR(), if the server attempts to write more bytes + * than IOCPARM_LEN(req), the kernel should fail the syscall with EIO. + */ +TEST_F(Ioctl, ior_overflow) +{ + char buf[sizeof(OUTPUT_DATA) - 1] = { 0 }; + unsigned long req = _IOR(0xff, 2, buf); + int fd; + + expect_opendir(FUSE_ROOT_ID); + expect_ioctl_rw(FUSE_ROOT_ID); + + fd = open("mountpoint", O_RDONLY | O_DIRECTORY); + ASSERT_LE(0, fd) << strerror(errno); + + EXPECT_EQ(-1, ioctl(fd, req, buf)); + EXPECT_EQ(EIO, errno); + + leak(fd); +} + +TEST_F(Ioctl, iow) +{ + unsigned long req = _IOW(0xff, 3, INPUT_DATA); + int fd; + + expect_opendir(FUSE_ROOT_ID); + expect_ioctl_rw(FUSE_ROOT_ID); + + fd = open("mountpoint", O_RDONLY | O_DIRECTORY); + ASSERT_LE(0, fd) << strerror(errno); + + EXPECT_EQ(0, ioctl(fd, req, INPUT_DATA)) << strerror(errno); + + leak(fd); +} + +TEST_F(Ioctl, iowr) +{ + char buf[std::max(sizeof(INPUT_DATA), sizeof(OUTPUT_DATA))] = { 0 }; + unsigned long req = _IOWR(0xff, 4, buf); + int fd; + + expect_opendir(FUSE_ROOT_ID); + expect_ioctl_rw(FUSE_ROOT_ID); + + fd = open("mountpoint", O_RDONLY | O_DIRECTORY); + ASSERT_LE(0, fd) << strerror(errno); + + memcpy(buf, INPUT_DATA, sizeof(INPUT_DATA)); + EXPECT_EQ(0, ioctl(fd, req, buf)) << strerror(errno); + EXPECT_EQ(0, memcmp(buf, OUTPUT_DATA, sizeof(OUTPUT_DATA))); + + leak(fd); +} + +TEST_F(Ioctl, iowint) +{ + unsigned long req = _IOWINT(0xff, 5); + int arg = 1337; + int fd, r; + + expect_opendir(FUSE_ROOT_ID); + expect_ioctl_rw(FUSE_ROOT_ID); + + fd = open("mountpoint", O_RDONLY | O_DIRECTORY); + ASSERT_LE(0, fd) << strerror(errno); + + /* The server is allowed to return a positive value on success */ + r = ioctl(fd, req, arg); + EXPECT_LE(0, r) << strerror(errno); + EXPECT_EQ(arg, r); + + leak(fd); +} diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index a377ba832ef5..ee47d9e0e01c 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -241,6 +241,12 @@ void MockFS::debug_request(const mockfs_buf_in &in, ssize_t buflen) case FUSE_INTERRUPT: printf(" unique=%" PRIu64, in.body.interrupt.unique); break; + case FUSE_IOCTL: + printf(" flags=%#x cmd=%#x in_size=%" PRIu32 + " out_size=%" PRIu32, + in.body.ioctl.flags, in.body.ioctl.cmd, + in.body.ioctl.in_size, in.body.ioctl.out_size); + break; case FUSE_LINK: printf(" oldnodeid=%" PRIu64, in.body.link.oldnodeid); break; @@ -678,6 +684,12 @@ void MockFS::audit_request(const mockfs_buf_in &in, ssize_t buflen) { EXPECT_EQ(inlen, fih + sizeof(in.body.init)); EXPECT_EQ((size_t)buflen, inlen); break; + case FUSE_IOCTL: + EXPECT_GE(inlen, fih + sizeof(in.body.ioctl)); + EXPECT_EQ(inlen, + fih + sizeof(in.body.ioctl) + in.body.ioctl.in_size); + EXPECT_EQ((size_t)buflen, inlen); + break; case FUSE_OPENDIR: EXPECT_EQ(inlen, fih + sizeof(in.body.opendir)); EXPECT_EQ((size_t)buflen, inlen); @@ -733,7 +745,6 @@ void MockFS::audit_request(const mockfs_buf_in &in, ssize_t buflen) { break; case FUSE_NOTIFY_REPLY: case FUSE_BATCH_FORGET: - case FUSE_IOCTL: case FUSE_POLL: case FUSE_READDIRPLUS: FAIL() << "Unsupported opcode?"; diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh index f98a5337c9d1..00503332f820 100644 --- a/tests/sys/fs/fusefs/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -166,6 +166,7 @@ union fuse_payloads_in { fuse_forget_in forget; fuse_getattr_in getattr; fuse_interrupt_in interrupt; + fuse_ioctl_in ioctl; fuse_lk_in getlk; fuse_getxattr_in getxattr; fuse_init_in init; @@ -222,6 +223,7 @@ union fuse_payloads_out { fuse_listxattr_out listxattr; fuse_open_out open; fuse_statfs_out statfs; + fuse_ioctl_out ioctl; /* * The protocol places no limits on the length of the string. This is * merely convenient for testing. From nobody Sat Jan 10 02:28:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp2dc1VJMz6N3Mc; Sat, 10 Jan 2026 02:29:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp2db43R8z3Mxb; Sat, 10 Jan 2026 02:29:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 60A2SrQN026816; Sat, 10 Jan 2026 04:28:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 60A2SrQN026816 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 60A2Srqb026815; Sat, 10 Jan 2026 04:28:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Jan 2026 04:28:53 +0200 From: Konstantin Belousov To: Olivier Certner Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 67599eef01f5 - main - sys/x86/NOTES: Add vt_efifb Message-ID: References: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dp2db43R8z3Mxb On Fri, Jan 09, 2026 at 04:35:22PM +0000, Olivier Certner wrote: > The branch main has been updated by olce: > > URL: https://cgit.FreeBSD.org/src/commit/?id=67599eef01f5417715f673ec81fc1467917c7a10 > > commit 67599eef01f5417715f673ec81fc1467917c7a10 > Author: Olivier Certner > AuthorDate: 2026-01-09 16:23:59 +0000 > Commit: Olivier Certner > CommitDate: 2026-01-09 16:34:56 +0000 > > sys/x86/NOTES: Add vt_efifb > > Contrary to what is stated in commit f224591746bd ("Add ASMC_DEBUG make > option"), the various NOTES files should list all available options. No, the f224591746bd commit is correct. GENERIC + LINT should cover all options and reverse of them, as much as possible. In other words, LINT should be complementary to GENERIC, for most options. At least this is how bde@ described the intent of LINT, and I think this is a right thing to follow. From nobody Sat Jan 10 02:42:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp2wg2y5lz6N4F3 for ; Sat, 10 Jan 2026 02:42: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp2wf6Xcdz3Q0K for ; Sat, 10 Jan 2026 02:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768012930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jb8vikYWLGV0hj+8bn8TGGC6nMfJ9N1JcP/Ax1qKNTc=; b=gXe8wozBhh0vWEl/9j/XP0Q1oUK4IIa5R3WEAEOrdtIJkg9pSDrQefCy16pzSGqO2XLtWQ +fgjhOwo////cVanqQfYjPeSvHkYw5tzAuSDxSgxTeT0aoDaa+KSDOz69x2c7Fi6TFQbrr M2dfsKiyUcEuNOux7wb96ldZ39iUvSQ5wMm90qFInHul1yhsGxP7nXU9nWZW9wTRW9+kDl 3W3r4OQqXdUYfnnCjfWDgoXQlGMTg2WXi1++Sh1TQCkZcvSEbkh2dVlg5FlVHKopVUZcPH kjPNXK5EBVrHCQiwOuqhifCKnjDKE05nsjMoQHCKCthilfsyNYZHAesHboinQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768012930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jb8vikYWLGV0hj+8bn8TGGC6nMfJ9N1JcP/Ax1qKNTc=; b=BLfNnRGLZioyhpwGGPZI5/N9M3C+cbVkNW5susGa2ry7RsoFrUT+nbeBxp6R7gsHXGx4Wa slj0up/o2ZG1hp15+GtAAK9DeAJBwUM/F1OiiaYVNcYNTYzgbhGiYxhqUqnchyLpq1DqEU yH5fp6+HMNsEErfn948aY5QoenV/dGU8sTg2ozdbJb7j72vymAy55yNxu5FnKDshE0XeKd d+JXh3DGgfT4NIouhuTY3kLlcoDlggCr1SqcGnFbcE13YB+DSrnFsGxE6MOoxMIV7rGGpi /PungxtqshyWFe35egTI4pMj/2JJEjcp8uOdSqZwEE3LgXJPjfeN1hOkqeFpaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768012930; a=rsa-sha256; cv=none; b=xsz+q4KD2JMMBQEkKxvEMKMBf+ND8b/np5cyS1yt+rI9+CV0VNh0CtpCpJNxyDW49tqA4C nK3O1jD7G9F65KivJ2Y6qZ/mHzBm9UTnQZjqnUMTzwpus7l9gV3eTpHdAekPU2uP6S06jd uwourmVsEJt3wtJ5eFHmzm1yC33OlLXCwRjXFI35LRyP6HDqJ96AZGfMrd/zxwRwWkNAuO 0K2ijDYTp7n//gHdy188nuNOoMOgDyfn292lfnNZpn3KEKGLeXTwCz6DthETuWjWhJothU GpLt7XWcNjkreJfHSnZhqj7f2q+qnJqnrTz9RRhBVpU3d38BdEuybsZIQvgiGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dp2wf5n4jzc91 for ; Sat, 10 Jan 2026 02:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c367 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 02:42:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Guilherme Augusto de Souza Candinho From: Warner Losh Subject: git: 849c0eb07028 - main - Comments: FreeBSD.conf should not be overwritten List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 849c0eb0702879d7cd0fdec589aac048b691b2ab Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 02:42:10 +0000 Message-Id: <6961bc82.c367.77df63a8@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=849c0eb0702879d7cd0fdec589aac048b691b2ab commit 849c0eb0702879d7cd0fdec589aac048b691b2ab Author: Guilherme Augusto de Souza Candinho AuthorDate: 2025-12-13 22:55:28 +0000 Commit: Warner Losh CommitDate: 2026-01-10 02:41:13 +0000 Comments: FreeBSD.conf should not be overwritten The files /usr/sbin/pkg/FreeBSD.conf.* currently set base repo to {enable: no}. We don't want to overwrite /local/etc/pkg/repos/FreeBSD.conf that already exists when users choose tech preview in the installation. Signed-off-by: Guilherme Augusto de Souza Candinho Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1925 --- usr.sbin/pkg/FreeBSD.conf.latest | 4 ++-- usr.sbin/pkg/FreeBSD.conf.quarterly | 5 +++-- usr.sbin/pkg/FreeBSD.conf.quarterly-release | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.sbin/pkg/FreeBSD.conf.latest b/usr.sbin/pkg/FreeBSD.conf.latest index f4b80c02cffa..0b6570cbd798 100644 --- a/usr.sbin/pkg/FreeBSD.conf.latest +++ b/usr.sbin/pkg/FreeBSD.conf.latest @@ -1,9 +1,9 @@ # # To disable a repository, instead of modifying or removing this file, -# create a /usr/local/etc/pkg/repos/FreeBSD.conf file, e.g.: +# create or edit /usr/local/etc/pkg/repos/FreeBSD.conf, e.g.: # # mkdir -p /usr/local/etc/pkg/repos -# echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf +# echo "FreeBSD-ports: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # # Note that the FreeBSD-base repository is disabled by default. diff --git a/usr.sbin/pkg/FreeBSD.conf.quarterly b/usr.sbin/pkg/FreeBSD.conf.quarterly index 117bbd49aeae..4579bb6d8395 100644 --- a/usr.sbin/pkg/FreeBSD.conf.quarterly +++ b/usr.sbin/pkg/FreeBSD.conf.quarterly @@ -1,9 +1,10 @@ + # # To disable a repository, instead of modifying or removing this file, -# create a /usr/local/etc/pkg/repos/FreeBSD.conf file, e.g.: +# create or edit /usr/local/etc/pkg/repos/FreeBSD.conf, e.g.: # # mkdir -p /usr/local/etc/pkg/repos -# echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf +# echo "FreeBSD-ports: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # # Note that the FreeBSD-base repository is disabled by default. diff --git a/usr.sbin/pkg/FreeBSD.conf.quarterly-release b/usr.sbin/pkg/FreeBSD.conf.quarterly-release index 47183d41dc6d..e2f4ddf2d878 100644 --- a/usr.sbin/pkg/FreeBSD.conf.quarterly-release +++ b/usr.sbin/pkg/FreeBSD.conf.quarterly-release @@ -1,9 +1,9 @@ # # To disable a repository, instead of modifying or removing this file, -# create a /usr/local/etc/pkg/repos/FreeBSD.conf file, e.g.: +# create or edit /usr/local/etc/pkg/repos/FreeBSD.conf, e.g.: # # mkdir -p /usr/local/etc/pkg/repos -# echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf +# echo "FreeBSD-ports: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf # # Note that the FreeBSD-base repository is disabled by default. From nobody Sat Jan 10 03:57:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp4br5qhzz6N878 for ; Sat, 10 Jan 2026 03:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp4br59bQz3Wrs for ; Sat, 10 Jan 2026 03:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768017464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NtWG7E3HXwwlgpMoXixUrWHtM4ZWzXCPOfZ6yLDNz5k=; b=J8np1dOV++XXqmp7z22Imv3iwynLsh3N+eGUtQIq4trFyoWmveN+yoaQnDJTaKvi7/jzKo 1gJquMK6HE96WTb2CHmREgYF8l8uhIsp72NlUPshJyErp2l3qmWMWcpmZb+mHfhR1iPwkg irKzQpwjYFBzhXhRQjPUc6LMux2UFUXq+xCXnrVqTZX98YFVjCcYwgh1REt7FwyxF/e589 j/2NmABpZMqV0odCt1jdx3Jjmeg0dsMFGtSU96V7m7ix5WqGE+1KBVIB4p6MNPLrKXGngp inkOCO7rdyWpjl4//Y3B4WseqUILL0/HVnxuFcfQBYkpUhSOCLm/44Hf1fTFbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768017464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NtWG7E3HXwwlgpMoXixUrWHtM4ZWzXCPOfZ6yLDNz5k=; b=NoQ++lf1NSgK6I2XSCcRc7W5SXtGLTgzIp1y9y1rbUlEyfdYFx4FLnsQimShTyq27lTOvE hbcGaLHQv4vUnXywE5iPZIbLql+cEy7ZVSi3WFsIqjNEj64spA1jtWR4w3nuDYCM1kZkfj LHpYVY6yBT5nE379OkA8bBzx+DdnIT5Mw8ycYmhhNTSUpys1toUmpNehxBL1FytdYJ4upT XHnKaPcOYAKB83HmuPrOUBTs5h2YYvu1RhLjsR6h/1qdc/lZkQsSOFfc0QFt12J6bBC9XL bp/f25Vf6pNc+6u6rXMK8gax9+Ukyia7ew+ilrIKnXs+a5g+eEPRgxE+gku00w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768017464; a=rsa-sha256; cv=none; b=gGxeIKuevbqP5k9GUiJk7iY690zxplmlxHT3l7AZo62Tby4ePZWQYngoT6e3RWuXSF0Hz1 h0OKhIUoOZccTnNmcxlRnvRIAGXQ/b0h/rcBZTxQVVJsIHy6eikCMolZDOux+LvJR2lwtM rnaQBQdMuE19MF00SKkx6JfPSb/av8LRumreCk2KU79Zd2JALPSZeOxdpe/drLoVDlzSKi dlaXlqjUxPqygSidFnOG+x+ciEDRYpUfTi+0fReXUJwkcVFJEQkbVPLTxIosGywB/M/bBg f/ZDqvNb7LjWIKPm3faTBkevft4TCymF9RGbtJwCBhUruMjw1iC4DSoSKDmz2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dp4br4gjxzfd2 for ; Sat, 10 Jan 2026 03:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25f82 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 03:57:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Brad Smith From: Adrian Chadd Subject: git: e28529ca4d34 - main - rge: Add to amd64 GENERIC and to sys/conf/NOTES List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e28529ca4d34084452ca9acf63aa40279787239a Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 03:57:39 +0000 Message-Id: <6961ce33.25f82.6516b747@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=e28529ca4d34084452ca9acf63aa40279787239a commit e28529ca4d34084452ca9acf63aa40279787239a Author: Brad Smith AuthorDate: 2026-01-10 03:57:17 +0000 Commit: Adrian Chadd CommitDate: 2026-01-10 03:57:17 +0000 rge: Add to amd64 GENERIC and to sys/conf/NOTES Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54609 --- sys/amd64/conf/GENERIC | 1 + sys/conf/NOTES | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 38b6dccb3579..8475e0c03e74 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -242,6 +242,7 @@ device axp # AMD EPYC integrated NIC (requires miibus) # PCI Ethernet NICs. device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE device le # AMD Am7900 LANCE and Am79C9xx PCnet +device rge # Realtek 8125/8126/8127 device ti # Alteon Networks Tigon I/II gigabit Ethernet # Nvidia/Mellanox Connect-X 4 and later, Ethernet only diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 8d413fb4f583..eb33d0abf919 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1922,6 +1922,7 @@ device xmphy # XaQti XMAC II # oce: Emulex 10 Gbit adapters (OneConnect Ethernet) # ral: Ralink Technology IEEE 802.11 wireless adapter # re: Realtek 8139C+/8169/816xS/811xS/8101E PCI/PCIe Ethernet adapter +# rge: Realtek 8125/8126/8127 PCIe Ethernet adapter # rl: Support for PCI fast ethernet adapters based on the Realtek 8129/8139 # chipset. Note that the Realtek driver defaults to using programmed # I/O to do register accesses because memory mapped mode seems to cause @@ -2009,6 +2010,7 @@ device cxgbe # Chelsio T4-T6 1/10/25/40/100 Gigabit Ethernet device cxgbev # Chelsio T4-T6 Virtual Functions device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge # Myricom Myri-10G 10GbE NIC +device rge # Realtek 8125/8126/8127 device oce # Emulex 10GbE (OneConnect Ethernet) device ti # Alteon Networks Tigon I/II gigabit Ethernet From nobody Sat Jan 10 05:05:48 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp66P3Hr0z6ND5g for ; Sat, 10 Jan 2026 05:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp66P1zlPz3dNL for ; Sat, 10 Jan 2026 05:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768021549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eV0lyvzfVodBrjzXK6h/+c2BloZAQ8JrdC7wnyRmQyI=; b=tPK23Vt3wSQI9b1GuD6qiHcGRXI6JoCUEpa+tWFxZBlIYkXXeVAAkTufu73Iv33Jw76QXO NxAu5gT1sEav7Owjmpigiae6l+W0ili6BAEYv5mTGaZ4xvBX4OLkxZbdDxa13MPvX3w4Vj inCyCIEQNZMXbnRgyIfiyiIoqGgUJoKYZs5N01RXLpRe4d6tw2aHXMY8LKzVK3Bo9hP96i +Q7ncY64fhbFOji67ft+wgiZRvlwv/XvWZwA2r10ssp2PC3U849Xj4QCxoqOL+9BmFXF7T UHoy7wZ8qa6vKvQsb+OvZO265cUZYebYy22NAx1Z9mwHDTnuDowVf2DUToIxhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768021549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eV0lyvzfVodBrjzXK6h/+c2BloZAQ8JrdC7wnyRmQyI=; b=dG8f5fHmtVV2IavJ3xCFKkIjMidKFaRFqYTi0JWCBOKdVEdFCQfB9B9PWFStoDUo+zccVr TSaUe8qnigyUBzrEr2rnfF5ikBKZWhzbPQIN9IA7VDWddCNVVwHtqMnfX75efI11knU3oI 5TCWVhnbLAn625sdNhywmjgyPS0d6D8EThlDh9dS8r+BIzID4oL20GWQzW6m8i4rWGy6mg tPTYMogt1ghx04zhbubZAmC5bs+AMeVse79h/o55Opaoneie9UVGdTB/IPPTf1qzM0+agC 9ae4Yh8EAsLAcBtMD48YPxS7uIMIO9S878ostVAlPdxvATviwLraXx2+ZIIyuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768021549; a=rsa-sha256; cv=none; b=FNHGQU1aUr8kQE6FJ9Su9WDEO1Z0Y/qNL8vmVBK/v4fwy06kGrjVi/ElVZSa0RMwcRFQTk orXYU4I9GDOe7P+z5rT9C4G2Y8OdqhWINk3WigTUtjNws6lPVvtSkC/mPbBi1OvDjcC3uO lBnDtVuA0oc1Ax1Q5i1AH94abmO4OG+mhmUp+94bXBkuj44PYSJq5jCaVvmC+PSHkaB0PS yGTFyydF59jTykEdS18SMLJMw2pQ/n7EG0NrOx2dcaILty9isw17GSvSG9nCa4J6XdXvle Q4tFzyyZQspmVutdCmlsJcX0SLqG+4oAH5Ah21gfbBmg77+Vi7JcQQWAFOfcQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dp66P0T3ZzhVQ for ; Sat, 10 Jan 2026 05:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34d16 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 05:05:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: c29ec2ee9871 - main - cddl: remove sparc and mips code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c29ec2ee9871cc21c3406bf6ed398980acbedcb5 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 05:05:48 +0000 Message-Id: <6961de2c.34d16.2479968f@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c29ec2ee9871cc21c3406bf6ed398980acbedcb5 commit c29ec2ee9871cc21c3406bf6ed398980acbedcb5 Author: Minsoo Choo AuthorDate: 2025-12-01 15:10:06 +0000 Commit: Warner Losh CommitDate: 2026-01-10 05:05:37 +0000 cddl: remove sparc and mips code Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1910 --- sys/cddl/compat/opensolaris/sys/cpuvar_defs.h | 3 - .../opensolaris/uts/common/dtrace/fasttrap.c | 4 - .../contrib/opensolaris/uts/common/sys/dtrace.h | 5 - .../opensolaris/uts/common/sys/dtrace_impl.h | 7 - .../contrib/opensolaris/uts/common/sys/isa_defs.h | 206 +-------------------- 5 files changed, 2 insertions(+), 223 deletions(-) diff --git a/sys/cddl/compat/opensolaris/sys/cpuvar_defs.h b/sys/cddl/compat/opensolaris/sys/cpuvar_defs.h index d99eaea7947e..1bcc721b7c15 100644 --- a/sys/cddl/compat/opensolaris/sys/cpuvar_defs.h +++ b/sys/cddl/compat/opensolaris/sys/cpuvar_defs.h @@ -40,9 +40,6 @@ #define CPU_DTRACE_KPRIV 0x0080 /* DTrace fault: bad kernel access */ #define CPU_DTRACE_UPRIV 0x0100 /* DTrace fault: bad user access */ #define CPU_DTRACE_TUPOFLOW 0x0200 /* DTrace fault: tuple stack overflow */ -#if defined(__sparc) -#define CPU_DTRACE_FAKERESTORE 0x0400 /* pid provider hint to getreg */ -#endif #define CPU_DTRACE_ENTRY 0x0800 /* pid provider hint to ustack() */ #define CPU_DTRACE_BADSTACK 0x1000 /* DTrace fault: bad stack */ diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c index 28e2c26f5b1c..42c50ce07d03 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c @@ -2167,11 +2167,7 @@ fasttrap_meta_create_probe(void *arg, void *parg, pp->ftp_tps[i].fit_tp = tp; pp->ftp_tps[i].fit_id.fti_probe = pp; -#ifdef __sparc - pp->ftp_tps[i].fit_id.fti_ptype = DTFTP_POST_OFFSETS; -#else pp->ftp_tps[i].fit_id.fti_ptype = DTFTP_OFFSETS; -#endif } /* diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 242a32e140f5..c322071c6193 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2411,11 +2411,6 @@ extern void dtrace_invop_add(int (*)(uintptr_t, struct trapframe *, uintptr_t)); extern void dtrace_invop_remove(int (*)(uintptr_t, struct trapframe *, uintptr_t)); -#ifdef __sparc -extern int dtrace_blksuword32(uintptr_t, uint32_t *, int); -extern void dtrace_getfsr(uint64_t *); -#endif - #ifndef illumos extern void dtrace_helpers_duplicate(proc_t *, proc_t *); extern void dtrace_helpers_destroy(proc_t *); diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h index 10ba0d37ac1b..c26956a646ff 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h @@ -1302,15 +1302,8 @@ extern int dtrace_attached(void); extern hrtime_t dtrace_gethrestime(void); #endif -#ifdef __sparc -extern void dtrace_flush_windows(void); -extern void dtrace_flush_user_windows(void); -extern uint_t dtrace_getotherwin(void); -extern uint_t dtrace_getfprs(void); -#else extern void dtrace_copy(uintptr_t, uintptr_t, size_t); extern void dtrace_copystr(uintptr_t, uintptr_t, size_t, volatile uint16_t *); -#endif /* * DTrace Assertions diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h b/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h index 93f1855b3908..2e4281d959a8 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h @@ -109,7 +109,7 @@ * * _LP64: * Long/Pointer are 64 bits, Int is 32 bits. This is the chosen - * implementation for 64-bit ABIs such as SPARC V9. + * implementation for 64-bit ABIs. * * _I32LPx: * A compilation environment where 'int' is 32-bit, and @@ -190,7 +190,7 @@ * __x86 * This is ONLY a synonym for defined(__i386) || defined(__amd64) * which is useful only insofar as these two architectures share - * common attributes. Analogous to __sparc. + * common attributes. * * _PSM_MODULES * This indicates whether or not the implementation uses PSM @@ -235,9 +235,6 @@ extern "C" { /* * Define the appropriate "processor characteristics" */ -#ifdef illumos -#define _LITTLE_ENDIAN -#endif #define _STACK_GROWS_DOWNWARD #define _LONG_LONG_LTOH #define _BIT_FIELDS_LTOH @@ -302,9 +299,6 @@ extern "C" { /* * Define the appropriate "processor characteristics" */ -#ifdef illumos -#define _LITTLE_ENDIAN -#endif #define _STACK_GROWS_DOWNWARD #define _LONG_LONG_LTOH #define _BIT_FIELDS_LTOH @@ -475,71 +469,6 @@ extern "C" { #define _DONT_USE_1275_GENERIC_NAMES #define _HAVE_CPUID_INSN -#elif defined(__mips__) - -/* - * Define the appropriate "processor characteristics" - */ -#define _STACK_GROWS_DOWNWARD -#define _LONG_LONG_LTOH -#define _BIT_FIELDS_LTOH -#define _IEEE_754 -#define _CHAR_IS_SIGNED -#define _BOOL_ALIGNMENT 1 -#define _CHAR_ALIGNMENT 1 -#define _SHORT_ALIGNMENT 2 -#define _INT_ALIGNMENT 4 -#define _FLOAT_ALIGNMENT 4 -#define _FLOAT_COMPLEX_ALIGNMENT 4 -#if defined(__mips_n64) -#define _LONG_ALIGNMENT 8 -#define _LONG_LONG_ALIGNMENT 8 -#define _DOUBLE_ALIGNMENT 8 -#define _DOUBLE_COMPLEX_ALIGNMENT 8 -#define _LONG_DOUBLE_ALIGNMENT 8 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 8 -#define _POINTER_ALIGNMENT 8 -#define _MAX_ALIGNMENT 8 -#define _ALIGNMENT_REQUIRED 0 - -#define _LONG_LONG_ALIGNMENT_32 _INT_ALIGNMENT -/* - * Define the appropriate "implementation choices". - */ -#if !defined(_LP64) -#define _LP64 -#endif -#else -#define _LONG_ALIGNMENT 4 -#define _LONG_LONG_ALIGNMENT 4 -#define _DOUBLE_ALIGNMENT 4 -#define _DOUBLE_COMPLEX_ALIGNMENT 4 -#define _LONG_DOUBLE_ALIGNMENT 4 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 4 -#define _POINTER_ALIGNMENT 4 -#define _MAX_ALIGNMENT 4 -#define _ALIGNMENT_REQUIRED 0 - -#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT - -/* - * Define the appropriate "implementation choices". - */ -#if !defined(_ILP32) -#define _ILP32 -#endif -#if !defined(_I32LPx) && defined(_KERNEL) -#define _I32LPx -#endif -#endif -#define _SUNOS_VTOC_16 -#define _DMA_USES_PHYSADDR -#define _FIRMWARE_NEEDS_FDISK -#define _PSM_MODULES -#define _RTC_CONFIG -#define _DONT_USE_1275_GENERIC_NAMES -#define _HAVE_CPUID_INSN - #elif defined(__powerpc__) #if defined(__BIG_ENDIAN__) @@ -548,137 +477,6 @@ extern "C" { #define _BIT_FIELDS_LTOH #endif -/* - * The following set of definitions characterize the Solaris on SPARC systems. - * - * The symbol __sparc indicates any of the SPARC family of processor - * architectures. This includes SPARC V7, SPARC V8 and SPARC V9. - * - * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined - * by Version 8 of the SPARC Architecture Manual. (SPARC V7 is close enough - * to SPARC V8 for the former to be subsumed into the latter definition.) - * - * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined - * by Version 9 of the SPARC Architecture Manual. - * - * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only - * relevant when the symbol __sparc is defined. - */ -/* - * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added - * to support backwards builds. This workaround should be removed in s10_71. - */ -#elif defined(__sparc) || defined(__sparcv9) || defined(__sparc__) -#if !defined(__sparc) -#define __sparc -#endif - -/* - * You can be 32-bit or 64-bit, but not both at the same time. - */ -#if defined(__sparcv8) && defined(__sparcv9) -#error "SPARC Versions 8 and 9 are mutually exclusive choices" -#endif - -/* - * Existing compilers do not set __sparcv8. Years will transpire before - * the compilers can be depended on to set the feature test macro. In - * the interim, we'll set it here on the basis of historical behaviour; - * if you haven't asked for SPARC V9, then you must've meant SPARC V8. - */ -#if !defined(__sparcv9) && !defined(__sparcv8) -#define __sparcv8 -#endif - -/* - * Define the appropriate "processor characteristics" shared between - * all Solaris on SPARC systems. - */ -#ifdef illumos -#define _BIG_ENDIAN -#endif -#define _STACK_GROWS_DOWNWARD -#define _LONG_LONG_HTOL -#define _BIT_FIELDS_HTOL -#define _IEEE_754 -#define _CHAR_IS_SIGNED -#define _BOOL_ALIGNMENT 1 -#define _CHAR_ALIGNMENT 1 -#define _SHORT_ALIGNMENT 2 -#define _INT_ALIGNMENT 4 -#define _FLOAT_ALIGNMENT 4 -#define _FLOAT_COMPLEX_ALIGNMENT 4 -#define _LONG_LONG_ALIGNMENT 8 -#define _DOUBLE_ALIGNMENT 8 -#define _DOUBLE_COMPLEX_ALIGNMENT 8 -#define _ALIGNMENT_REQUIRED 1 - -/* - * Define the appropriate "implementation choices" shared between versions. - */ -#define _SUNOS_VTOC_8 -#define _DMA_USES_VIRTADDR -#define _NO_FDISK_PRESENT -#define _HAVE_TEM_FIRMWARE -#define _OBP - -/* - * The following set of definitions characterize the implementation of - * 32-bit Solaris on SPARC V8 systems. - */ -#if defined(__sparcv8) - -/* - * Define the appropriate "processor characteristics" - */ -#define _LONG_ALIGNMENT 4 -#define _LONG_DOUBLE_ALIGNMENT 8 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 8 -#define _POINTER_ALIGNMENT 4 -#define _MAX_ALIGNMENT 8 - -#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT - -/* - * Define the appropriate "implementation choices" - */ -#define _ILP32 -#if !defined(_I32LPx) && defined(_KERNEL) -#define _I32LPx -#endif - -/* - * The following set of definitions characterize the implementation of - * 64-bit Solaris on SPARC V9 systems. - */ -#elif defined(__sparcv9) - -/* - * Define the appropriate "processor characteristics" - */ -#define _LONG_ALIGNMENT 8 -#define _LONG_DOUBLE_ALIGNMENT 16 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 16 -#define _POINTER_ALIGNMENT 8 -#define _MAX_ALIGNMENT 16 - -#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT - -/* - * Define the appropriate "implementation choices" - */ -#if !defined(_LP64) -#define _LP64 -#endif -#if !defined(_I32LPx) -#define _I32LPx -#endif -#define _MULTI_DATAMODEL - -#else -#error "unknown SPARC version" -#endif - /* * #error is strictly ansi-C, but works as well as anything for K&R systems. */ From nobody Sat Jan 10 05:05:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp66Q5117z6NDBP for ; Sat, 10 Jan 2026 05:05: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp66Q0wpgz3d9K for ; Sat, 10 Jan 2026 05:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768021550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y4qxzxRkK81B2V3dGEtj0HPBsEsCCkDlC6Gy13ExblA=; b=eJQt2V1g9FEkVgMTS++DLy5BBaIuTnYUBWWXtmlOTzZ7eA3YkdqtzvDPQjpEATJD0XcvKw Ykfo5MGa5Jtj6i+l2ADDw7U8LEc/XWLJKWSrL4eSBGVgttoemF1affW599ODMyowp8KS+q iN4ifCMkIeBqfjn1wvwtb7NoEz0+rmML/CEhN8JvfunUNCgGSGP7ySDrsAnR6i8ielJL8C P8iHpYlKrBLa2Z85epjmuYNXlm+m+pEvXS4G98/egG8lzRiTwosj7PUmwEMVE4+l2FZjUV Rc3cn8lZdtqLW1oHX1e9ycrGLkb7/2Nck2+YV4Pj3vEs2eWoYfdVEMW9mQoLTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768021550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y4qxzxRkK81B2V3dGEtj0HPBsEsCCkDlC6Gy13ExblA=; b=rl/0hrFbUGokEgxVFsXQDE+GP38aaty7OI1RyrtQiKb6WXo8fSpPsaqo1ZyskhE/IoGV1Z 0n9jlp62fZ2++rOc0B/mB8opCVG8PonzD80/VE4cPhN7mLODk9ijD/ipctcp3VMmiEaaMK dZMsIKgkrdivMQeI+OsvcDrvfRpQik/ic9nYfQ55UucQPodekEIaPEu1KLmGNxYJkE5OIK y6kqQQusV7x2Dzu+Ib/UwmepQPgoEeDcvohEjDtrgM/p7i4sDsw+AWHfmEcCUnqgv6wi9N EP2H58Qtn3+2thro+hWygErl+hN6PbSjEkpP8gbbrqwKAykWk2mXTtOQCF1acA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768021550; a=rsa-sha256; cv=none; b=D+zNfQBbPI4AGHtPIBoPIqGddKKv8kYJDQUx35bZUXUWPBxrxbkV0djo5+ZaeXvGa53xJX M3+ESmPy/l/j7a2xHAOun75zSlfoBxFzK5Jt8ks2tRi4dSPFalVxdvFuEylx4yNFDCTzLq IW07+8rrU7tFLaYj2I7/G/IM7d73ROzJ1ZRJCREwXP2keYHNcVM6LdqBrv3WePzlf4Lwah ObkZnEuzwmh+AkKQcHxY97KmTHUeHi3hUGcqtuzBA0b9w9I5LGSCt6e2WzBeetzedSrsVE 7gklGUuRSkvnshIBzb+temNx3swJ9KsTBq7TETiZgycavpv2CReeHtkWNLgxNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dp66Q0XNXzhHw for ; Sat, 10 Jan 2026 05:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35403 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 05:05:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ricardo Branco From: Warner Losh Subject: git: 3e8619e535b6 - main - bsdinstall: Create separate datasets for directories in /usr/ports List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e8619e535b61c99f0dc50cc6c7e237eb82a8be7 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 05:05:50 +0000 Message-Id: <6961de2e.35403.46e0e7bf@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3e8619e535b61c99f0dc50cc6c7e237eb82a8be7 commit 3e8619e535b61c99f0dc50cc6c7e237eb82a8be7 Author: Ricardo Branco AuthorDate: 2025-10-12 10:32:02 +0000 Commit: Warner Losh CommitDate: 2026-01-10 05:05:37 +0000 bsdinstall: Create separate datasets for directories in /usr/ports Both distfiles & packages contain compressed files. Signed-off-by: Ricardo Branco Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1873 --- usr.sbin/bsdinstall/scripts/zfsboot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index a4c9220a709c..f958f2e47ca8 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -160,6 +160,8 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATASETS=" # Ports tree /usr/ports setuid=off + /usr/ports/distfiles compress=off + /usr/ports/packages compress=off # Source tree /usr/src From nobody Sat Jan 10 05:05:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp66R52Cnz6ND85 for ; Sat, 10 Jan 2026 05:05: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp66R2bd1z3d9L for ; Sat, 10 Jan 2026 05:05:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768021551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahOfafXvleWWkWpVO67wgeLfJjBswB2sX9aHYZ3R8ao=; b=T3qkKo04zOIPZVF/SM6OwX+TLAkWsID4FMzQJtb7Ify9q/t+JrbvhfUj9Ozb/bDrNSLEhA E74ZL0AOvZ4EQXvyhuBFWvUu7WWgLcriCD8uywMcAgRHNj05lLi+Rpkjip557Mak5J+BPn rEggpp8kldEtwkyeji/lqTJiJr+kngCbIbqLlu/e35R7dRA8WnaYrHP0hcYnqNDLNz9juB XaIWCGjxD4NMoY+gwtw9yPZAZI0kjWF4SjfgdRxiZGiYZqWbOxit+xllCEEU4noSUW1iKQ cNVatga3pmDUVWD2Y9xGs3oe8VRYI0hZMMqCgWdH2IpGB2c8v4frZRXXEF1yGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768021551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahOfafXvleWWkWpVO67wgeLfJjBswB2sX9aHYZ3R8ao=; b=G+rHzhsXr5AROSI337Z+wm/4tdPsrS7RaXyTymGRaTNtYCZGO4B4UMg/PqGJmUXbvglsnB MF1Ndbqw9ilRc2luVhRMBQFgM34rjtlTn3cBd8IC8bvhTTsSVNzKpDyb9SkXgC4Ngrf6AC ON30uApj4vLp9Crq9xxrmocb8L5VL4HbK4gfrHJFi0JONgPlWM6B+62mm76VLSr/OEsAUU 6AxYzLACYDZLVyAKpnfhLZuqxJCgh6yS0R8LnH1/N2AcNEuwc9Q+qSMyS2dQeCHxIJmTLe pUk7GY8BcIaT0rsG1rNlYu3RcRHaq7lvL5REbvRrE/S/NJ8oLsLNlWnHV8p/Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768021551; a=rsa-sha256; cv=none; b=n/7JbdVEQV/TG0uUuO9ibktwilMko5SSyojhB7/7lXKRXJLvU5gPeNQe7fm22a16++5RNS XcZ36NycYmJawv/C8FuQmsj7U/MQf9kv65TNgUqXyj7mhbTAmu6YEF2PyEhgTQZt4CBOS1 xxO8dhKL42DTrhdTSL2yfuBPfr5uuPz7k1po2XY4fQYh8aYiF3WO0yDHqmdditUvUfyh+S UPp+BI/jUyEB3awd1houXxM6lH5nq0jsgGAHitgGUP2kTi4GoDvjMh1VrWkW0RwGIwGQa5 O6d+GUdqKlJcSagRB1MrGmHwBoXZKhLHfJFGgxnw+34Qeqa3qPd7+bF00aZWyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dp66R1VkdzhXq for ; Sat, 10 Jan 2026 05:05:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34d1b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 05:05:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Martin Filla From: Warner Losh Subject: git: b55d106df978 - main - ophgo: import new .dts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b55d106df9785d141f9e3e1c916e921df9d877ac Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 05:05:51 +0000 Message-Id: <6961de2f.34d1b.37ee2089@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b55d106df9785d141f9e3e1c916e921df9d877ac commit b55d106df9785d141f9e3e1c916e921df9d877ac Author: Martin Filla AuthorDate: 2025-09-09 14:34:38 +0000 Commit: Warner Losh CommitDate: 2026-01-10 05:05:38 +0000 ophgo: import new .dts Signed-off-by: Martin Filla Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1844 --- .../include/dt-bindings/clock/cv181x-clock.h | 175 ++++ .../include/dt-bindings/dma/cv181x-dmamap.h | 48 ++ .../include/dt-bindings/reset/cv181x-resets.h | 172 ++++ .../src/riscv/sophgo/cv181x_asic_bga.dtsi | 56 ++ .../src/riscv/sophgo/cv181x_asic_emmc.dtsi | 4 + .../src/riscv/sophgo/cv181x_asic_qfn.dtsi | 120 +++ .../src/riscv/sophgo/cv181x_asic_sd.dtsi | 4 + .../src/riscv/sophgo/cv181x_asic_spinand.dtsi | 5 + .../src/riscv/sophgo/cv181x_asic_spinor.dtsi | 5 + .../device-tree/src/riscv/sophgo/cv181x_base.dtsi | 932 +++++++++++++++++++++ .../src/riscv/sophgo/cv181x_base_arm.dtsi | 320 +++++++ .../src/riscv/sophgo/cv181x_base_riscv.dtsi | 378 +++++++++ .../src/riscv/sophgo/cv181x_default_memmap.dtsi | 25 + .../sophgo/sg2000_milkv_duos_glibc_arm64_emmc.dts | 108 +++ .../sophgo/sg2000_milkv_duos_glibc_arm64_sd.dts | 112 +++ .../sophgo/sg2000_milkv_duos_musl_riscv64_emmc.dts | 108 +++ .../sophgo/sg2000_milkv_duos_musl_riscv64_sd.dts | 108 +++ .../src/riscv/sophgo/sg2000_wevb_arm64_sd.dts | 13 + .../src/riscv/sophgo/sg2000_wevb_riscv64_sd.dts | 10 + sys/modules/dtb/sophgo/Makefile | 15 + sys/riscv/conf/GENERIC | 1 + sys/riscv/conf/std.sophgo | 8 + sys/riscv/sophgo/files.sophgo | 2 + 23 files changed, 2729 insertions(+) diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/cv181x-clock.h b/sys/contrib/device-tree/include/dt-bindings/clock/cv181x-clock.h new file mode 100644 index 000000000000..ed76e4d8ef95 --- /dev/null +++ b/sys/contrib/device-tree/include/dt-bindings/clock/cv181x-clock.h @@ -0,0 +1,175 @@ +/* + * Copyright (C) Cvitek Co., Ltd. 2019-2021. All rights reserved. + * + * File Name: cv181x-clock.h + * Description: + */ + +#ifndef __DT_BINDINGS_CLK_CV181X_H__ +#define __DT_BINDINGS_CLK_CV181X_H__ + +#define CV181X_CLK_MPLL 0 +#define CV181X_CLK_TPLL 1 +#define CV181X_CLK_FPLL 2 +#define CV181X_CLK_MIPIMPLL 3 +#define CV181X_CLK_A0PLL 4 +#define CV181X_CLK_DISPPLL 5 +#define CV181X_CLK_CAM0PLL 6 +#define CV181X_CLK_CAM1PLL 7 + +#define CV181X_CLK_MIPIMPLL_D3 8 +#define CV181X_CLK_CAM0PLL_D2 9 +#define CV181X_CLK_CAM0PLL_D3 10 + +#define CV181X_CLK_A53 11 +#define CV181X_CLK_CPU_AXI0 12 +#define CV181X_CLK_CPU_GIC 13 +#define CV181X_CLK_XTAL_A53 14 +#define CV181X_CLK_TPU 15 +#define CV181X_CLK_TPU_FAB 16 +#define CV181X_CLK_AHB_ROM 17 +#define CV181X_CLK_DDR_AXI_REG 18 +#define CV181X_CLK_RTC_25M 19 +#define CV181X_CLK_TEMPSEN 20 +#define CV181X_CLK_SARADC 21 +#define CV181X_CLK_EFUSE 22 +#define CV181X_CLK_APB_EFUSE 23 +#define CV181X_CLK_DEBUG 24 +#define CV181X_CLK_XTAL_MISC 25 +#define CV181X_CLK_AXI4_EMMC 26 +#define CV181X_CLK_EMMC 27 +#define CV181X_CLK_100K_EMMC 28 +#define CV181X_CLK_AXI4_SD0 29 +#define CV181X_CLK_SD0 30 +#define CV181X_CLK_100K_SD0 31 +#define CV181X_CLK_AXI4_SD1 32 +#define CV181X_CLK_SD1 33 +#define CV181X_CLK_100K_SD1 34 +#define CV181X_CLK_SPI_NAND 35 +#define CV181X_CLK_500M_ETH0 36 +#define CV181X_CLK_AXI4_ETH0 37 +#define CV181X_CLK_500M_ETH1 38 +#define CV181X_CLK_AXI4_ETH1 39 +#define CV181X_CLK_APB_GPIO 40 +#define CV181X_CLK_APB_GPIO_INTR 41 +#define CV181X_CLK_GPIO_DB 42 +#define CV181X_CLK_AHB_SF 43 +#define CV181X_CLK_SDMA_AXI 44 +#define CV181X_CLK_SDMA_AUD0 45 +#define CV181X_CLK_SDMA_AUD1 46 +#define CV181X_CLK_SDMA_AUD2 47 +#define CV181X_CLK_SDMA_AUD3 48 +#define CV181X_CLK_APB_I2C 49 +#define CV181X_CLK_APB_WDT 50 +#define CV181X_CLK_PWM 51 +#define CV181X_CLK_APB_SPI0 52 +#define CV181X_CLK_APB_SPI1 53 +#define CV181X_CLK_APB_SPI2 54 +#define CV181X_CLK_APB_SPI3 55 +#define CV181X_CLK_CAM0_200 56 +#define CV181X_CLK_UART0 57 +#define CV181X_CLK_APB_UART0 58 +#define CV181X_CLK_UART1 59 +#define CV181X_CLK_APB_UART1 60 +#define CV181X_CLK_UART2 61 +#define CV181X_CLK_APB_UART2 62 +#define CV181X_CLK_UART3 63 +#define CV181X_CLK_APB_UART3 64 +#define CV181X_CLK_UART4 65 +#define CV181X_CLK_APB_UART4 66 +#define CV181X_CLK_APB_I2S0 67 +#define CV181X_CLK_APB_I2S1 68 +#define CV181X_CLK_APB_I2S2 69 +#define CV181X_CLK_APB_I2S3 70 +#define CV181X_CLK_AXI4_USB 71 +#define CV181X_CLK_APB_USB 72 +#define CV181X_CLK_125M_USB 73 +#define CV181X_CLK_33K_USB 74 +#define CV181X_CLK_12M_USB 75 +#define CV181X_CLK_AXI4 76 +#define CV181X_CLK_AXI6 77 +#define CV181X_CLK_DSI_ESC 78 +#define CV181X_CLK_AXI_VIP 79 +#define CV181X_CLK_SRC_VIP_SYS_0 80 +#define CV181X_CLK_SRC_VIP_SYS_1 81 +#define CV181X_CLK_DISP_SRC_VIP 82 +#define CV181X_CLK_AXI_VIDEO_CODEC 83 +#define CV181X_CLK_VC_SRC0 84 +#define CV181X_CLK_H264C 85 +#define CV181X_CLK_H265C 86 +#define CV181X_CLK_JPEG 87 +#define CV181X_CLK_APB_JPEG 88 +#define CV181X_CLK_APB_H264C 89 +#define CV181X_CLK_APB_H265C 90 +#define CV181X_CLK_CAM0 91 +#define CV181X_CLK_CAM1 92 +#define CV181X_CLK_CSI_MAC0_VIP 93 +#define CV181X_CLK_CSI_MAC1_VIP 94 +#define CV181X_CLK_ISP_TOP_VIP 95 +#define CV181X_CLK_IMG_D_VIP 96 +#define CV181X_CLK_IMG_V_VIP 97 +#define CV181X_CLK_SC_TOP_VIP 98 +#define CV181X_CLK_SC_D_VIP 99 +#define CV181X_CLK_SC_V1_VIP 100 +#define CV181X_CLK_SC_V2_VIP 101 +#define CV181X_CLK_SC_V3_VIP 102 +#define CV181X_CLK_DWA_VIP 103 +#define CV181X_CLK_BT_VIP 104 +#define CV181X_CLK_DISP_VIP 105 +#define CV181X_CLK_DSI_MAC_VIP 106 +#define CV181X_CLK_LVDS0_VIP 107 +#define CV181X_CLK_LVDS1_VIP 108 +#define CV181X_CLK_CSI0_RX_VIP 109 +#define CV181X_CLK_CSI1_RX_VIP 110 +#define CV181X_CLK_PAD_VI_VIP 111 +#define CV181X_CLK_1M 112 +#define CV181X_CLK_SPI 113 +#define CV181X_CLK_I2C 114 +#define CV181X_CLK_PM 115 +#define CV181X_CLK_TIMER0 116 +#define CV181X_CLK_TIMER1 117 +#define CV181X_CLK_TIMER2 118 +#define CV181X_CLK_TIMER3 119 +#define CV181X_CLK_TIMER4 120 +#define CV181X_CLK_TIMER5 121 +#define CV181X_CLK_TIMER6 122 +#define CV181X_CLK_TIMER7 123 +#define CV181X_CLK_APB_I2C0 124 +#define CV181X_CLK_APB_I2C1 125 +#define CV181X_CLK_APB_I2C2 126 +#define CV181X_CLK_APB_I2C3 127 +#define CV181X_CLK_APB_I2C4 128 +#define CV181X_CLK_WGN 129 +#define CV181X_CLK_WGN0 130 +#define CV181X_CLK_WGN1 131 +#define CV181X_CLK_WGN2 132 +#define CV181X_CLK_KEYSCAN 133 +#define CV181X_CLK_AHB_SF1 134 +#define CV181X_CLK_VC_SRC1 135 +#define CV181X_CLK_SRC_VIP_SYS_2 136 +#define CV181X_CLK_PAD_VI1_VIP 137 +#define CV181X_CLK_CFG_REG_VIP 138 +#define CV181X_CLK_CFG_REG_VC 139 +#define CV181X_CLK_AUDSRC 140 +#define CV181X_CLK_APB_AUDSRC 141 +#define CV181X_CLK_VC_SRC2 142 +#define CV181X_CLK_PWM_SRC 143 +#define CV181X_CLK_AP_DEBUG 144 +#define CV181X_CLK_SRC_RTC_SYS_0 145 +#define CV181X_CLK_PAD_VI2_VIP 146 +#define CV181X_CLK_CSI_BE_VIP 147 +#define CV181X_CLK_VIP_IP0 148 +#define CV181X_CLK_VIP_IP1 149 +#define CV181X_CLK_VIP_IP2 150 +#define CV181X_CLK_VIP_IP3 151 +#define CV181X_CLK_C906_0 152 +#define CV181X_CLK_C906_1 153 +#define CV181X_CLK_SRC_VIP_SYS_3 154 +#define CV181X_CLK_SRC_VIP_SYS_4 155 +#define CV181X_CLK_IVE_VIP 156 +#define CV181X_CLK_RAW_VIP 157 +#define CV181X_CLK_OSDC_VIP 158 +#define CV181X_CLK_CSI_MAC2_VIP 159 +#define CV181X_CLK_CAM0_VIP 160 + +#endif /* __DT_BINDINGS_CLK_CV181X_H__ */ diff --git a/sys/contrib/device-tree/include/dt-bindings/dma/cv181x-dmamap.h b/sys/contrib/device-tree/include/dt-bindings/dma/cv181x-dmamap.h new file mode 100644 index 000000000000..84a4c3664ee1 --- /dev/null +++ b/sys/contrib/device-tree/include/dt-bindings/dma/cv181x-dmamap.h @@ -0,0 +1,48 @@ +#ifndef __DT_BINDINGS_CV181X_DMAMAP_H__ +#define __DT_BINDINGS_CV181X_DMAMAP_H__ + +#define CVI_I2S0_RX 0 +#define CVI_I2S0_TX 1 +#define CVI_I2S1_RX 2 +#define CVI_I2S1_TX 3 +#define CVI_I2S2_RX 4 +#define CVI_I2S2_TX 5 +#define CVI_I2S3_RX 6 +#define CVI_I2S3_TX 7 +#define CVI_UART0_RX 8 +#define CVI_UART0_TX 9 +#define CVI_UART1_RX 10 +#define CVI_UART1_TX 11 +#define CVI_UART2_RX 12 +#define CVI_UART2_TX 13 +#define CVI_UART3_RX 14 +#define CVI_UART3_TX 15 +#define CVI_SPI0_RX 16 +#define CVI_SPI0_TX 17 +#define CVI_SPI1_RX 18 +#define CVI_SPI1_TX 19 +#define CVI_SPI2_RX 20 +#define CVI_SPI2_TX 21 +#define CVI_SPI3_RX 22 +#define CVI_SPI3_TX 23 +#define CVI_I2C0_RX 24 +#define CVI_I2C0_TX 25 +#define CVI_I2C1_RX 26 +#define CVI_I2C1_TX 27 +#define CVI_I2C2_RX 28 +#define CVI_I2C2_TX 29 +#define CVI_I2C3_RX 30 +#define CVI_I2C3_TX 31 +#define CVI_I2C4_RX 32 +#define CVI_I2C4_TX 33 +#define CVI_TDM0_RX 34 +#define CVI_TDM0_TX 35 +#define CVI_TDM1_RX 36 +#define CVI_AUDSRC 37 +#define CVI_SPI_NAND 38 +#define CVI_SPI_NOR 39 +#define CVI_UART4_RX 40 +#define CVI_UART4_TX 41 +#define CVI_SPI_NOR1 42 + +#endif diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/cv181x-resets.h b/sys/contrib/device-tree/include/dt-bindings/reset/cv181x-resets.h new file mode 100644 index 000000000000..e10d33b35446 --- /dev/null +++ b/sys/contrib/device-tree/include/dt-bindings/reset/cv181x-resets.h @@ -0,0 +1,172 @@ +/* + * Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved. + * + * File Name: cvi_template.h + * Description: + */ + +#ifndef __DT_BINDINGS_RST_CV181X_H__ +#define __DT_BINDINGS_RST_CV181X_H__ + +#define RST_MAINRST_AP 0 +#define RST_SECONDRST_AP 1 +#define RST_DDR 2 +#define RST_H264C 3 +#define RST_JPEG 4 +#define RST_H265C 5 +#define RST_VIPSYS 6 +#define RST_TDMA 7 +#define RST_TPU 8 +#define RST_TPUSYS 9 +#define RST_TSM 10 +#define RST_USB 11 +#define RST_ETH0 12 +#define RST_ETH1 13 +#define RST_NAND 14 +#define RST_EMMC 15 +#define RST_SD0 16 +#define RST_SD1 17 +#define RST_SDMA 18 +#define RST_I2S0 19 +#define RST_I2S1 20 +#define RST_I2S2 21 +#define RST_I2S3 22 +#define RST_UART0 23 +#define RST_UART1 24 +#define RST_UART2 25 +#define RST_UART3 26 +#define RST_I2C0 27 +#define RST_I2C1 28 +#define RST_I2C2 29 +#define RST_I2C3 30 +#define RST_I2C4 31 +#define RST_PWM0 32 +#define RST_PWM1 33 +#define RST_PWM2 34 +#define RST_PWM3 35 +#define RST_PWM4 36 +#define RST_PWM5 37 +#define RST_PWM6 38 +#define RST_PWM7 39 +#define RST_SPI0 40 +#define RST_SPI1 41 +#define RST_SPI2 42 +#define RST_SPI3 43 +#define RST_GPIO0 44 +#define RST_GPIO1 45 +#define RST_GPIO2 46 +#define RST_EFUSE 47 +#define RST_WDT 48 +#define RST_AHBRST_ROM 49 +#define RST_SPIC 50 +#define RST_TEMPSEN 51 +#define RST_SARADC 52 +#define RST_PCIERST_CDMA 53 +#define RST_PCIERST_SMMU 54 +#define RST_PCIERST_PCIE 55 +#define RST_PCIERST_FABS 56 +#define RST_PCIERST_IRQ 57 +#define RST_COMBORST_PHY0 58 +#define RST_COMBORST_PHY1 59 +#define RST_USB1 60 +#define RST_SPIRST_NAND 61 +#define RST_SE 62 +#define RST_RTCRST_SWRST_ONLY 63 +#define RST_CPUCORE0 64 +#define RST_CPUCORE1 65 +#define RST_CPUCORE2 66 +#define RST_CPUCORE3 67 +#define RST_DSIPHY 68 +#define RST_DSIPHYRST_APB 69 +#define RST_CSIPHY0 70 +#define RST_CSIPHY0RST_APB 71 +#define RST_CSIPHY1 72 +#define RST_CSIPHY1RST_APB 73 +#define RST_UART4 74 +#define RST_GPIO3 75 +#define RST_SYSTEM 76 +#define RST_TIMER 77 +#define RST_TIMER0 78 +#define RST_TIMER1 79 +#define RST_TIMER2 80 +#define RST_TIMER3 81 +#define RST_TIMER4 82 +#define RST_TIMER5 83 +#define RST_TIMER6 84 +#define RST_TIMER7 85 +#define RST_WGN0 86 +#define RST_WGN1 87 +#define RST_WGN2 88 +#define RST_KEYSCAN 89 +#define RST_SPIC1 90 +#define RST_AUDDAC 91 +#define RST_AUDDACRST_APB 92 +#define RST_AUDADC 93 +#define RST_AUDADCRST_APB 94 +#define RST_VCSYS 95 +#define RST_ETHPHY 96 +#define RST_ETHPHYRST_APB 97 +#define RST_AUDSRC 98 +#define RST_AUTO_CLEAR_CPUCORE0 99 +#define RST_AUTO_CLEAR_CPUCORE1 100 +#define RST_AUTO_CLEAR_CPUCORE2 101 +#define RST_AUTO_CLEAR_CPUCORE3 102 +#define RST_AUTO_CLEAR_MAINRST_AP 103 +#define RST_AUTO_CLEAR_SECONDRST_AP 104 + +#define CLK_RST_A53 0 +#define CLK_RST_50M_A53 1 +#define CLK_RST_AHB_ROM 2 +#define CLK_RST_AXI_SRAM 3 +#define CLK_RST_DDR_AXI 4 +#define CLK_RST_EFUSE 5 +#define CLK_RST_APB_EFUSE 6 +#define CLK_RST_AXI_EMMC 7 +#define CLK_RST_EMMC 8 +#define CLK_RST_100K_EMMC 9 +#define CLK_RST_AXI_SD 10 +#define CLK_RST_SD 11 +#define CLK_RST_100K_SD 12 +#define CLK_RST_500M_ETH0 13 +#define CLK_RST_AXI_ETH0 14 +#define CLK_RST_500M_ETH1 15 +#define CLK_RST_AXI_ETH1 16 +#define CLK_RST_AXI_GDMA 17 +#define CLK_RST_APB_GPIO 18 +#define CLK_RST_APB_GPIO_INTR 19 +#define CLK_RST_GPIO_DB 20 +#define CLK_RST_AXI_MINER 21 +#define CLK_RST_AHB_SF 22 +#define CLK_RST_SDMA_AXI 23 +#define CLK_RST_SDMA_AUD 24 +#define CLK_RST_APB_I2C 25 +#define CLK_RST_APB_WDT 26 +#define CLK_RST_APB_JPEG 27 +#define CLK_RST_JPEG_AXI 28 +#define CLK_RST_AXI_NF 29 +#define CLK_RST_APB_NF 30 +#define CLK_RST_NF 31 +#define CLK_RST_APB_PWM 32 +#define CLK_RST_RV 33 +#define CLK_RST_APB_SPI 34 +#define CLK_RST_TPU_AXI 35 +#define CLK_RST_UART_500M 36 +#define CLK_RST_APB_UART 37 +#define CLK_RST_APB_I2S 38 +#define CLK_RST_AXI_USB 39 +#define CLK_RST_APB_USB 40 +#define CLK_RST_125M_USB 41 +#define CLK_RST_33K_USB 42 +#define CLK_RST_12M_USB 43 +#define CLK_RST_APB_VIDEO 44 +#define CLK_RST_VIDEO_AXI 45 +#define CLK_RST_VPP_AXI 46 +#define CLK_RST_APB_VPP 47 +#define CLK_RST_AXI1 48 +#define CLK_RST_AXI2 49 +#define CLK_RST_AXI3 50 +#define CLK_RST_AXI4 51 +#define CLK_RST_AXI5 52 +#define CLK_RST_AXI6 53 + +#endif /* _DT_BINDINGS_RST_CV1835_H_ */ diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_bga.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_bga.dtsi new file mode 100644 index 000000000000..93039e182782 --- /dev/null +++ b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_bga.dtsi @@ -0,0 +1,56 @@ +&dac{ + mute-gpio-l = <&porta 15 GPIO_ACTIVE_LOW>; + mute-gpio-r = <&porta 30 GPIO_ACTIVE_LOW>; +}; + +&spi0 { + status = "disabled"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +&spi1 { + status = "disabled"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +&spi2 { + status = "disabled"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +&spi3 { + status = "okay"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +&i2c1 { + status = "disabled"; +}; + +/ { + /delete-node/ i2s@04110000; + /delete-node/ i2s@04120000; + /delete-node/ sound_ext1; + /delete-node/ sound_ext2; + /delete-node/ sound_PDM; +}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_emmc.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_emmc.dtsi new file mode 100644 index 000000000000..507a3a46b342 --- /dev/null +++ b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_emmc.dtsi @@ -0,0 +1,4 @@ +/ { + /delete-node/ cvi-spif@10000000; + /delete-node/ cv-spinf@4060000; +}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_qfn.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_qfn.dtsi new file mode 100644 index 000000000000..5d81e8c2cedc --- /dev/null +++ b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_qfn.dtsi @@ -0,0 +1,120 @@ +&sd { + no-1-8-v; +}; + +&mipi_rx{ + snsr-reset = <&portc 13 GPIO_ACTIVE_LOW>, <&portc 13 GPIO_ACTIVE_LOW>, <&portc 13 GPIO_ACTIVE_LOW>; +}; + +&mipi_tx { + reset-gpio = <&porta 15 GPIO_ACTIVE_LOW>; + pwm-gpio = <&porta 18 GPIO_ACTIVE_HIGH>; + power-ct-gpio = <&porta 19 GPIO_ACTIVE_HIGH>; +}; + +&dac{ + mute-gpio-r = <&porte 2 GPIO_ACTIVE_LOW>; +}; + +&spi0 { + status = "disabled"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +&spi1 { + status = "disabled"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +&spi2 { + status = "disabled"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +&spi3 { + status = "okay"; + num-cs = <1>; + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <1000000>; + reg = <0>; + }; +}; + +#ifndef CONFIG_PM +&i2c0 { + /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ + scl-pinmux = <0x03001070 0x0 0x3>; // IIC0_SCL/IIC0_SCL/XGPIOA[28] + sda-pinmux = <0x03001074 0x0 0x3>; // IIC0_SDA/IIC0_SDA/XGPIOA[29] + /* gpio port */ + scl-gpios = <&porta 28 GPIO_ACTIVE_HIGH>; + sda-gpios = <&porta 29 GPIO_ACTIVE_HIGH>; +}; + +&i2c1 { + /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ + scl-pinmux = <0x03009408 0x2 0x3>; // SPI1_MOSI/IIC1_SCL/XGPIOB[7] + sda-pinmux = <0x0300940c 0x2 0x3>; // SPI1_MISO/IIC1_SDA/XGPIOB[8] + /* gpio port */ + scl-gpios = <&portb 7 GPIO_ACTIVE_HIGH>; + sda-gpios = <&portb 8 GPIO_ACTIVE_HIGH>; +}; + +&i2c2 { + /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ + scl-pinmux = <0x030011a0 0x4 0x3>; // PAD_MIPI_TXP1/IIC2_SCL/XGPIOC[15] + sda-pinmux = <0x0300119c 0x4 0x3>; // PAD_MIPI_TXM1/IIC2_SDA/XGPIOC[14] + /* gpio port */ + scl-gpios = <&portc 15 GPIO_ACTIVE_HIGH>; + sda-gpios = <&portc 14 GPIO_ACTIVE_HIGH>; +}; + +&i2c3 { + /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ + scl-pinmux = <0x03001014 0x0 0x3>; // IIC3_SCL/IIC3_SCL/XGPIOA[5] + sda-pinmux = <0x03001018 0x0 0x3>; // IIC3_SDA/IIC3_SDA/XGPIOA[6] + /* gpio port */ + scl-gpios = <&porta 5 GPIO_ACTIVE_HIGH>; + sda-gpios = <&porta 6 GPIO_ACTIVE_HIGH>; +}; + +&i2c4 { + /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ + scl-pinmux = <0x030010f0 0x2 0x3>; // ADC3/IIC4_SCL/XGPIOB[1] + sda-pinmux = <0x030010f4 0x2 0x3>; // ADC2/IIC4_SDA/XGPIOB[2] + /* gpio port */ + scl-gpios = <&portb 1 GPIO_ACTIVE_HIGH>; + sda-gpios = <&portb 2 GPIO_ACTIVE_HIGH>; +}; +#endif + +/ { + /delete-node/ wifi-sd@4320000; + /delete-node/ i2s@04110000; + /delete-node/ i2s@04120000; + /delete-node/ sound_ext1; + /delete-node/ sound_ext2; + /delete-node/ sound_PDM; + + wifi_pin { + compatible = "cvitek,wifi-pin"; + poweron-gpio = <&porte 2 GPIO_ACTIVE_HIGH>; + wakeup-gpio = <&porte 6 GPIO_ACTIVE_HIGH>; + }; + +}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_sd.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_sd.dtsi new file mode 100644 index 000000000000..5af9620d8630 --- /dev/null +++ b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_sd.dtsi @@ -0,0 +1,4 @@ +/ { + /delete-node/ cv-emmc@4300000; + /delete-node/ cv-spinf@4060000; +}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinand.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinand.dtsi new file mode 100644 index 000000000000..2c3c6065caa3 --- /dev/null +++ b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinand.dtsi @@ -0,0 +1,5 @@ +/ { + /delete-node/ cvi-spif@10000000; + /delete-node/ cv-emmc@4300000; +}; + diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinor.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinor.dtsi new file mode 100644 index 000000000000..cd125408284a --- /dev/null +++ b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinor.dtsi @@ -0,0 +1,5 @@ +/ { + /delete-node/ cv-emmc@4300000; + /delete-node/ cv-spinf@4060000; +}; + diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_base.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_base.dtsi new file mode 100644 index 000000000000..13747090dfa6 --- /dev/null +++ b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_base.dtsi @@ -0,0 +1,932 @@ + +/ { + compatible = "cvitek,cv181x"; + + #size-cells = <0x2>; + #address-cells = <0x2>; + + top_misc:top_misc_ctrl@3000000 { + compatible = "syscon"; + reg = <0x0 0x03000000 0x0 0x8000>; + }; + + clk_rst: clk-reset-controller { + #reset-cells = <1>; + compatible = "cvitek,clk-reset"; + reg = <0x0 0x03002000 0x0 0x8>; + }; + + osc: oscillator { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "osc"; + }; + + clk: clock-controller { + compatible = "cvitek,cv181x-clk"; + reg = <0x0 0x03002000 0x0 0x1000>; + clocks = <&osc>; + #clock-cells = <1>; + }; + + rst: reset-controller { + #reset-cells = <1>; + compatible = "cvitek,reset"; + reg = <0x0 0x03003000 0x0 0x10>; + }; + + restart: restart-controller { + compatible = "cvitek,restart"; + reg = <0x0 0x05025000 0x0 0x2000>; + }; + + tpu { + compatible = "cvitek,tpu"; + reg-names = "tdma", "tiu"; + reg = <0x0 0x0C100000 0x0 0x1000>, + <0x0 0x0C101000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_TPU>, <&clk CV181X_CLK_TPU_FAB>; + clock-names = "clk_tpu_axi", "clk_tpu_fab"; + resets = <&rst RST_TDMA>, <&rst RST_TPU>, <&rst RST_TPUSYS>; + reset-names = "res_tdma", "res_tpu", "res_tpusys"; + }; + + mon { + compatible = "cvitek,mon"; + reg-names = "pcmon", "ddr_ctrl", "ddr_phyd", "ddr_aximon", "ddr_top"; + reg = <0x0 0x01040000 0x0 0x1000>, + <0x0 0x08004000 0x0 0x1000>, + <0x0 0x08006000 0x0 0x1000>, + <0x0 0x08008000 0x0 0x1000>, + <0x0 0x0800A000 0x0 0x1000>; + }; + + wiegand0 { + compatible = "cvitek,wiegand"; + reg-names = "wiegand"; + reg = <0x0 0x03030000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_WGN>, <&clk CV181X_CLK_WGN0>; + clock-names = "clk_wgn", "clk_wgn1"; + resets = <&rst RST_WGN0>; + reset-names = "res_wgn"; + }; + + wiegand1 { + compatible = "cvitek,wiegand"; + reg-names = "wiegand"; + reg = <0x0 0x03031000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_WGN>, <&clk CV181X_CLK_WGN1>; + clock-names = "clk_wgn", "clk_wgn1"; + resets = <&rst RST_WGN1>; + reset-names = "res_wgn"; + }; + + wiegand2 { + compatible = "cvitek,wiegand"; + reg-names = "wiegand"; + reg = <0x0 0x03032000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_WGN>, <&clk CV181X_CLK_WGN2>; + clock-names = "clk_wgn", "clk_wgn1"; + resets = <&rst RST_WGN2>; + reset-names = "res_wgn"; + }; + + saradc { + compatible = "cvitek,saradc"; + reg-names = "top_domain_saradc", "rtc_domain_saradc"; + reg = <0x0 0x030F0000 0x0 0x1000>, <0x0 0x0502c000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_SARADC>; + clock-names = "clk_saradc"; + resets = <&rst RST_SARADC>; + reset-names = "res_saradc"; + }; + + rtc { + compatible = "cvitek,rtc"; + reg = <0x0 0x05026000 0x0 0x1000>,<0x0 0x05025000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_RTC_25M>; + clock-names = "clk_rtc"; + }; + + cvitek-ion { + compatible = "cvitek,cvitek-ion"; + + heap_carveout@0 { + compatible = "cvitek,carveout"; + memory-region = <&ion_reserved>; + }; + }; + + sysdma_remap { + compatible = "cvitek,sysdma_remap"; + reg = <0x0 0x03000154 0x0 0x10>; + ch-remap = ; + int_mux_base = <0x03000298>; + }; + + dmac: dma@0x4330000 { + compatible = "snps,dmac-bm"; + reg = <0x0 0x04330000 0x0 0x1000>; + clock-names = "clk_sdma_axi"; + clocks = <&clk CV181X_CLK_SDMA_AXI>; + + dma-channels = /bits/ 8 <8>; + #dma-cells = <3>; + dma-requests = /bits/ 8 <16>; + chan_allocation_order = /bits/ 8 <0>; + chan_priority = /bits/ 8 <1>; + block_size = <1024>; + dma-masters = /bits/ 8 <2>; + data-width = <4 4>; /* bytes */ + axi_tr_width = <4>; /* bytes */ + block-ts = <15>; + }; + + + watchdog0: cv-wd@0x3010000 { + compatible = "snps,dw-wdt"; + reg = <0x0 0x03010000 0x0 0x1000>; + resets = <&rst RST_WDT>; + clocks = <&pclk>; + }; + + pwm0: pwm@3060000 { + compatible = "cvitek,cvi-pwm"; + reg = <0x0 0x3060000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_PWM>; + #pwm-cells = <1>; + }; + + pwm1: pwm@3061000 { + compatible = "cvitek,cvi-pwm"; + reg = <0x0 0x3061000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_PWM>; + #pwm-cells = <2>; + }; + + pwm2: pwm@3062000 { + compatible = "cvitek,cvi-pwm"; + reg = <0x0 0x3062000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_PWM>; + #pwm-cells = <3>; + }; + + pwm3: pwm@3063000 { + compatible = "cvitek,cvi-pwm"; + reg = <0x0 0x3063000 0x0 0x1000>; + clocks = <&clk CV181X_CLK_PWM>; + #pwm-cells = <4>; + }; + + pclk: pclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + }; + + spinand:cv-spinf@4060000 { + compatible = "cvitek,cv1835-spinf"; + reg = <0x0 0x4060000 0x0 0x1000>; + reg-names = "core_mem"; + bus-width = <4>; + dmas = <&dmac 4 1 1 + &dmac 5 1 1>; + dma-names = "rx","tx"; + }; + + spif:cvi-spif@10000000 { + compatible = "cvitek,cvi-spif"; + bus-num = <0>; + reg = <0x0 0x10000000 0x0 0x10000000>; + reg-names = "spif"; + sck-div = <3>; + sck_mhz = <300>; + spi-max-frequency = <75000000>; + spiflash { + compatible = "jedec,spi-nor"; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <4>; + }; + }; + + spi0:spi0@04180000 { + compatible = "snps,dw-apb-ssi"; + reg = <0x0 0x04180000 0x0 0x10000>; + clocks = <&clk CV181X_CLK_SPI>; + #address-cells = <1>; + #size-cells = <0>; + }; + + spi1:spi1@04190000 { + compatible = "snps,dw-apb-ssi"; + reg = <0x0 0x04190000 0x0 0x10000>; + clocks = <&clk CV181X_CLK_SPI>; + #address-cells = <1>; + #size-cells = <0>; + }; + + spi2:spi2@041A0000 { + compatible = "snps,dw-apb-ssi"; + reg = <0x0 0x041A0000 0x0 0x10000>; + clocks = <&clk CV181X_CLK_SPI>; + #address-cells = <1>; + #size-cells = <0>; + }; + + spi3:spi3@041B0000 { + compatible = "snps,dw-apb-ssi"; + reg = <0x0 0x041B0000 0x0 0x10000>; + clocks = <&clk CV181X_CLK_SPI>; + #address-cells = <1>; + #size-cells = <0>; +#if 0 + dmas = <&dmac 2 1 1 + &dmac 3 1 1>; + dma-names = "rx", "tx"; + capability = "txrx"; +#endif + }; + + uart0: serial@04140000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x04140000 0x0 0x1000>; + clock-frequency = <25000000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "okay"; + }; + + uart1: serial@04150000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x04150000 0x0 0x1000>; + clock-frequency = <25000000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart2: serial@04160000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x04160000 0x0 0x1000>; + clock-frequency = <25000000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart3: serial@04170000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x04170000 0x0 0x1000>; + clock-frequency = <25000000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart4: serial@041C0000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x041C0000 0x0 0x1000>; + clock-frequency = <25000000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + *** 1925 LINES SKIPPED *** From nobody Sat Jan 10 07:32:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp9Md2qbQz62c4y; Sat, 10 Jan 2026 07:32:29 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp9Mc3754z3qFH; Sat, 10 Jan 2026 07:32:28 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none Received: from skull.home.blih.net (mwc0868.ftth.cust.milkywan.net [45.13.107.196]) by mx.blih.net (OpenSMTPD) with ESMTPSA id ab1be1da (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 10 Jan 2026 07:32:20 +0000 (UTC) Date: Sat, 10 Jan 2026 08:32:17 +0100 From: Emmanuel Vadot To: Warner Losh Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Martin Filla Subject: Re: git: b55d106df978 - main - ophgo: import new .dts Message-Id: <20260110083217.756db8eed35624274459e1fb@bidouilliste.com> In-Reply-To: <6961de2f.34d1b.37ee2089@gitrepo.freebsd.org> References: <6961de2f.34d1b.37ee2089@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd16.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dp9Mc3754z3qFH Hello, On Sat, 10 Jan 2026 05:05:51 +0000 Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b55d106df9785d141f9e3e1c916e921df9d877ac > > commit b55d106df9785d141f9e3e1c916e921df9d877ac > Author: Martin Filla > AuthorDate: 2025-09-09 14:34:38 +0000 > Commit: Warner Losh > CommitDate: 2026-01-10 05:05:38 +0000 > > ophgo: import new .dts > > Signed-off-by: Martin Filla > Reviewed by: imp > Pull Request: https://github.com/freebsd/freebsd-src/pull/1844 > --- > .../include/dt-bindings/clock/cv181x-clock.h | 175 ++++ > .../include/dt-bindings/dma/cv181x-dmamap.h | 48 ++ > .../include/dt-bindings/reset/cv181x-resets.h | 172 ++++ > .../src/riscv/sophgo/cv181x_asic_bga.dtsi | 56 ++ > .../src/riscv/sophgo/cv181x_asic_emmc.dtsi | 4 + > .../src/riscv/sophgo/cv181x_asic_qfn.dtsi | 120 +++ > .../src/riscv/sophgo/cv181x_asic_sd.dtsi | 4 + > .../src/riscv/sophgo/cv181x_asic_spinand.dtsi | 5 + > .../src/riscv/sophgo/cv181x_asic_spinor.dtsi | 5 + > .../device-tree/src/riscv/sophgo/cv181x_base.dtsi | 932 +++++++++++++++++++++ > .../src/riscv/sophgo/cv181x_base_arm.dtsi | 320 +++++++ > .../src/riscv/sophgo/cv181x_base_riscv.dtsi | 378 +++++++++ > .../src/riscv/sophgo/cv181x_default_memmap.dtsi | 25 + > .../sophgo/sg2000_milkv_duos_glibc_arm64_emmc.dts | 108 +++ > .../sophgo/sg2000_milkv_duos_glibc_arm64_sd.dts | 112 +++ > .../sophgo/sg2000_milkv_duos_musl_riscv64_emmc.dts | 108 +++ > .../sophgo/sg2000_milkv_duos_musl_riscv64_sd.dts | 108 +++ > .../src/riscv/sophgo/sg2000_wevb_arm64_sd.dts | 13 + > .../src/riscv/sophgo/sg2000_wevb_riscv64_sd.dts | 10 + > sys/modules/dtb/sophgo/Makefile | 15 + > sys/riscv/conf/GENERIC | 1 + > sys/riscv/conf/std.sophgo | 8 + > sys/riscv/sophgo/files.sophgo | 2 + > 23 files changed, 2729 insertions(+) > This adds a lots of files to sys/contrib/device-tree, I though we said that this directory should be mostly pristine compared to upstream and only contain small modifications. I do not see those files in latest upstream too, but there is some sophgo related stuff in there, where do those files comes from ? -- Emmanuel Vadot From nobody Sat Jan 10 08:11:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpBDb5lXvz62fNS; Sat, 10 Jan 2026 08:11:27 +0000 (UTC) (envelope-from mmel@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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpBDb4ZWNz3ts0; Sat, 10 Jan 2026 08:11:27 +0000 (UTC) (envelope-from mmel@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768032687; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xLnwbMYf/PI4/GJxyGZnPYJ4sASE65CzLIhiiuF7Z0M=; b=b1Ns9EpO2Lr8cT1TrNIEcY6YIVCtBsVeFewWQdS1/psyjdOwGo8Q1y08M6nKGmn+M/sgmW S1o3MdIMnbKcIBjc3++hazKDbGQQqVzJX90EJw6a/jrTgHfeRPY7bJsaUXJg6u+95qCVxE PIlfbFzjO4zlWNc44rZFa0WvAfGx9A/jaS2M6bIHNKPFacqExhEhgAlYBYXrGawLMwlJFb NB5gZ/9n4CzkQJVGygVvN52DmRVxd+pfsdF9OqT/PS+sisonsa8oaJKQKWNnRQL+4xGT0t w2evH6U4iORyrFskHY6TxdQPZO6PQvEm+WeEKV/7NDsWKjiWb5uvunHbm/2rPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768032687; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xLnwbMYf/PI4/GJxyGZnPYJ4sASE65CzLIhiiuF7Z0M=; b=EBrAm/ryQ2LUAM5VU9W+T/GZqzKUKroQz13yz5fR6ccYdowQgma8ys+nOnxZYbYJun027g U2dYbxBITJrIq1F9MByx23U32V2hqK5Wl10FwqG4J0JSzV0DEPZN9poiukyvNtvzY9KiRS MNLLmNRMCDEqbAjLmBqQyMovol0sObAVaRADS6lOvnhPbXqyWYawkoC62DFpSJmroLmlFd 6GVFN55YREdQS7s4kLtOXROLb+/4TUORTYukskrHUrQfl+j6WCY+qf1Qb+FkaNppfmKzSZ Yw7M/x6yMGsBeLJFxxucqWvcUaF/P0Evvn7k2tbdfULnt9R5KRLHu5KoYjq+GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768032687; a=rsa-sha256; cv=none; b=OeqKNL5rBvqdx+pmHab6ZVv3SltIvPmpvpag2pKEGumzKshkuifms835q1hfapAcmncDSG BuWlFe9vca2BrocKc6vItNMotgLafNunWIaGdQyWzkuIoHQlRJm164yPy2+sFS7V1XyHYO gUW0acoTTNYFWTFI1BlMwtkqCscHdgG/CzJHGB/bIFazt6TA6LtloE6hD+QRAXmiq6tI1k isTt8Wa+FC6mO/Rj9QyHS2clVsfdVyx7P5JDoAwIFJoHCU3GVSVMKkOTrwHSGY1htyT6He ciHMPBbneg1JQtcdM9CaZfIEDf5alQWX0jUO1ZVKfmw8faqEeQPOUg7Zm+DAkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.168.195] (lety.radiolinkplus.cz [109.205.241.143]) (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 did not present a certificate) (Authenticated sender: mmel/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dpBDZ5ZzWzQHk; Sat, 10 Jan 2026 08:11:26 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Message-ID: Date: Sat, 10 Jan 2026 09:11:25 +0100 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: mmel@FreeBSD.org Subject: Re: git: b55d106df978 - main - ophgo: import new .dts To: Emmanuel Vadot , Warner Losh Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Martin Filla References: <6961de2f.34d1b.37ee2089@gitrepo.freebsd.org> <20260110083217.756db8eed35624274459e1fb@bidouilliste.com> Content-Language: cs, en-US From: Michal Meloun In-Reply-To: <20260110083217.756db8eed35624274459e1fb@bidouilliste.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10.01.2026 8:32, Emmanuel Vadot wrote: > > Hello, > > On Sat, 10 Jan 2026 05:05:51 +0000 > Warner Losh wrote: > >> The branch main has been updated by imp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=b55d106df9785d141f9e3e1c916e921df9d877ac >> >> commit b55d106df9785d141f9e3e1c916e921df9d877ac >> Author: Martin Filla >> AuthorDate: 2025-09-09 14:34:38 +0000 >> Commit: Warner Losh >> CommitDate: 2026-01-10 05:05:38 +0000 >> >> ophgo: import new .dts >> >> Signed-off-by: Martin Filla >> Reviewed by: imp >> Pull Request: https://github.com/freebsd/freebsd-src/pull/1844 >> --- >> .../include/dt-bindings/clock/cv181x-clock.h | 175 ++++ >> .../include/dt-bindings/dma/cv181x-dmamap.h | 48 ++ >> .../include/dt-bindings/reset/cv181x-resets.h | 172 ++++ >> .../src/riscv/sophgo/cv181x_asic_bga.dtsi | 56 ++ >> .../src/riscv/sophgo/cv181x_asic_emmc.dtsi | 4 + >> .../src/riscv/sophgo/cv181x_asic_qfn.dtsi | 120 +++ >> .../src/riscv/sophgo/cv181x_asic_sd.dtsi | 4 + >> .../src/riscv/sophgo/cv181x_asic_spinand.dtsi | 5 + >> .../src/riscv/sophgo/cv181x_asic_spinor.dtsi | 5 + >> .../device-tree/src/riscv/sophgo/cv181x_base.dtsi | 932 +++++++++++++++++++++ >> .../src/riscv/sophgo/cv181x_base_arm.dtsi | 320 +++++++ >> .../src/riscv/sophgo/cv181x_base_riscv.dtsi | 378 +++++++++ >> .../src/riscv/sophgo/cv181x_default_memmap.dtsi | 25 + >> .../sophgo/sg2000_milkv_duos_glibc_arm64_emmc.dts | 108 +++ >> .../sophgo/sg2000_milkv_duos_glibc_arm64_sd.dts | 112 +++ >> .../sophgo/sg2000_milkv_duos_musl_riscv64_emmc.dts | 108 +++ >> .../sophgo/sg2000_milkv_duos_musl_riscv64_sd.dts | 108 +++ >> .../src/riscv/sophgo/sg2000_wevb_arm64_sd.dts | 13 + >> .../src/riscv/sophgo/sg2000_wevb_riscv64_sd.dts | 10 + >> sys/modules/dtb/sophgo/Makefile | 15 + >> sys/riscv/conf/GENERIC | 1 + >> sys/riscv/conf/std.sophgo | 8 + >> sys/riscv/sophgo/files.sophgo | 2 + >> 23 files changed, 2729 insertions(+) >> > > This adds a lots of files to sys/contrib/device-tree, I though we said > that this directory should be mostly pristine compared to upstream and > only contain small modifications. > I do not see those files in latest upstream too, but there is some > sophgo related stuff in there, where do those files comes from ? > +1 Vendor DTs are very rarely accepted by mainstream in compatible manner. Importing them therefore spells nightmare for future updates. Also, adding "sys/riscv/conf/std.sophgo" and "sys/riscv/sophgo/files.sophgo" without any basic SoC driver (clock, reset, pinctrl) does not sounds right. Michal From nobody Sat Jan 10 16:22:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpP756tRRz6NJms for ; Sat, 10 Jan 2026 16:22: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpP746hXTz3gFr for ; Sat, 10 Jan 2026 16:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768062144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FUZYb7O5bLQE+cr11LTZ4cjczugSFs1hXmldCg7e0hw=; b=II03cRH0c1U5dYax87FdfLOWIgn32pzI6DL80TqehJjh2oslPUKBfFhr3LVgKQesNtRU05 zxFFGJrXpCyEvQ/3T7qtPWNV8qLchr+C+w3eLEwirEgvmNNDRVyfgxoTX+USf+MmmIeK3h zOt5W//4u66+bMjJDIeiwBgUaB4BDhZlqtCJHqWJ5fGMN5lTTMg20MaQcSG/xuKwwYrFvh sKGmYfzsDXACT5ShZh2QzltDGJuyS8QNlIu78lstOERtLlKArtlL0PItsjrbBrv+kGQPMl bw5eD2J0/f9mxxZQf6Nn6c/iitmBlvVcFgf8FknKeAYYLCcVqoSPUoRecHD7gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768062144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FUZYb7O5bLQE+cr11LTZ4cjczugSFs1hXmldCg7e0hw=; b=lrywU7c5/5kIfy/0D9KRkeVe3K29JY3m56bJNvM5VCfqQSAzwQXq4JBwsUll56QUdy6uKK uOwAgvCtaTYg1mY23IaUNK4/QclTFsOPbI9Ry/aadkbt/is+6kI5bN6QTY3fawVFpOXYmI cdnuRV8Em+4sXD9dvFe1KBTyykkn54VgSczAUmXju7Zi/Vk/1c0aqx/U+YZN4ceUA/Ejdv mR+4bIznHAxq2mSpkHj29dxdZf4DSriKr/YlxixVWP8VkPAgSqhuuQEK2/2hzKHF4mssbO GLs/+gRspIfZv5GU/bTaK/+TBWCJ0P7SE45DvyFGHiepcUyzK/f5sdsaObSXhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768062144; a=rsa-sha256; cv=none; b=TefmdwBAEUhE77WSN41A+tYLZHqehBap7vSuZ979084VgTrahTj6OpxKxs1j6992WxAoR1 6COFqJryhpo4iDpK/goUwR1YPsXrJAkoufAqO5RTLNerDiqvpQtbPorskI7E5Ezg7XK8i0 e8FOvJMaRdCzvlo4TtivGRx3uKDnygsKL6+IIPdTw8ZoqPNC2lEcIDgakvXVtbNCGis/x8 UWXU/AXVU9xE5OkcscP1ES34wTNwZdyFA2V22K2AFCalicuTcjsDeL/lNd2Vv1JlK8X1WR sSuFkL+o0neDuMqneHcY9o7LWSZcnUsKHfXO3nhpo1o9/OkSZEZ8mTA8Yrzisw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpP745rRJz12dp for ; Sat, 10 Jan 2026 16:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2617e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 16:22:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3ae56f659aad - main - Revert "ophgo: import new .dts" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ae56f659aad8621a9d26b5ad0caeeaf1092c4ad Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 16:22:24 +0000 Message-Id: <69627cc0.2617e.1a9c0725@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ae56f659aad8621a9d26b5ad0caeeaf1092c4ad commit 3ae56f659aad8621a9d26b5ad0caeeaf1092c4ad Author: Warner Losh AuthorDate: 2026-01-10 15:08:30 +0000 Commit: Warner Losh CommitDate: 2026-01-10 15:08:30 +0000 Revert "ophgo: import new .dts" This reverts commit b55d106df9785d141f9e3e1c916e921df9d877ac. Per request of original author, manu, and mmel, revert this change. While this is a genuinely cool device, there's some issues that need to be sorted out before moving forward: o Imported dt-bindings that weren't used and could interfere in the future. o no platform code for sophgo, though it likely needs it o Potential interference from the dts/dtsi files imported for future linux device-tree imports. These are the dts files from the vendor sdk, and history has down often upstream introduces enough change that keeping them here in the mean time lays the groundwork for merge conflicts in the future. That makes this import premature. Revert until it's more mature. --- .../include/dt-bindings/clock/cv181x-clock.h | 175 ---- .../include/dt-bindings/dma/cv181x-dmamap.h | 48 -- .../include/dt-bindings/reset/cv181x-resets.h | 172 ---- .../src/riscv/sophgo/cv181x_asic_bga.dtsi | 56 -- .../src/riscv/sophgo/cv181x_asic_emmc.dtsi | 4 - .../src/riscv/sophgo/cv181x_asic_qfn.dtsi | 120 --- .../src/riscv/sophgo/cv181x_asic_sd.dtsi | 4 - .../src/riscv/sophgo/cv181x_asic_spinand.dtsi | 5 - .../src/riscv/sophgo/cv181x_asic_spinor.dtsi | 5 - .../device-tree/src/riscv/sophgo/cv181x_base.dtsi | 932 --------------------- .../src/riscv/sophgo/cv181x_base_arm.dtsi | 320 ------- .../src/riscv/sophgo/cv181x_base_riscv.dtsi | 378 --------- .../src/riscv/sophgo/cv181x_default_memmap.dtsi | 25 - .../sophgo/sg2000_milkv_duos_glibc_arm64_emmc.dts | 108 --- .../sophgo/sg2000_milkv_duos_glibc_arm64_sd.dts | 112 --- .../sophgo/sg2000_milkv_duos_musl_riscv64_emmc.dts | 108 --- .../sophgo/sg2000_milkv_duos_musl_riscv64_sd.dts | 108 --- .../src/riscv/sophgo/sg2000_wevb_arm64_sd.dts | 13 - .../src/riscv/sophgo/sg2000_wevb_riscv64_sd.dts | 10 - sys/modules/dtb/sophgo/Makefile | 15 - sys/riscv/conf/GENERIC | 1 - sys/riscv/conf/std.sophgo | 8 - sys/riscv/sophgo/files.sophgo | 2 - 23 files changed, 2729 deletions(-) diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/cv181x-clock.h b/sys/contrib/device-tree/include/dt-bindings/clock/cv181x-clock.h deleted file mode 100644 index ed76e4d8ef95..000000000000 --- a/sys/contrib/device-tree/include/dt-bindings/clock/cv181x-clock.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) Cvitek Co., Ltd. 2019-2021. All rights reserved. - * - * File Name: cv181x-clock.h - * Description: - */ - -#ifndef __DT_BINDINGS_CLK_CV181X_H__ -#define __DT_BINDINGS_CLK_CV181X_H__ - -#define CV181X_CLK_MPLL 0 -#define CV181X_CLK_TPLL 1 -#define CV181X_CLK_FPLL 2 -#define CV181X_CLK_MIPIMPLL 3 -#define CV181X_CLK_A0PLL 4 -#define CV181X_CLK_DISPPLL 5 -#define CV181X_CLK_CAM0PLL 6 -#define CV181X_CLK_CAM1PLL 7 - -#define CV181X_CLK_MIPIMPLL_D3 8 -#define CV181X_CLK_CAM0PLL_D2 9 -#define CV181X_CLK_CAM0PLL_D3 10 - -#define CV181X_CLK_A53 11 -#define CV181X_CLK_CPU_AXI0 12 -#define CV181X_CLK_CPU_GIC 13 -#define CV181X_CLK_XTAL_A53 14 -#define CV181X_CLK_TPU 15 -#define CV181X_CLK_TPU_FAB 16 -#define CV181X_CLK_AHB_ROM 17 -#define CV181X_CLK_DDR_AXI_REG 18 -#define CV181X_CLK_RTC_25M 19 -#define CV181X_CLK_TEMPSEN 20 -#define CV181X_CLK_SARADC 21 -#define CV181X_CLK_EFUSE 22 -#define CV181X_CLK_APB_EFUSE 23 -#define CV181X_CLK_DEBUG 24 -#define CV181X_CLK_XTAL_MISC 25 -#define CV181X_CLK_AXI4_EMMC 26 -#define CV181X_CLK_EMMC 27 -#define CV181X_CLK_100K_EMMC 28 -#define CV181X_CLK_AXI4_SD0 29 -#define CV181X_CLK_SD0 30 -#define CV181X_CLK_100K_SD0 31 -#define CV181X_CLK_AXI4_SD1 32 -#define CV181X_CLK_SD1 33 -#define CV181X_CLK_100K_SD1 34 -#define CV181X_CLK_SPI_NAND 35 -#define CV181X_CLK_500M_ETH0 36 -#define CV181X_CLK_AXI4_ETH0 37 -#define CV181X_CLK_500M_ETH1 38 -#define CV181X_CLK_AXI4_ETH1 39 -#define CV181X_CLK_APB_GPIO 40 -#define CV181X_CLK_APB_GPIO_INTR 41 -#define CV181X_CLK_GPIO_DB 42 -#define CV181X_CLK_AHB_SF 43 -#define CV181X_CLK_SDMA_AXI 44 -#define CV181X_CLK_SDMA_AUD0 45 -#define CV181X_CLK_SDMA_AUD1 46 -#define CV181X_CLK_SDMA_AUD2 47 -#define CV181X_CLK_SDMA_AUD3 48 -#define CV181X_CLK_APB_I2C 49 -#define CV181X_CLK_APB_WDT 50 -#define CV181X_CLK_PWM 51 -#define CV181X_CLK_APB_SPI0 52 -#define CV181X_CLK_APB_SPI1 53 -#define CV181X_CLK_APB_SPI2 54 -#define CV181X_CLK_APB_SPI3 55 -#define CV181X_CLK_CAM0_200 56 -#define CV181X_CLK_UART0 57 -#define CV181X_CLK_APB_UART0 58 -#define CV181X_CLK_UART1 59 -#define CV181X_CLK_APB_UART1 60 -#define CV181X_CLK_UART2 61 -#define CV181X_CLK_APB_UART2 62 -#define CV181X_CLK_UART3 63 -#define CV181X_CLK_APB_UART3 64 -#define CV181X_CLK_UART4 65 -#define CV181X_CLK_APB_UART4 66 -#define CV181X_CLK_APB_I2S0 67 -#define CV181X_CLK_APB_I2S1 68 -#define CV181X_CLK_APB_I2S2 69 -#define CV181X_CLK_APB_I2S3 70 -#define CV181X_CLK_AXI4_USB 71 -#define CV181X_CLK_APB_USB 72 -#define CV181X_CLK_125M_USB 73 -#define CV181X_CLK_33K_USB 74 -#define CV181X_CLK_12M_USB 75 -#define CV181X_CLK_AXI4 76 -#define CV181X_CLK_AXI6 77 -#define CV181X_CLK_DSI_ESC 78 -#define CV181X_CLK_AXI_VIP 79 -#define CV181X_CLK_SRC_VIP_SYS_0 80 -#define CV181X_CLK_SRC_VIP_SYS_1 81 -#define CV181X_CLK_DISP_SRC_VIP 82 -#define CV181X_CLK_AXI_VIDEO_CODEC 83 -#define CV181X_CLK_VC_SRC0 84 -#define CV181X_CLK_H264C 85 -#define CV181X_CLK_H265C 86 -#define CV181X_CLK_JPEG 87 -#define CV181X_CLK_APB_JPEG 88 -#define CV181X_CLK_APB_H264C 89 -#define CV181X_CLK_APB_H265C 90 -#define CV181X_CLK_CAM0 91 -#define CV181X_CLK_CAM1 92 -#define CV181X_CLK_CSI_MAC0_VIP 93 -#define CV181X_CLK_CSI_MAC1_VIP 94 -#define CV181X_CLK_ISP_TOP_VIP 95 -#define CV181X_CLK_IMG_D_VIP 96 -#define CV181X_CLK_IMG_V_VIP 97 -#define CV181X_CLK_SC_TOP_VIP 98 -#define CV181X_CLK_SC_D_VIP 99 -#define CV181X_CLK_SC_V1_VIP 100 -#define CV181X_CLK_SC_V2_VIP 101 -#define CV181X_CLK_SC_V3_VIP 102 -#define CV181X_CLK_DWA_VIP 103 -#define CV181X_CLK_BT_VIP 104 -#define CV181X_CLK_DISP_VIP 105 -#define CV181X_CLK_DSI_MAC_VIP 106 -#define CV181X_CLK_LVDS0_VIP 107 -#define CV181X_CLK_LVDS1_VIP 108 -#define CV181X_CLK_CSI0_RX_VIP 109 -#define CV181X_CLK_CSI1_RX_VIP 110 -#define CV181X_CLK_PAD_VI_VIP 111 -#define CV181X_CLK_1M 112 -#define CV181X_CLK_SPI 113 -#define CV181X_CLK_I2C 114 -#define CV181X_CLK_PM 115 -#define CV181X_CLK_TIMER0 116 -#define CV181X_CLK_TIMER1 117 -#define CV181X_CLK_TIMER2 118 -#define CV181X_CLK_TIMER3 119 -#define CV181X_CLK_TIMER4 120 -#define CV181X_CLK_TIMER5 121 -#define CV181X_CLK_TIMER6 122 -#define CV181X_CLK_TIMER7 123 -#define CV181X_CLK_APB_I2C0 124 -#define CV181X_CLK_APB_I2C1 125 -#define CV181X_CLK_APB_I2C2 126 -#define CV181X_CLK_APB_I2C3 127 -#define CV181X_CLK_APB_I2C4 128 -#define CV181X_CLK_WGN 129 -#define CV181X_CLK_WGN0 130 -#define CV181X_CLK_WGN1 131 -#define CV181X_CLK_WGN2 132 -#define CV181X_CLK_KEYSCAN 133 -#define CV181X_CLK_AHB_SF1 134 -#define CV181X_CLK_VC_SRC1 135 -#define CV181X_CLK_SRC_VIP_SYS_2 136 -#define CV181X_CLK_PAD_VI1_VIP 137 -#define CV181X_CLK_CFG_REG_VIP 138 -#define CV181X_CLK_CFG_REG_VC 139 -#define CV181X_CLK_AUDSRC 140 -#define CV181X_CLK_APB_AUDSRC 141 -#define CV181X_CLK_VC_SRC2 142 -#define CV181X_CLK_PWM_SRC 143 -#define CV181X_CLK_AP_DEBUG 144 -#define CV181X_CLK_SRC_RTC_SYS_0 145 -#define CV181X_CLK_PAD_VI2_VIP 146 -#define CV181X_CLK_CSI_BE_VIP 147 -#define CV181X_CLK_VIP_IP0 148 -#define CV181X_CLK_VIP_IP1 149 -#define CV181X_CLK_VIP_IP2 150 -#define CV181X_CLK_VIP_IP3 151 -#define CV181X_CLK_C906_0 152 -#define CV181X_CLK_C906_1 153 -#define CV181X_CLK_SRC_VIP_SYS_3 154 -#define CV181X_CLK_SRC_VIP_SYS_4 155 -#define CV181X_CLK_IVE_VIP 156 -#define CV181X_CLK_RAW_VIP 157 -#define CV181X_CLK_OSDC_VIP 158 -#define CV181X_CLK_CSI_MAC2_VIP 159 -#define CV181X_CLK_CAM0_VIP 160 - -#endif /* __DT_BINDINGS_CLK_CV181X_H__ */ diff --git a/sys/contrib/device-tree/include/dt-bindings/dma/cv181x-dmamap.h b/sys/contrib/device-tree/include/dt-bindings/dma/cv181x-dmamap.h deleted file mode 100644 index 84a4c3664ee1..000000000000 --- a/sys/contrib/device-tree/include/dt-bindings/dma/cv181x-dmamap.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __DT_BINDINGS_CV181X_DMAMAP_H__ -#define __DT_BINDINGS_CV181X_DMAMAP_H__ - -#define CVI_I2S0_RX 0 -#define CVI_I2S0_TX 1 -#define CVI_I2S1_RX 2 -#define CVI_I2S1_TX 3 -#define CVI_I2S2_RX 4 -#define CVI_I2S2_TX 5 -#define CVI_I2S3_RX 6 -#define CVI_I2S3_TX 7 -#define CVI_UART0_RX 8 -#define CVI_UART0_TX 9 -#define CVI_UART1_RX 10 -#define CVI_UART1_TX 11 -#define CVI_UART2_RX 12 -#define CVI_UART2_TX 13 -#define CVI_UART3_RX 14 -#define CVI_UART3_TX 15 -#define CVI_SPI0_RX 16 -#define CVI_SPI0_TX 17 -#define CVI_SPI1_RX 18 -#define CVI_SPI1_TX 19 -#define CVI_SPI2_RX 20 -#define CVI_SPI2_TX 21 -#define CVI_SPI3_RX 22 -#define CVI_SPI3_TX 23 -#define CVI_I2C0_RX 24 -#define CVI_I2C0_TX 25 -#define CVI_I2C1_RX 26 -#define CVI_I2C1_TX 27 -#define CVI_I2C2_RX 28 -#define CVI_I2C2_TX 29 -#define CVI_I2C3_RX 30 -#define CVI_I2C3_TX 31 -#define CVI_I2C4_RX 32 -#define CVI_I2C4_TX 33 -#define CVI_TDM0_RX 34 -#define CVI_TDM0_TX 35 -#define CVI_TDM1_RX 36 -#define CVI_AUDSRC 37 -#define CVI_SPI_NAND 38 -#define CVI_SPI_NOR 39 -#define CVI_UART4_RX 40 -#define CVI_UART4_TX 41 -#define CVI_SPI_NOR1 42 - -#endif diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/cv181x-resets.h b/sys/contrib/device-tree/include/dt-bindings/reset/cv181x-resets.h deleted file mode 100644 index e10d33b35446..000000000000 --- a/sys/contrib/device-tree/include/dt-bindings/reset/cv181x-resets.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved. - * - * File Name: cvi_template.h - * Description: - */ - -#ifndef __DT_BINDINGS_RST_CV181X_H__ -#define __DT_BINDINGS_RST_CV181X_H__ - -#define RST_MAINRST_AP 0 -#define RST_SECONDRST_AP 1 -#define RST_DDR 2 -#define RST_H264C 3 -#define RST_JPEG 4 -#define RST_H265C 5 -#define RST_VIPSYS 6 -#define RST_TDMA 7 -#define RST_TPU 8 -#define RST_TPUSYS 9 -#define RST_TSM 10 -#define RST_USB 11 -#define RST_ETH0 12 -#define RST_ETH1 13 -#define RST_NAND 14 -#define RST_EMMC 15 -#define RST_SD0 16 -#define RST_SD1 17 -#define RST_SDMA 18 -#define RST_I2S0 19 -#define RST_I2S1 20 -#define RST_I2S2 21 -#define RST_I2S3 22 -#define RST_UART0 23 -#define RST_UART1 24 -#define RST_UART2 25 -#define RST_UART3 26 -#define RST_I2C0 27 -#define RST_I2C1 28 -#define RST_I2C2 29 -#define RST_I2C3 30 -#define RST_I2C4 31 -#define RST_PWM0 32 -#define RST_PWM1 33 -#define RST_PWM2 34 -#define RST_PWM3 35 -#define RST_PWM4 36 -#define RST_PWM5 37 -#define RST_PWM6 38 -#define RST_PWM7 39 -#define RST_SPI0 40 -#define RST_SPI1 41 -#define RST_SPI2 42 -#define RST_SPI3 43 -#define RST_GPIO0 44 -#define RST_GPIO1 45 -#define RST_GPIO2 46 -#define RST_EFUSE 47 -#define RST_WDT 48 -#define RST_AHBRST_ROM 49 -#define RST_SPIC 50 -#define RST_TEMPSEN 51 -#define RST_SARADC 52 -#define RST_PCIERST_CDMA 53 -#define RST_PCIERST_SMMU 54 -#define RST_PCIERST_PCIE 55 -#define RST_PCIERST_FABS 56 -#define RST_PCIERST_IRQ 57 -#define RST_COMBORST_PHY0 58 -#define RST_COMBORST_PHY1 59 -#define RST_USB1 60 -#define RST_SPIRST_NAND 61 -#define RST_SE 62 -#define RST_RTCRST_SWRST_ONLY 63 -#define RST_CPUCORE0 64 -#define RST_CPUCORE1 65 -#define RST_CPUCORE2 66 -#define RST_CPUCORE3 67 -#define RST_DSIPHY 68 -#define RST_DSIPHYRST_APB 69 -#define RST_CSIPHY0 70 -#define RST_CSIPHY0RST_APB 71 -#define RST_CSIPHY1 72 -#define RST_CSIPHY1RST_APB 73 -#define RST_UART4 74 -#define RST_GPIO3 75 -#define RST_SYSTEM 76 -#define RST_TIMER 77 -#define RST_TIMER0 78 -#define RST_TIMER1 79 -#define RST_TIMER2 80 -#define RST_TIMER3 81 -#define RST_TIMER4 82 -#define RST_TIMER5 83 -#define RST_TIMER6 84 -#define RST_TIMER7 85 -#define RST_WGN0 86 -#define RST_WGN1 87 -#define RST_WGN2 88 -#define RST_KEYSCAN 89 -#define RST_SPIC1 90 -#define RST_AUDDAC 91 -#define RST_AUDDACRST_APB 92 -#define RST_AUDADC 93 -#define RST_AUDADCRST_APB 94 -#define RST_VCSYS 95 -#define RST_ETHPHY 96 -#define RST_ETHPHYRST_APB 97 -#define RST_AUDSRC 98 -#define RST_AUTO_CLEAR_CPUCORE0 99 -#define RST_AUTO_CLEAR_CPUCORE1 100 -#define RST_AUTO_CLEAR_CPUCORE2 101 -#define RST_AUTO_CLEAR_CPUCORE3 102 -#define RST_AUTO_CLEAR_MAINRST_AP 103 -#define RST_AUTO_CLEAR_SECONDRST_AP 104 - -#define CLK_RST_A53 0 -#define CLK_RST_50M_A53 1 -#define CLK_RST_AHB_ROM 2 -#define CLK_RST_AXI_SRAM 3 -#define CLK_RST_DDR_AXI 4 -#define CLK_RST_EFUSE 5 -#define CLK_RST_APB_EFUSE 6 -#define CLK_RST_AXI_EMMC 7 -#define CLK_RST_EMMC 8 -#define CLK_RST_100K_EMMC 9 -#define CLK_RST_AXI_SD 10 -#define CLK_RST_SD 11 -#define CLK_RST_100K_SD 12 -#define CLK_RST_500M_ETH0 13 -#define CLK_RST_AXI_ETH0 14 -#define CLK_RST_500M_ETH1 15 -#define CLK_RST_AXI_ETH1 16 -#define CLK_RST_AXI_GDMA 17 -#define CLK_RST_APB_GPIO 18 -#define CLK_RST_APB_GPIO_INTR 19 -#define CLK_RST_GPIO_DB 20 -#define CLK_RST_AXI_MINER 21 -#define CLK_RST_AHB_SF 22 -#define CLK_RST_SDMA_AXI 23 -#define CLK_RST_SDMA_AUD 24 -#define CLK_RST_APB_I2C 25 -#define CLK_RST_APB_WDT 26 -#define CLK_RST_APB_JPEG 27 -#define CLK_RST_JPEG_AXI 28 -#define CLK_RST_AXI_NF 29 -#define CLK_RST_APB_NF 30 -#define CLK_RST_NF 31 -#define CLK_RST_APB_PWM 32 -#define CLK_RST_RV 33 -#define CLK_RST_APB_SPI 34 -#define CLK_RST_TPU_AXI 35 -#define CLK_RST_UART_500M 36 -#define CLK_RST_APB_UART 37 -#define CLK_RST_APB_I2S 38 -#define CLK_RST_AXI_USB 39 -#define CLK_RST_APB_USB 40 -#define CLK_RST_125M_USB 41 -#define CLK_RST_33K_USB 42 -#define CLK_RST_12M_USB 43 -#define CLK_RST_APB_VIDEO 44 -#define CLK_RST_VIDEO_AXI 45 -#define CLK_RST_VPP_AXI 46 -#define CLK_RST_APB_VPP 47 -#define CLK_RST_AXI1 48 -#define CLK_RST_AXI2 49 -#define CLK_RST_AXI3 50 -#define CLK_RST_AXI4 51 -#define CLK_RST_AXI5 52 -#define CLK_RST_AXI6 53 - -#endif /* _DT_BINDINGS_RST_CV1835_H_ */ diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_bga.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_bga.dtsi deleted file mode 100644 index 93039e182782..000000000000 --- a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_bga.dtsi +++ /dev/null @@ -1,56 +0,0 @@ -&dac{ - mute-gpio-l = <&porta 15 GPIO_ACTIVE_LOW>; - mute-gpio-r = <&porta 30 GPIO_ACTIVE_LOW>; -}; - -&spi0 { - status = "disabled"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -&spi1 { - status = "disabled"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -&spi2 { - status = "disabled"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -&spi3 { - status = "okay"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -&i2c1 { - status = "disabled"; -}; - -/ { - /delete-node/ i2s@04110000; - /delete-node/ i2s@04120000; - /delete-node/ sound_ext1; - /delete-node/ sound_ext2; - /delete-node/ sound_PDM; -}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_emmc.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_emmc.dtsi deleted file mode 100644 index 507a3a46b342..000000000000 --- a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_emmc.dtsi +++ /dev/null @@ -1,4 +0,0 @@ -/ { - /delete-node/ cvi-spif@10000000; - /delete-node/ cv-spinf@4060000; -}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_qfn.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_qfn.dtsi deleted file mode 100644 index 5d81e8c2cedc..000000000000 --- a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_qfn.dtsi +++ /dev/null @@ -1,120 +0,0 @@ -&sd { - no-1-8-v; -}; - -&mipi_rx{ - snsr-reset = <&portc 13 GPIO_ACTIVE_LOW>, <&portc 13 GPIO_ACTIVE_LOW>, <&portc 13 GPIO_ACTIVE_LOW>; -}; - -&mipi_tx { - reset-gpio = <&porta 15 GPIO_ACTIVE_LOW>; - pwm-gpio = <&porta 18 GPIO_ACTIVE_HIGH>; - power-ct-gpio = <&porta 19 GPIO_ACTIVE_HIGH>; -}; - -&dac{ - mute-gpio-r = <&porte 2 GPIO_ACTIVE_LOW>; -}; - -&spi0 { - status = "disabled"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -&spi1 { - status = "disabled"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -&spi2 { - status = "disabled"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -&spi3 { - status = "okay"; - num-cs = <1>; - spidev@0 { - compatible = "rohm,dh2228fv"; - spi-max-frequency = <1000000>; - reg = <0>; - }; -}; - -#ifndef CONFIG_PM -&i2c0 { - /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ - scl-pinmux = <0x03001070 0x0 0x3>; // IIC0_SCL/IIC0_SCL/XGPIOA[28] - sda-pinmux = <0x03001074 0x0 0x3>; // IIC0_SDA/IIC0_SDA/XGPIOA[29] - /* gpio port */ - scl-gpios = <&porta 28 GPIO_ACTIVE_HIGH>; - sda-gpios = <&porta 29 GPIO_ACTIVE_HIGH>; -}; - -&i2c1 { - /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ - scl-pinmux = <0x03009408 0x2 0x3>; // SPI1_MOSI/IIC1_SCL/XGPIOB[7] - sda-pinmux = <0x0300940c 0x2 0x3>; // SPI1_MISO/IIC1_SDA/XGPIOB[8] - /* gpio port */ - scl-gpios = <&portb 7 GPIO_ACTIVE_HIGH>; - sda-gpios = <&portb 8 GPIO_ACTIVE_HIGH>; -}; - -&i2c2 { - /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ - scl-pinmux = <0x030011a0 0x4 0x3>; // PAD_MIPI_TXP1/IIC2_SCL/XGPIOC[15] - sda-pinmux = <0x0300119c 0x4 0x3>; // PAD_MIPI_TXM1/IIC2_SDA/XGPIOC[14] - /* gpio port */ - scl-gpios = <&portc 15 GPIO_ACTIVE_HIGH>; - sda-gpios = <&portc 14 GPIO_ACTIVE_HIGH>; -}; - -&i2c3 { - /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ - scl-pinmux = <0x03001014 0x0 0x3>; // IIC3_SCL/IIC3_SCL/XGPIOA[5] - sda-pinmux = <0x03001018 0x0 0x3>; // IIC3_SDA/IIC3_SDA/XGPIOA[6] - /* gpio port */ - scl-gpios = <&porta 5 GPIO_ACTIVE_HIGH>; - sda-gpios = <&porta 6 GPIO_ACTIVE_HIGH>; -}; - -&i2c4 { - /* FMUX_GPIO_REG iic_func_sel gpio_func_sel */ - scl-pinmux = <0x030010f0 0x2 0x3>; // ADC3/IIC4_SCL/XGPIOB[1] - sda-pinmux = <0x030010f4 0x2 0x3>; // ADC2/IIC4_SDA/XGPIOB[2] - /* gpio port */ - scl-gpios = <&portb 1 GPIO_ACTIVE_HIGH>; - sda-gpios = <&portb 2 GPIO_ACTIVE_HIGH>; -}; -#endif - -/ { - /delete-node/ wifi-sd@4320000; - /delete-node/ i2s@04110000; - /delete-node/ i2s@04120000; - /delete-node/ sound_ext1; - /delete-node/ sound_ext2; - /delete-node/ sound_PDM; - - wifi_pin { - compatible = "cvitek,wifi-pin"; - poweron-gpio = <&porte 2 GPIO_ACTIVE_HIGH>; - wakeup-gpio = <&porte 6 GPIO_ACTIVE_HIGH>; - }; - -}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_sd.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_sd.dtsi deleted file mode 100644 index 5af9620d8630..000000000000 --- a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_sd.dtsi +++ /dev/null @@ -1,4 +0,0 @@ -/ { - /delete-node/ cv-emmc@4300000; - /delete-node/ cv-spinf@4060000; -}; diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinand.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinand.dtsi deleted file mode 100644 index 2c3c6065caa3..000000000000 --- a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinand.dtsi +++ /dev/null @@ -1,5 +0,0 @@ -/ { - /delete-node/ cvi-spif@10000000; - /delete-node/ cv-emmc@4300000; -}; - diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinor.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinor.dtsi deleted file mode 100644 index cd125408284a..000000000000 --- a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_asic_spinor.dtsi +++ /dev/null @@ -1,5 +0,0 @@ -/ { - /delete-node/ cv-emmc@4300000; - /delete-node/ cv-spinf@4060000; -}; - diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_base.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv181x_base.dtsi deleted file mode 100644 index 13747090dfa6..000000000000 --- a/sys/contrib/device-tree/src/riscv/sophgo/cv181x_base.dtsi +++ /dev/null @@ -1,932 +0,0 @@ - -/ { - compatible = "cvitek,cv181x"; - - #size-cells = <0x2>; - #address-cells = <0x2>; - - top_misc:top_misc_ctrl@3000000 { - compatible = "syscon"; - reg = <0x0 0x03000000 0x0 0x8000>; - }; - - clk_rst: clk-reset-controller { - #reset-cells = <1>; - compatible = "cvitek,clk-reset"; - reg = <0x0 0x03002000 0x0 0x8>; - }; - - osc: oscillator { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <25000000>; - clock-output-names = "osc"; - }; - - clk: clock-controller { - compatible = "cvitek,cv181x-clk"; - reg = <0x0 0x03002000 0x0 0x1000>; - clocks = <&osc>; - #clock-cells = <1>; - }; - - rst: reset-controller { - #reset-cells = <1>; - compatible = "cvitek,reset"; - reg = <0x0 0x03003000 0x0 0x10>; - }; - - restart: restart-controller { - compatible = "cvitek,restart"; - reg = <0x0 0x05025000 0x0 0x2000>; - }; - - tpu { - compatible = "cvitek,tpu"; - reg-names = "tdma", "tiu"; - reg = <0x0 0x0C100000 0x0 0x1000>, - <0x0 0x0C101000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_TPU>, <&clk CV181X_CLK_TPU_FAB>; - clock-names = "clk_tpu_axi", "clk_tpu_fab"; - resets = <&rst RST_TDMA>, <&rst RST_TPU>, <&rst RST_TPUSYS>; - reset-names = "res_tdma", "res_tpu", "res_tpusys"; - }; - - mon { - compatible = "cvitek,mon"; - reg-names = "pcmon", "ddr_ctrl", "ddr_phyd", "ddr_aximon", "ddr_top"; - reg = <0x0 0x01040000 0x0 0x1000>, - <0x0 0x08004000 0x0 0x1000>, - <0x0 0x08006000 0x0 0x1000>, - <0x0 0x08008000 0x0 0x1000>, - <0x0 0x0800A000 0x0 0x1000>; - }; - - wiegand0 { - compatible = "cvitek,wiegand"; - reg-names = "wiegand"; - reg = <0x0 0x03030000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_WGN>, <&clk CV181X_CLK_WGN0>; - clock-names = "clk_wgn", "clk_wgn1"; - resets = <&rst RST_WGN0>; - reset-names = "res_wgn"; - }; - - wiegand1 { - compatible = "cvitek,wiegand"; - reg-names = "wiegand"; - reg = <0x0 0x03031000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_WGN>, <&clk CV181X_CLK_WGN1>; - clock-names = "clk_wgn", "clk_wgn1"; - resets = <&rst RST_WGN1>; - reset-names = "res_wgn"; - }; - - wiegand2 { - compatible = "cvitek,wiegand"; - reg-names = "wiegand"; - reg = <0x0 0x03032000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_WGN>, <&clk CV181X_CLK_WGN2>; - clock-names = "clk_wgn", "clk_wgn1"; - resets = <&rst RST_WGN2>; - reset-names = "res_wgn"; - }; - - saradc { - compatible = "cvitek,saradc"; - reg-names = "top_domain_saradc", "rtc_domain_saradc"; - reg = <0x0 0x030F0000 0x0 0x1000>, <0x0 0x0502c000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_SARADC>; - clock-names = "clk_saradc"; - resets = <&rst RST_SARADC>; - reset-names = "res_saradc"; - }; - - rtc { - compatible = "cvitek,rtc"; - reg = <0x0 0x05026000 0x0 0x1000>,<0x0 0x05025000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_RTC_25M>; - clock-names = "clk_rtc"; - }; - - cvitek-ion { - compatible = "cvitek,cvitek-ion"; - - heap_carveout@0 { - compatible = "cvitek,carveout"; - memory-region = <&ion_reserved>; - }; - }; - - sysdma_remap { - compatible = "cvitek,sysdma_remap"; - reg = <0x0 0x03000154 0x0 0x10>; - ch-remap = ; - int_mux_base = <0x03000298>; - }; - - dmac: dma@0x4330000 { - compatible = "snps,dmac-bm"; - reg = <0x0 0x04330000 0x0 0x1000>; - clock-names = "clk_sdma_axi"; - clocks = <&clk CV181X_CLK_SDMA_AXI>; - - dma-channels = /bits/ 8 <8>; - #dma-cells = <3>; - dma-requests = /bits/ 8 <16>; - chan_allocation_order = /bits/ 8 <0>; - chan_priority = /bits/ 8 <1>; - block_size = <1024>; - dma-masters = /bits/ 8 <2>; - data-width = <4 4>; /* bytes */ - axi_tr_width = <4>; /* bytes */ - block-ts = <15>; - }; - - - watchdog0: cv-wd@0x3010000 { - compatible = "snps,dw-wdt"; - reg = <0x0 0x03010000 0x0 0x1000>; - resets = <&rst RST_WDT>; - clocks = <&pclk>; - }; - - pwm0: pwm@3060000 { - compatible = "cvitek,cvi-pwm"; - reg = <0x0 0x3060000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_PWM>; - #pwm-cells = <1>; - }; - - pwm1: pwm@3061000 { - compatible = "cvitek,cvi-pwm"; - reg = <0x0 0x3061000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_PWM>; - #pwm-cells = <2>; - }; - - pwm2: pwm@3062000 { - compatible = "cvitek,cvi-pwm"; - reg = <0x0 0x3062000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_PWM>; - #pwm-cells = <3>; - }; - - pwm3: pwm@3063000 { - compatible = "cvitek,cvi-pwm"; - reg = <0x0 0x3063000 0x0 0x1000>; - clocks = <&clk CV181X_CLK_PWM>; - #pwm-cells = <4>; - }; - - pclk: pclk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <25000000>; - }; - - spinand:cv-spinf@4060000 { - compatible = "cvitek,cv1835-spinf"; - reg = <0x0 0x4060000 0x0 0x1000>; - reg-names = "core_mem"; - bus-width = <4>; - dmas = <&dmac 4 1 1 - &dmac 5 1 1>; - dma-names = "rx","tx"; - }; - - spif:cvi-spif@10000000 { - compatible = "cvitek,cvi-spif"; - bus-num = <0>; - reg = <0x0 0x10000000 0x0 0x10000000>; - reg-names = "spif"; - sck-div = <3>; - sck_mhz = <300>; - spi-max-frequency = <75000000>; - spiflash { - compatible = "jedec,spi-nor"; - spi-rx-bus-width = <4>; - spi-tx-bus-width = <4>; - }; - }; - - spi0:spi0@04180000 { - compatible = "snps,dw-apb-ssi"; - reg = <0x0 0x04180000 0x0 0x10000>; - clocks = <&clk CV181X_CLK_SPI>; - #address-cells = <1>; - #size-cells = <0>; - }; - - spi1:spi1@04190000 { - compatible = "snps,dw-apb-ssi"; - reg = <0x0 0x04190000 0x0 0x10000>; - clocks = <&clk CV181X_CLK_SPI>; - #address-cells = <1>; - #size-cells = <0>; - }; - - spi2:spi2@041A0000 { - compatible = "snps,dw-apb-ssi"; - reg = <0x0 0x041A0000 0x0 0x10000>; - clocks = <&clk CV181X_CLK_SPI>; - #address-cells = <1>; - #size-cells = <0>; - }; - - spi3:spi3@041B0000 { - compatible = "snps,dw-apb-ssi"; - reg = <0x0 0x041B0000 0x0 0x10000>; - clocks = <&clk CV181X_CLK_SPI>; - #address-cells = <1>; - #size-cells = <0>; -#if 0 - dmas = <&dmac 2 1 1 - &dmac 3 1 1>; - dma-names = "rx", "tx"; - capability = "txrx"; -#endif - }; - - uart0: serial@04140000 { - compatible = "snps,dw-apb-uart"; - reg = <0x0 0x04140000 0x0 0x1000>; - clock-frequency = <25000000>; - reg-shift = <2>; - reg-io-width = <4>; - status = "okay"; - }; - - uart1: serial@04150000 { - compatible = "snps,dw-apb-uart"; - reg = <0x0 0x04150000 0x0 0x1000>; - clock-frequency = <25000000>; - reg-shift = <2>; - reg-io-width = <4>; - status = "disabled"; - }; - - uart2: serial@04160000 { - compatible = "snps,dw-apb-uart"; - reg = <0x0 0x04160000 0x0 0x1000>; - clock-frequency = <25000000>; - reg-shift = <2>; - reg-io-width = <4>; - status = "disabled"; - }; - - uart3: serial@04170000 { - compatible = "snps,dw-apb-uart"; - reg = <0x0 0x04170000 0x0 0x1000>; - clock-frequency = <25000000>; - reg-shift = <2>; - reg-io-width = <4>; *** 1937 LINES SKIPPED *** From nobody Sat Jan 10 16:41:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpPYX6FYqz6NKyq; Sat, 10 Jan 2026 16:41:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpPYX5dpDz3kJm; Sat, 10 Jan 2026 16:41:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768063312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9CasRA/cIm9SUf2RYiw+wMP3uYmGeqPBYRYWx7aD0TY=; b=s03bRYZgD5FCeXdkTdGNvlFwA4lQS6tzq6E3GZeMYQ6HCd33Wy6zBnIAV7cBuq9i6T92DC zcxEI+kQJpLAm/Fuhs8NpAfuC+78IJCjktE0gRDbRkiXf9uzkrz8bQPyuctV46GmuWDjqs K+M2o4Z510kFNGg4F1Egiufnyf0xWKpxHxzR6cdbASBCymZxfZg+mAvMugWFQadwQpIUSA Vacwh6drXmgiJNc/1RpUg9NEUqEzyECEiXrEpnm2FEIODN6xXIWugieA4fOoGby15Z9/mn EQTU6Moj1qtQcEPQHO5hQXfSBQyXoNRLJ7Oc4H6fYWmdRvi8HFA6GzF8aYDmTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768063312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9CasRA/cIm9SUf2RYiw+wMP3uYmGeqPBYRYWx7aD0TY=; b=AVEXZucVhS8/sVW8xbg9jR3qqMvrTV5m4lEzk+Q3Xid29U0FZFJFdVw3gOQeERDrMkgDS7 v+BOd2ukpdCqxGySCXwob5R+fdqVduEy48Dl3XiLuENdZ2yAUX3pZay0E7iYjVQv0hv2MO F0ovqGHMLaY0KoRoieYciXNVHZ1vdFJiHnXDFXJthIDH+1iaXVLElfE0i3+V6aB8P7AKKe L9hxME3yWGrhOri/KgyF5NWPb+tlVlfG8Ig7p9GdbJAGJIpCMvfPwFEVWrY93Ff1SXICnm jLNTlsQSxNi6JbPsvsyCA37800y7Bm9auYSeKomUSxl/2QdXV9YxDu7tN+gXxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768063312; a=rsa-sha256; cv=none; b=rne1jJgA2DclF7eBInHJuJRj9C+1vR24PUIx9Visvzro4y7xFFtUMDiARV0DQYlTlgncvM AL/y62NawCwlK+C3LLrX1fdflvaasL2goZvO1vzLR0+zL9Uw9TBGgK0HxUjWu8LB419bol 6Dw9Rdl+AON44u7NjLQ3BY2KqY5Klt0nzhrBr5R+ntJl2ycMKhOFCDBEw1j67vd26DR483 FCryUCeq0cMqopvK5lveabW3mMBMnZQAicnlvJKJlK2FWfaxBDCwqOnMiL6wO81lajT+XR XB0jXTimOwAr8OEqZGD8CDdxqsRtziFlJzg7tV4U1oFG7KKNK6g/ZNbhXJYd7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:f45e:7c71:9286:2814] (unknown [IPv6:2601:5c0:4202:5670:f45e:7c71:9286:2814]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dpPYX3GYVzr6D; Sat, 10 Jan 2026 16:41:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Sat, 10 Jan 2026 11:41:50 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 67599eef01f5 - main - sys/x86/NOTES: Add vt_efifb Content-Language: en-US To: Konstantin Belousov , Olivier Certner Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/9/26 21:28, Konstantin Belousov wrote: > On Fri, Jan 09, 2026 at 04:35:22PM +0000, Olivier Certner wrote: >> The branch main has been updated by olce: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=67599eef01f5417715f673ec81fc1467917c7a10 >> >> commit 67599eef01f5417715f673ec81fc1467917c7a10 >> Author: Olivier Certner >> AuthorDate: 2026-01-09 16:23:59 +0000 >> Commit: Olivier Certner >> CommitDate: 2026-01-09 16:34:56 +0000 >> >> sys/x86/NOTES: Add vt_efifb >> >> Contrary to what is stated in commit f224591746bd ("Add ASMC_DEBUG make >> option"), the various NOTES files should list all available options. > No, the f224591746bd commit is correct. GENERIC + LINT should cover all > options and reverse of them, as much as possible. In other words, LINT > should be complementary to GENERIC, for most options. > > At least this is how bde@ described the intent of LINT, and I think this is > a right thing to follow. Hmmm, I've always understood it that options that change behavior (like, say HZ) should have non-default values in LINT to test the setting of non-default options, but that LINT itself should include "all the things" in terms of coverage, so 'device' statements and 'options' that add in new code like filesystems should always be in LINT. -- John Baldwin From nobody Sat Jan 10 17:19:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpQPL4Ccdz6NN86; Sat, 10 Jan 2026 17:19:50 +0000 (UTC) (envelope-from olce@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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpQPL31pMz3qSV; Sat, 10 Jan 2026 17:19:50 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768065590; 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=LUzMN3bPkwqlv9jsK57SeS0NPBtkyfGoAAmKvOUCvyA=; b=vrpmMU2l08NXgcvakBtAYgHva+cExoibaRC8+pnQcVnCtaM2zLZH1HC/f3lidbRLV+ycEv KnV03Is9hKttRFrU5w7GUjacaPpOsTm9hY7ObiEDPLeoKb5rhhiHWIRsTcl31lnFwvjM7X YyhcDVAW1LU7rVbtvPuT3sR+vQVDkIeK9aesjCbzgFGjndlhbftst21S+1eZiBhBHWsSbJ YRK8uWXJDrOMwgkVKMMDJSyGnLzMcWhZ9SxBm1gEBPqyM2wUAGGkqi0C6R+gkrtCd5Q4Mp qBVfoUIAGmdD9k2iwLtw7ssV/+HIKFxavJJZ+gQw63t9RrGDH0/O+tM2rAMOeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768065590; 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=LUzMN3bPkwqlv9jsK57SeS0NPBtkyfGoAAmKvOUCvyA=; b=kSlpjtH06BGxRmbOGJqE/dLNHX7ELye6HhvcPL39S2W/xabf0Q1wGs1kdl/WPxJ6/vgJP0 ehcxt5DKqxHA8iPoPPhfRDx1BUfPxXtrkmfi5xeGQTM8nUdtPTY69Og+ft27sLkW7eQ82f xczdKUVXBIxf4n40SJp0Ue+31uAy6cGcY/PBw5MSuwttGFhcobm0KJVPJLW88JrxmP5Tmk JMEA1FY0GB6ztaXAdkdYanmjrQqL9GHFrVyLSbfhIv4FiOeSR7wyW07lJ/m4b7ERpqjf2B rTLHsBeDzQghNw9ntJduqJTJq2imNMB0KVl8aVZV/xj/HkDzH7dJCPrQn5I9cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768065590; a=rsa-sha256; cv=none; b=AkuqTN5BSZNY8yp82TRERQYPlOljozae5VN7AxkpKbQZqzOSlrcAlWKZ2qwJe5oM8pCruO 830XlFS6a998aOZY1M5UGFzMv1nBkrfATkuYRilA5IpMjPobid2CRZB942YWlvz4uGu4v9 1bKQkrbfiFR+NZ0tsWjEY3naohtW0ngt7Uu8Zw30CLhngeh3uhqcIv+xjYXQbZyvypHzB9 6OzDdPZqcyB37kARB7vK+YRpvGA0ebiO8bBk8mr6j+gov9Wq8YKpQslmzZ6289rJrcuHYo UmuWjJE+oWx4621kx5wgkEoy1nGz3TOw+fSQQfY+hE4jMH6GPo2a8N94NQXWbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dpQPK5kn1zsv8; Sat, 10 Jan 2026 17:19:49 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 67599eef01f5 - main - sys/x86/NOTES: Add vt_efifb Date: Sat, 10 Jan 2026 18:19:42 +0100 Message-ID: <13231764.xkLNZX5ndW@ravel> In-Reply-To: References: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3090898.fspEBoepoX"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart3090898.fspEBoepoX Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Olivier Certner To: Konstantin Belousov Subject: Re: git: 67599eef01f5 - main - sys/x86/NOTES: Add vt_efifb Date: Sat, 10 Jan 2026 18:19:42 +0100 Message-ID: <13231764.xkLNZX5ndW@ravel> In-Reply-To: MIME-Version: 1.0 > GENERIC + LINT should cover all options and reverse of them, as much as possible. In other words, LINT > should be complementary to GENERIC, for most options. Exercising options incompatible with those of GENERIC, yes. But just removing compatible options that are in GENERIC does not make much sense, and from various examples does not match existing practice. >From my perspective, the rules of thumb for NOTES/LINT is to document all options and increase compilation coverage as much as possible. -- Olivier Certner --nextPart3090898.fspEBoepoX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmliii4ACgkQjKEwQJce JiffGg/9FV/8I3RRhTDeFZgvvLK/NKttY1uNm6Un42fKymNJslEEJ7eAXtgKgb2x gg0jAnbZoDP1HsjTZsY3pDZ4llgPeFxHd5bsOtNrxCQ/O3KrLMVCdS2YlZaCVDnR 20hllNrh9bNsNxXtGbqZalDYo3nOjuq/Wb8z6PFU2yeMluc95yZ33TJihFczrBXb doTchiJnM+C9zVMTJp4w0laNQLEX4/WX4tF+SXpzfIPgTWvPM4dqlYNFDevRtM5p DuYwuCz4uJwmqgZsrdd+cEAinOAEJc+M7BuU6TBipNyRN/uW3YXI3DnHtr0QBmy1 zzpTtY1JMhl4ExHIgOS3Y4aCh39lq1ucpI9AbwsLFk9SdwxH0sS7srveApP9/BWR k7c6OM8QEBRYj31fPNhmWPCaKFWzvgYNHq237GEWdeQfHX/bpdk2ndwSrEi0iExK V4JO58D3ZSUxtW5q8bG7CoJiG8OmuGB/8babScKflmsl02KhKCYg2Upii1NfQBIG szy0XGnPey87F86obJFA5gg2y2Xa6cAnzADd3rVstKgNwfR5nbHMRUZbUPMjfd3N psdyWzsk7MZmGYHQr6pi4DOhxSOlTgltW2ZaMTMZuiCkBzs6vxoyJeSsEM/7PzK1 2obloqISScRSvDcmC1HXIW0WuUaCwPcPtTssnEiGrjfO5pP4Z5c= =eGXK -----END PGP SIGNATURE----- --nextPart3090898.fspEBoepoX-- From nobody Sat Jan 10 18:56:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpSYL6cqNz6NThG for ; Sat, 10 Jan 2026 18:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpSYL5GfDz45YZ for ; Sat, 10 Jan 2026 18:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768071414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuIY6f5TrI50UFzsATsfjpdrBxWK3nxogrKlnG7vI9Q=; b=RCqgI+EdZwBRi86ZXHv+rzcHBBhWj2j/NbuSwaiUu2DERomYmlPUOZku3+N62ZleKL9et+ RugPw815ZSxeFFBCsqvswz7YIfbYYaXpgH9qDa0yQqsTBKy4Sh73DsDUWRMJM703a02b2N h/u0P9kE76KN0LKSBcjSwFtF/sjuklGkatu3fTd9IQIRoDlvFmvMkUdRxJXJHdfV4tVMUJ BRivAQHeNWXdpT9+JLi7JXqRnvBwl0IScGQ2QctHm8qBzheQLVOkWJZDMhCVqmd9/vYN9C x6EE3qaHcYQgoriLrieUQKZZSzBGtofSgn7CoAE5KjshajUHWb1h9cyjEUN6DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768071414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuIY6f5TrI50UFzsATsfjpdrBxWK3nxogrKlnG7vI9Q=; b=Fp/LFCIUBBxcGLflE2yKn2OnEDFjrbYB5XdEcwmDT3gRPm7HNxqsRmLIyLyyou/TljHJtA 3SDc9HrQv/gQI2WmuTdVI95KDYYx6BVOKYzMJb5AzVXVZ7zPPzsZGaEaQY2FUaHnB7j/y7 P6rHuOVLjDzBEtWYMZ1o1iJv0ylKjX0blT1yt0h0+dy1UUwdAQ8wOeMIxRxbAydOu4VYy+ gXtO7PUhAih6m93HJBPl7tbyPp5xO6HGbaymteztoygWQXR607CdqIn/jsAZDCQVRKjL5X 5j8VDg+iErjSG9Q9TOp5vBMN8d6Ql66s9M/jAfhlat8md6SAo8n914/ko8fkPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768071414; a=rsa-sha256; cv=none; b=Sj8CHh1XP29ICpcL7VrO5GafNTcVfXjMQh1sFKPG9UJmkVjYQtJ2IcSD4X5jDj7BfoltTL pVMohwjTV36OsWJvk5L+RndM+LmVeRTrXeERQQbqIXGYVohYYyBcaSfyoe6CQqBi95pXHP rJfo1MFde/AFS4PbSvj5HlxLx7ARIrLiCivU0KPH9JjzHA0QaGg2SCj9caW8oNCgkNuYaV mx+Wu9yITuFjcNbvhWeR+/aeG799L3j7NHrYQbY9d8YYDc56RFQzn93kG8jZYoV/x2eMQv OkkvUBuYa4GEQZlaoYE/qJYS8D22aEDoUwayJWyinzFzk1ehWAzY2noJTYiJ5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpSYL4V0nz16j9 for ; Sat, 10 Jan 2026 18:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bce3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 18:56:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 509a185dd940 - main - net80211: fix bpf tap leak on wlan(4) detach List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 509a185dd9405141df4d304d7805019b40e736cf Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 18:56:54 +0000 Message-Id: <6962a0f6.3bce3.73599a23@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=509a185dd9405141df4d304d7805019b40e736cf commit 509a185dd9405141df4d304d7805019b40e736cf Author: Gleb Smirnoff AuthorDate: 2026-01-10 18:56:19 +0000 Commit: Gleb Smirnoff CommitDate: 2026-01-10 18:56:19 +0000 net80211: fix bpf tap leak on wlan(4) detach PR: 292337 Fixes: 8774a990ee4094f16d596d4b78e0f3239e5d0c88 --- sys/net80211/ieee80211_radiotap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/net80211/ieee80211_radiotap.c b/sys/net80211/ieee80211_radiotap.c index 4d36be6df9f5..aa1812045953 100644 --- a/sys/net80211/ieee80211_radiotap.c +++ b/sys/net80211/ieee80211_radiotap.c @@ -110,12 +110,6 @@ ieee80211_radiotap_detach(struct ieee80211com *ic) { } -void -ieee80211_radiotap_vdetach(struct ieee80211vap *vap) -{ - /* NB: bpfdetach is called by ether_ifdetach and claims all taps */ -} - static void set_channel(void *p, const struct ieee80211_channel *c) { @@ -472,3 +466,12 @@ ieee80211_radiotap_vattach(struct ieee80211vap *vap) if_ref(vap->iv_ifp); } } + +void +ieee80211_radiotap_vdetach(struct ieee80211vap *vap) +{ + if (vap->iv_rawbpf != NULL) { + bpf_detach(vap->iv_rawbpf); + if_rele(vap->iv_ifp); + } +} From nobody Sat Jan 10 20:54:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpW8v1mxXz6MtkX for ; Sat, 10 Jan 2026 20:54:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpW8t6cFkz3JbZ for ; Sat, 10 Jan 2026 20:54:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2a0bb2f093aso37665725ad.3 for ; Sat, 10 Jan 2026 12:54:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1768078452; x=1768683252; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=B57O3aqxwdPUXi6D6FN72Ln6KDjc3KOlNGO039TTMF8=; b=BzDIpHe6Y+nMMCXVpCuQglSfD25WzEUiLXEl2pEZXPK7jeWsuHrG7V3YdHe9f+kfV1 FgAeQVfxMOXyKhuzFnxcRMtMhdkPA+PNWNm2PSqM2X40Swzeo/54uzLgNNsHxO6qluTs LVU6dIGsQtCVeCBH3Nl4AoOf6hho7Gqs7D9FcU6rqAUqnHtxwOPXich0P1EpCZj9wdvb WObIQC0J0SlTxvq5E30USrHAaGuoNZ3grvl3WVgFGbWWt5eJaI1Kl+smeH8KryCofAEd 8emHtd5uwiT7KXhdLJPiILHG82euAJ+wd1GwotquC2q7Kv3uiMtwQP6lzuaVJxqjEYgT hJ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768078452; x=1768683252; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=B57O3aqxwdPUXi6D6FN72Ln6KDjc3KOlNGO039TTMF8=; b=DGuSlCkL9sRM6ODZY3RkiKzbP7s2iXuSfHDTS2ksV9du5jQ1MVKBSO/etUnfS0FUdC 30gpOW/PQMHHHzGxGF2hfO8JwuOUMaKaeV2hMbI1PqVkVCxAtUs8nvQcw9UPt5YAIUNI dGgtVC39QmSf/38xtkbXdSYO5/dn6uqUzav2QKLEviCvkhJrl2DOg7wc2PPcFMePqO7/ luq6DgRQX1rlGBPCHl3nJkw4f651lAcVkqWy21MIWEdc59xajtiz0ThAQrzk/Xjj5CIv z/DQGjbdHcI0ljZd32wEwGjceA1z6e6+2ZCt5LXlTZiiLiaFVSDtiRt3hnTNm1JJbK8a PyKA== X-Forwarded-Encrypted: i=1; AJvYcCVupDHZwBwUSGiBNWiNO38TMNfwPQZ48bQen3BoOWOBbALrvSWfTGtiF0TdDIbBYfLJ+OybTYqOwFBIXQ34Z3/DBC+DSw==@freebsd.org X-Gm-Message-State: AOJu0Yzktp/gktTLUDcKbjFqtySAqedUsSG35N0o+/+WE+KKb+fUkGgl ZlIAjS72BnSNbgHpfoJB1bxP/1qcIEpabVoxG8fS0ZoiTbRlGCYrxjyvwu/7MUeSDTQ9TXKLhDO kGnBxxXiJl9AF12cVKYTY79PozKymd22D4wDmg7qbsQ== X-Gm-Gg: AY/fxX5kV4HlqHYla0X9pOhuWSfWSfue2V6ynwZK+bnT2JQGThO+rKCSvxXCBgX8S2+ s7lUJL6pzw4c9lzsJ5+1ohqz9TYnUeyRorQG7Fi/rnvIGJcOmf4RLVYUUWZO9g/UBe2Lgz+C+op rNy9LCnahDDxIXSGn8RNzMBBCp92tf07b8eUClAs6stfu5Pa9wbCs7WVS79fs8PjLR14mTVP9EN UdGad2dAJ09CUVfAupNDRZcSF5ldcnTn3exPeEG2MEvkWslDufxIFZcyU/nwFZxmpuw+ow= X-Google-Smtp-Source: AGHT+IGJz4jd8OXwNoZzdMaoWAYQicMw0/1zf5DGQrAbpZHJPJoqUej16dTSe+fzUsGfkYjrAAPYsuqPxYnuzgsRaog= X-Received: by 2002:a17:903:17cb:b0:295:24ab:fb06 with SMTP id d9443c01a7336-2a3ee45be5dmr119225335ad.22.1768078451772; Sat, 10 Jan 2026 12:54:11 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <69612e4a.3279b.9f58eba@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sat, 10 Jan 2026 13:54:00 -0700 X-Gm-Features: AZwV_QipGnbShwgRW8G5vcmd2qxpZeRIGI7hT_JruGSY_C3__HrtSaH-b2PFlUw Message-ID: Subject: Re: git: 67599eef01f5 - main - sys/x86/NOTES: Add vt_efifb To: John Baldwin Cc: Konstantin Belousov , Olivier Certner , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000000d9bdd06480ed8d2" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dpW8t6cFkz3JbZ --0000000000000d9bdd06480ed8d2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jan 10, 2026 at 9:42=E2=80=AFAM John Baldwin wrot= e: > On 1/9/26 21:28, Konstantin Belousov wrote: > > On Fri, Jan 09, 2026 at 04:35:22PM +0000, Olivier Certner wrote: > >> The branch main has been updated by olce: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3D67599eef01f5417715f673ec81fc146= 7917c7a10 > >> > >> commit 67599eef01f5417715f673ec81fc1467917c7a10 > >> Author: Olivier Certner > >> AuthorDate: 2026-01-09 16:23:59 +0000 > >> Commit: Olivier Certner > >> CommitDate: 2026-01-09 16:34:56 +0000 > >> > >> sys/x86/NOTES: Add vt_efifb > >> > >> Contrary to what is stated in commit f224591746bd ("Add ASMC_DEBU= G > make > >> option"), the various NOTES files should list all available > options. > > No, the f224591746bd commit is correct. GENERIC + LINT should cover al= l > > options and reverse of them, as much as possible. In other words, LINT > > should be complementary to GENERIC, for most options. > > > > At least this is how bde@ described the intent of LINT, and I think > this is > > a right thing to follow. > > Hmmm, I've always understood it that options that change behavior (like, > say > HZ) should have non-default values in LINT to test the setting of > non-default > options, but that LINT itself should include "all the things" in terms of > coverage, so 'device' statements and 'options' that add in new code like > filesystems should always be in LINT. > That's what I always try to do as well... In addition to documenting what often is an under documented part of the tree. Warner --0000000000000d9bdd06480ed8d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Jan 10,= 2026 at 9:42=E2=80=AFAM John Baldwin <jhb@freebsd.org> wrote:
On 1/9/26 21:28, Konstantin Belousov wrote:
> On Fri, Jan 09, 2026 at 04:35:22PM +0000, Olivier Certner wrote:
>> The branch main has been updated by olce:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3D67599eef01f5417715f673ec81fc1467917c7= a10
>>
>> commit 67599eef01f5417715f673ec81fc1467917c7a10
>> Author:=C2=A0 =C2=A0 =C2=A0Olivier Certner <olce@FreeBSD.org>= ;
>> AuthorDate: 2026-01-09 16:23:59 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Olivier Certner <olce@FreeBSD.org>= ;
>> CommitDate: 2026-01-09 16:34:56 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0 sys/x86/NOTES: Add vt_efifb
>>=C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 Contrary to what is stated in commit f22459174= 6bd ("Add ASMC_DEBUG make
>>=C2=A0 =C2=A0 =C2=A0 option"), the various NOTES files should = list all available options.
> No, the f224591746bd commit is correct.=C2=A0 GENERIC + LINT should co= ver all
> options and reverse of them, as much as possible.=C2=A0 In other words= , LINT
> should be complementary to GENERIC, for most options.
>
> At least this is how bde@ described the intent of LINT, and I think th= is is
> a right thing to follow.

Hmmm, I've always understood it that options that change behavior (like= , say
HZ) should have non-default values in LINT to test the setting of non-defau= lt
options, but that LINT itself should include "all the things" in = terms of
coverage, so 'device' statements and 'options' that add in = new code like
filesystems should always be in LINT.

T= hat's what I always try to do as well...=C2=A0 In addition to documenti= ng what often
is an under documented part of the tree.
=
Warner
--0000000000000d9bdd06480ed8d2-- From nobody Sat Jan 10 21:02:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpWL85b65z6Mtyd for ; Sat, 10 Jan 2026 21:02:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpWL80ggCz3L61 for ; Sat, 10 Jan 2026 21:02:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2a0d67f1877so41986145ad.2 for ; Sat, 10 Jan 2026 13:02:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1768078938; x=1768683738; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1cDxvpxJLynLejLMvPaRVj1FnTCzaEl1IcTzyC5HsU0=; b=lM7gPfYw7dFb6Ix/PWjTmCPvfkB+3f0go9BH6E70YyatjASXicVhJk2PdvLyywI2n9 zC3rABrVJWuyRtfcM8lIOre5ENPu4SKcsDt4De2LkQMu96OEY9cYkh+eWHo5J0XnHDSV +HBKA7HWcx0tEH717WHzor31gjOtW1NygBg2rn+7HdJi1JexMRS+tFu4ocqBKmbX4ZHK ton+rPFrMfUuu9EE1DCTAsBVikMOuv10i89sIZvA6TzkWecwOnHLJZHtbB0jZWpSf4xN vfW6dBvQbLpsCbJ1Wcka7NLgQt+fXo/v662330kJWPKlYBSfwbLcoyUbFMpdvWnpYtHu Yyjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768078938; x=1768683738; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1cDxvpxJLynLejLMvPaRVj1FnTCzaEl1IcTzyC5HsU0=; b=r9D7PEms8lxfZGhkbp5CkDlmdtNDmM6CS8OcBBjXY44JuV+/pLijrEtDxAXGK6Pt4N og4uALXunsz/qUGS1gN9bI/ZA76UzJWFHdGjnS61hi0EfbgrGCcaBTVfzxDPHGxaKgkm rfTVg1wgTgMryeHRRzUSIkbsqskxKGr7EwXbNYgS/Rlf3By2hXz6XO6GFypvowpN9Qya sxyoiLAJD3pAfqxszpOhXuhU38KWrKgdJ81hAX44W2os6FjyNWc3Dd+z9d9+gtTh6JYs uWdxB9b5zW94dXnGvg+Hn24obstLtP6doDaqpWQCgbs3p3sG2awHzmPCmqMkLjcpzyN1 /6jQ== X-Forwarded-Encrypted: i=1; AJvYcCVMDwxwjq/ahM2H5mQO8IfMRqrfrgMb4jK3RR7r8SfgF13n/ARUxxtCPFjMsSNxHNQPEm+mu79GhJyEA0+T0zkYZwh7IQ==@freebsd.org X-Gm-Message-State: AOJu0Yzm1jYkSO6y+QAvrg1ecHrR3RTJKH46LReqRCTMwbxeR2zWnceF jE1ts11CSalA9hAfR1hl9s8HPEuCHPBbbi+IsrtEyVRiyY2UpdZ2AF5ORb8M+9QVk+dSTOB93Pz OsgDO75vsclG1ZU3yBMLSu6rJ4dzLIoTG7AfrRbH3MA== X-Gm-Gg: AY/fxX5Qvsszo8K2aopZTTzi+A/Xys88x326TOgD8T66uQI3h9cisG1FpN/Kg6cQ8Qh 1bRlyvAEQxnLbiwRoGSQ1IeIsHHgHGAwTfpzjwbVeyrSccEE6jB3yHbJ4yJmgWAq8DVau5p6iUx uzVlmoxXrrp8HHzoMR+OU+LfgG/vi2ZfD6mWq3mjXWA2uQrvYbGFVONQWduS6WX1duYGSVKbmY/ keY/LwEBBwlzYb0Gcokloza16YF68GAVYrIKrBFwi1I1oQ/XEwMb+gE0P4P8gEp8aODlig= X-Google-Smtp-Source: AGHT+IFEP7Kf55cgiKgmpNhBSUqZM4m1m0wweQv+DfnwMNkoq0NNQ+B0Jnmo1OXZcblixxc4r7LUSKrkfSSLac8otBQ= X-Received: by 2002:a17:90b:2883:b0:343:6611:f21 with SMTP id 98e67ed59e1d1-34f68b4cdc9mr11812313a91.1.1768078937716; Sat, 10 Jan 2026 13:02:17 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <6961de2f.34d1b.37ee2089@gitrepo.freebsd.org> <20260110083217.756db8eed35624274459e1fb@bidouilliste.com> In-Reply-To: From: Warner Losh Date: Sat, 10 Jan 2026 14:02:06 -0700 X-Gm-Features: AZwV_QhW8nzLVveXdi3mcg7AtjbzusxQogbJIjXzrntjeNc97nBdz7VAF2hmF04 Message-ID: Subject: Re: git: b55d106df978 - main - ophgo: import new .dts To: mmel@freebsd.org Cc: Emmanuel Vadot , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Martin Filla Content-Type: multipart/alternative; boundary="0000000000000485fa06480ef5a4" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dpWL80ggCz3L61 --0000000000000485fa06480ef5a4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jan 10, 2026 at 1:11=E2=80=AFAM Michal Meloun wr= ote: > > > On 10.01.2026 8:32, Emmanuel Vadot wrote: > > > > Hello, > > > > On Sat, 10 Jan 2026 05:05:51 +0000 > > Warner Losh wrote: > > > >> The branch main has been updated by imp: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3Db55d106df9785d141f9e3e1c916e921= df9d877ac > >> > >> commit b55d106df9785d141f9e3e1c916e921df9d877ac > >> Author: Martin Filla > >> AuthorDate: 2025-09-09 14:34:38 +0000 > >> Commit: Warner Losh > >> CommitDate: 2026-01-10 05:05:38 +0000 > >> > >> ophgo: import new .dts > >> > >> Signed-off-by: Martin Filla > >> Reviewed by: imp > >> Pull Request: https://github.com/freebsd/freebsd-src/pull/1844 > >> --- > >> .../include/dt-bindings/clock/cv181x-clock.h | 175 ++++ > >> .../include/dt-bindings/dma/cv181x-dmamap.h | 48 ++ > >> .../include/dt-bindings/reset/cv181x-resets.h | 172 ++++ > >> .../src/riscv/sophgo/cv181x_asic_bga.dtsi | 56 ++ > >> .../src/riscv/sophgo/cv181x_asic_emmc.dtsi | 4 + > >> .../src/riscv/sophgo/cv181x_asic_qfn.dtsi | 120 +++ > >> .../src/riscv/sophgo/cv181x_asic_sd.dtsi | 4 + > >> .../src/riscv/sophgo/cv181x_asic_spinand.dtsi | 5 + > >> .../src/riscv/sophgo/cv181x_asic_spinor.dtsi | 5 + > >> .../device-tree/src/riscv/sophgo/cv181x_base.dtsi | 932 > +++++++++++++++++++++ > >> .../src/riscv/sophgo/cv181x_base_arm.dtsi | 320 +++++++ > >> .../src/riscv/sophgo/cv181x_base_riscv.dtsi | 378 +++++++++ > >> .../src/riscv/sophgo/cv181x_default_memmap.dtsi | 25 + > >> .../sophgo/sg2000_milkv_duos_glibc_arm64_emmc.dts | 108 +++ > >> .../sophgo/sg2000_milkv_duos_glibc_arm64_sd.dts | 112 +++ > >> .../sophgo/sg2000_milkv_duos_musl_riscv64_emmc.dts | 108 +++ > >> .../sophgo/sg2000_milkv_duos_musl_riscv64_sd.dts | 108 +++ > >> .../src/riscv/sophgo/sg2000_wevb_arm64_sd.dts | 13 + > >> .../src/riscv/sophgo/sg2000_wevb_riscv64_sd.dts | 10 + > >> sys/modules/dtb/sophgo/Makefile | 15 + > >> sys/riscv/conf/GENERIC | 1 + > >> sys/riscv/conf/std.sophgo | 8 + > >> sys/riscv/sophgo/files.sophgo | 2 + > >> 23 files changed, 2729 insertions(+) > >> > > > > This adds a lots of files to sys/contrib/device-tree, I though we sai= d > > that this directory should be mostly pristine compared to upstream and > > only contain small modifications. > > I do not see those files in latest upstream too, but there is some > > sophgo related stuff in there, where do those files comes from ? > > > > +1 > Vendor DTs are very rarely accepted by mainstream in compatible manner. > Importing them therefore spells nightmare for future updates. > > Also, adding "sys/riscv/conf/std.sophgo" and > "sys/riscv/sophgo/files.sophgo" without any basic SoC driver (clock, > reset, pinctrl) does not sounds right. > OK. I've reverted this. You guys are right. The files came from the vendor SDK, which is a reputable source. I'd forgotten what a pain it is when conflicts happen, though. I let my excitement for this cool hardware get the better of me. I've talked to the original author, and they agree and will try again when it hits the Linux tree and when they've added the necessary glue to our tree. Warner --0000000000000485fa06480ef5a4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Jan 10,= 2026 at 1:11=E2=80=AFAM Michal Meloun <mmel@freebsd.org> wrote:


On 10.01.2026 8:32, Emmanuel Vadot wrote:
>
>=C2=A0 =C2=A0Hello,
>
> On Sat, 10 Jan 2026 05:05:51 +0000
> Warner Losh <imp@FreeBSD.org> wrote:
>
>> The branch main has been updated by imp:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3Db55d106df9785d141f9e3e1c916e921df9d87= 7ac
>>
>> commit b55d106df9785d141f9e3e1c916e921df9d877ac
>> Author:=C2=A0 =C2=A0 =C2=A0Martin Filla <freebsd@sysctl.cz>
>> AuthorDate: 2025-09-09 14:34:38 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> CommitDate: 2026-01-10 05:05:38 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0 ophgo: import new .dts
>>=C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 Signed-off-by: Martin Filla <freebsd@sysctl.cz>
>>=C2=A0 =C2=A0 =C2=A0 Reviewed by: imp
>>=C2=A0 =C2=A0 =C2=A0 Pull Request: https://g= ithub.com/freebsd/freebsd-src/pull/1844
>> ---
>>=C2=A0 =C2=A0.../include/dt-bindings/clock/cv181x-clock.h=C2=A0 =C2= =A0 =C2=A0 =C2=A0| 175 ++++
>>=C2=A0 =C2=A0.../include/dt-bindings/dma/cv181x-dmamap.h=C2=A0 =C2= =A0 =C2=A0 =C2=A0 |=C2=A0 48 ++
>>=C2=A0 =C2=A0.../include/dt-bindings/reset/cv181x-resets.h=C2=A0 = =C2=A0 =C2=A0 | 172 ++++
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_asic_bga.dtsi=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 |=C2=A0 56 ++
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_asic_emmc.dtsi=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A04 +
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_asic_qfn.dtsi=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 | 120 +++
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_asic_sd.dtsi=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A04 +
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_asic_spinand.dtsi=C2=A0 = =C2=A0 =C2=A0 |=C2=A0 =C2=A05 +
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_asic_spinor.dtsi=C2=A0 =C2= =A0 =C2=A0 =C2=A0|=C2=A0 =C2=A05 +
>>=C2=A0 =C2=A0.../device-tree/src/riscv/sophgo/cv181x_base.dtsi=C2= =A0 | 932 +++++++++++++++++++++
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_base_arm.dtsi=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 | 320 +++++++
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_base_riscv.dtsi=C2=A0 =C2= =A0 =C2=A0 =C2=A0 | 378 +++++++++
>>=C2=A0 =C2=A0.../src/riscv/sophgo/cv181x_default_memmap.dtsi=C2=A0 = =C2=A0 |=C2=A0 25 +
>>=C2=A0 =C2=A0.../sophgo/sg2000_milkv_duos_glibc_arm64_emmc.dts=C2= =A0 | 108 +++
>>=C2=A0 =C2=A0.../sophgo/sg2000_milkv_duos_glibc_arm64_sd.dts=C2=A0 = =C2=A0 | 112 +++
>>=C2=A0 =C2=A0.../sophgo/sg2000_milkv_duos_musl_riscv64_emmc.dts | 1= 08 +++
>>=C2=A0 =C2=A0.../sophgo/sg2000_milkv_duos_musl_riscv64_sd.dts=C2=A0= =C2=A0| 108 +++
>>=C2=A0 =C2=A0.../src/riscv/sophgo/sg2000_wevb_arm64_sd.dts=C2=A0 = =C2=A0 =C2=A0 |=C2=A0 13 +
>>=C2=A0 =C2=A0.../src/riscv/sophgo/sg2000_wevb_riscv64_sd.dts=C2=A0 = =C2=A0 |=C2=A0 10 +
>>=C2=A0 =C2=A0sys/modules/dtb/sophgo/Makefile=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 15 +
>>=C2=A0 =C2=A0sys/riscv/conf/GENERIC=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|= =C2=A0 =C2=A01 +
>>=C2=A0 =C2=A0sys/riscv/conf/std.sophgo=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2= =A08 +
>>=C2=A0 =C2=A0sys/riscv/sophgo/files.sophgo=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A02 +
>>=C2=A0 =C2=A023 files changed, 2729 insertions(+)
>>
>
>=C2=A0 =C2=A0This adds a lots of files to sys/contrib/device-tree, I th= ough we said
> that this directory should be mostly pristine compared to upstream and=
> only contain small modifications.
>=C2=A0 =C2=A0I do not see those files in latest upstream too, but there= is some
> sophgo related stuff in there, where do those files comes from ?
>

+1
Vendor DTs are very rarely accepted by mainstream in compatible manner. Importing them therefore spells nightmare for future updates.

Also, adding "sys/riscv/conf/std.sophgo" and
"sys/riscv/sophgo/files.sophgo" without any basic SoC driver (clo= ck,
reset, pinctrl) does not sounds right.

= OK. I've reverted this. You guys are right.

Th= e files came from the vendor SDK, which is a reputable=C2=A0source. I'd= forgotten
what a pain it is when conflicts happen, though.
=

I let my excitement for this cool hardware get the bett= er of me. I've talked to
the original author, and they agree = and will try again when it hits the Linux tree
and when they'= ve added the necessary glue to our tree.

Warner
--0000000000000485fa06480ef5a4-- From nobody Sat Jan 10 23:38:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpZp71gfHz6N5JQ for ; Sat, 10 Jan 2026 23:38: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpZp711mHz3fq1 for ; Sat, 10 Jan 2026 23:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768088303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpUAoQuGCfWeNCUvQ1bm0D7Fb0l/X0YEYaTYZRZwYSQ=; b=usO5iPajvl/u+LpHJk+Syixv3uweIXVy1FgLaqJxqv5l/0FEQZcIGrnvPYqvZSUmjIXjEI bhjxfLlmcDbqj5bwnCOxvpKXwwAvWh7aRAnLrdDMoI1T66T6f/mvuOdckok8Mp9KvwNzhJ odLkrX21VTor7pdhAzyI8Jj17obsxVuDvBJlslNiOU/8WtTv/tqenVavTOXPMYTICnCmPk XhcYbD6uUSrg2z0kD7d6B3B5eWTwKC2hJtQ5N6KBBeDaWaYdm72bhiUlNGTL3ESro6J4y1 D7Ct1lbtBxgOL6Sai9y8yp3DkqpbE71nhp0hw+XHSRJDHFC+sTv9StkGW1Xpbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768088303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpUAoQuGCfWeNCUvQ1bm0D7Fb0l/X0YEYaTYZRZwYSQ=; b=NeBV72g6jq5UHcINNPR/lxhuZXfq4SySD84RpchpJfm9eqocRcXdnZBWeZaFpe98w/PXJ7 CzNpsb0M3TMOSqF1JqymKaiJjR7l+vkt2OqsygsbCPapBRsevAfOuQowjQMb9bpOmzFNRC bsajNYK+QGYIerr5QyUtPgupmSbn2PQ1AURMhhCwg3lmYrg+107VkUeOH3n1C4msoy3ecO tUAV2n54ZbskfzGqPOnP4IRvbuIBgOqQoOxpRoB3aSVnWrEqaMWBhnDuUn6Dki6A/rE+Ra WUDUMP6pIKm8o5rzz0tReo3xENoyb99oIqrdzM97IzacaxEC64VSR6828v2O5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768088303; a=rsa-sha256; cv=none; b=N/E5W8jLHtYdmoWuefisCH18ktryej7dgTna74M47JY6Zz291r85FCIin74GEMuQ8HGxwW QLxd70Rhovrx+VytVk7rfZygBIW8HYUBLD5rr7AJOqo0ycex/J2D9Ofco7bDRKNLkqBFQt iLy8zV0pDOgj/wkGPHKeWIkOsue46rlMVrodeM+1XGBEd8AmHnnjTAq+4osxzzUjXZJ0Fj yAl5ee7uxLOzI9zqDXVASDE4btvtIkRGdqsGhCAK9tU3UAiBIxr0Bv4Biv1jsDKVP2ahsl pK4xjV5v0wyDN2VUBR+hLJbVmuVOw9CcVVa9Uc9imIzUPRuIklLya96vXNwy1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpZp707NGz1Sy for ; Sat, 10 Jan 2026 23:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39b42 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 23:38:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 73a238643a2e - main - smartpqi: Make pqisrc_is_supported_write static List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73a238643a2e9ef298d961966040587ca0970a58 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 23:38:23 +0000 Message-Id: <6962e2ef.39b42.123ee5ce@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=73a238643a2e9ef298d961966040587ca0970a58 commit 73a238643a2e9ef298d961966040587ca0970a58 Author: Navdeep Parhar AuthorDate: 2026-01-10 20:15:17 +0000 Commit: Navdeep Parhar CommitDate: 2026-01-10 20:22:36 +0000 smartpqi: Make pqisrc_is_supported_write static This fixes a build error with -O0 and matches all the other pqisrc_is_* routines in the file. --- kernel.full --- ld: error: undefined symbol: pqisrc_is_supported_write >>> referenced by smartpqi_request.c:1799 (/.../smartpqi_request.c:1799) >>> smartpqi_request.o:(pqisrc_build_scsi_cmd_raidbypass) --- sys/dev/smartpqi/smartpqi_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/smartpqi/smartpqi_request.c b/sys/dev/smartpqi/smartpqi_request.c index d993897cd1f9..3929a727c270 100644 --- a/sys/dev/smartpqi/smartpqi_request.c +++ b/sys/dev/smartpqi/smartpqi_request.c @@ -1180,7 +1180,7 @@ fill_lba_for_scsi_rw(pqisrc_softstate_t *softs, uint8_t *cdb, aio_req_locator_t /* determine whether writes to certain types of RAID are supported. */ -inline boolean_t +static inline boolean_t pqisrc_is_supported_write(pqisrc_softstate_t const *softs, pqi_scsi_dev_t const *device) { From nobody Sat Jan 10 23:38:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpZp83cKXz6N5kh for ; Sat, 10 Jan 2026 23:38: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpZp82Qjhz3fhJ for ; Sat, 10 Jan 2026 23:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768088304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DSFGO63UihVOyDhbm2Q8pWr5PnqXhVg9BrbokT8BHMw=; b=UPwMHCklxEp/u3WIHfxIA4V4rQYMXeCIjKO1WgkaFDI66VnYfdqnW2z1AMqLlwXHYn3GEq YYRwB7Ykq/xImrzK4sVKrRD/jlVmdfpxrVtfSB702pDVzXyLLV5ebxNIRhn2u23KGfDixj lM+cEVgwZz46mQkHsh4Re1a7Ayp7bdFMvD9cyBa1lLOVkJFe/xq6Fb3XbW5dVguN0uKxwI aQFY4bmBQx+DVxSGC1D7kL8M4A1QvbDKQNTHG7kjmXqXwBCSjuRAcam6SZ0HfuC7F442VT A5d0idp3kAM7P23DdyrCMddKm4VElhrJfFOSaTLwElao4FmSqECI07LyJ4MJ0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768088304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DSFGO63UihVOyDhbm2Q8pWr5PnqXhVg9BrbokT8BHMw=; b=uNvi+R1rPIamJhVX0GE567L6+sg0xrWpoYciogxrcBY09g3JhQfKnv1ZBx3mzWbws5mYKy vFs1DuFFp1xULDsAeXIMquAB3TQAJPIiqRYg2MTvphBIH1ozqs28TIn7IhKT/xwsDlJTAH RUsf8hm+nALSBCro9kD29rqnebRp5BevXV3ZfQ0XpvMVN1DAW60BHrZ8ZPYrZUxbLbAIRw J3yKgD1FbJwPKCLt2lKwoBiJ1ypK1py0Vinn3hb+cwvzEyZpYUU3DN1jv04FB2p/kbWgC9 lvuYzxsc9k+pd37Hg1+rmvxrhjIPpPXEHI/m4NtX9YYYzOt6VuvxU2KIs8odSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768088304; a=rsa-sha256; cv=none; b=M5iWQOZdGPCE0Y0XVLl9dil0pr/HaTV3YZkC25UhMYZRLz35jJEKiXFadMrX/KGfuFJnxI opkHdAM2jWKvVZE4X6e4wfkzuf09N5aaAjERYGhvYEpIpfwi78Km+Kxq/2q2pqTt2xxGM3 AVEd42r32sHKrINCmN02rr9eSLBLEh38Fp5GWrAgBbmMbxurYkhwp4yYmbRoG90OxWOrPk ZGlmQ7CUpTO7Z60ogTa74UxtoEwESHhRuojyO6wiYOl0JnfxNxJhDji3vyTWG9jSPgiAwC JAs2nZ5O8JClegGL4h+RzdPIYunjxpBTwRyUwsjUEl2+yGsc/ZYpeAILfb9CtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpZp81k8Sz1T1 for ; Sat, 10 Jan 2026 23:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39809 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 23:38:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: dda55f83f9b8 - main - cxgbe(4): Update shared code and config files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dda55f83f9b8238ebf2940c9c1e227785db540b2 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 23:38:24 +0000 Message-Id: <6962e2f0.39809.282207d1@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=dda55f83f9b8238ebf2940c9c1e227785db540b2 commit dda55f83f9b8238ebf2940c9c1e227785db540b2 Author: Navdeep Parhar AuthorDate: 2025-11-20 21:27:48 +0000 Commit: Navdeep Parhar CommitDate: 2026-01-10 22:44:31 +0000 cxgbe(4): Update shared code and config files Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/t4_hw.c | 13 +- sys/dev/cxgbe/common/t4_regs.h | 1056 ++++++++++++++++++++++------- sys/dev/cxgbe/firmware/t7fw_cfg.txt | 34 +- sys/dev/cxgbe/firmware/t7fw_cfg_uwire.txt | 26 +- usr.sbin/cxgbetool/reg_defs_t7.c | 722 ++++++++++++++------ 5 files changed, 1397 insertions(+), 454 deletions(-) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 65292486cbc8..494f83a47135 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -3282,7 +3282,9 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x477d4, 0x477fc, 0x48000, 0x48004, 0x48018, 0x4801c, - 0x49304, 0x493f0, + 0x49304, 0x49320, + 0x4932c, 0x4932c, + 0x49334, 0x493f0, 0x49400, 0x49410, 0x49460, 0x494f4, 0x50000, 0x50084, @@ -3305,7 +3307,9 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) 0x515f0, 0x515f4, 0x58000, 0x58004, 0x58018, 0x5801c, - 0x59304, 0x593f0, + 0x59304, 0x59320, + 0x5932c, 0x5932c, + 0x59334, 0x593f0, 0x59400, 0x59410, 0x59460, 0x594f4, }; @@ -6177,11 +6181,6 @@ static bool mem_intr_handler(struct adapter *adap, int idx, int flags) ii.cause_reg = MC_T7_REG(A_MC_P_DDRCTL_INT_CAUSE, i); ii.enable_reg = MC_T7_REG(A_MC_P_DDRCTL_INT_ENABLE, i); fatal |= t4_handle_intr(adap, &ii, 0, flags); - - snprintf(rname, sizeof(rname), "MC%u_ECC_UE_INT_CAUSE", i); - ii.cause_reg = MC_T7_REG(A_MC_P_ECC_UE_INT_CAUSE, i); - ii.enable_reg = MC_T7_REG(A_MC_P_ECC_UE_INT_ENABLE, i); - fatal |= t4_handle_intr(adap, &ii, 0, flags); } break; } diff --git a/sys/dev/cxgbe/common/t4_regs.h b/sys/dev/cxgbe/common/t4_regs.h index 51f150443261..09d0d4aa2c08 100644 --- a/sys/dev/cxgbe/common/t4_regs.h +++ b/sys/dev/cxgbe/common/t4_regs.h @@ -27,11 +27,11 @@ */ /* This file is automatically generated --- changes will be lost */ -/* Generation Date : Tue Oct 28 05:23:45 PM IST 2025 */ +/* Generation Date : Thu Dec 11 08:42:50 PM IST 2025 */ /* Directory name: t4_reg.txt, Date: Not specified */ -/* Directory name: t5_reg.txt, Changeset: 6945:54ba4ba7ee8b */ +/* Directory name: t5_reg.txt, Changeset: 6946:9d3868c42009 */ /* Directory name: t6_reg.txt, Changeset: 4277:9c165d0f4899 */ -/* Directory name: t7_sw_reg.txt, Changeset: 5946:0b60ff298e7d */ +/* Directory name: t7_sw_reg.txt, Changeset: 5950:7c934148528c */ #define MYPF_BASE 0x1b000 #define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr)) @@ -6195,15 +6195,15 @@ #define A_PCIE_PF_INT_CFG 0x3140 -#define S_T7_VECNUM 12 -#define M_T7_VECNUM 0x7ffU -#define V_T7_VECNUM(x) ((x) << S_T7_VECNUM) -#define G_T7_VECNUM(x) (((x) >> S_T7_VECNUM) & M_T7_VECNUM) +#define S_T7_PF_INT_VECNUM 12 +#define M_T7_PF_INT_VECNUM 0x7ffU +#define V_T7_PF_INT_VECNUM(x) ((x) << S_T7_PF_INT_VECNUM) +#define G_T7_PF_INT_VECNUM(x) (((x) >> S_T7_PF_INT_VECNUM) & M_T7_PF_INT_VECNUM) -#define S_T7_VECBASE 0 -#define M_T7_VECBASE 0xfffU -#define V_T7_VECBASE(x) ((x) << S_T7_VECBASE) -#define G_T7_VECBASE(x) (((x) >> S_T7_VECBASE) & M_T7_VECBASE) +#define S_T7_PF_INT_VECBASE 0 +#define M_T7_PF_INT_VECBASE 0xfffU +#define V_T7_PF_INT_VECBASE(x) ((x) << S_T7_PF_INT_VECBASE) +#define G_T7_PF_INT_VECBASE(x) (((x) >> S_T7_PF_INT_VECBASE) & M_T7_PF_INT_VECBASE) #define A_PCIE_PF_INT_CFG2 0x3144 #define A_PCIE_VF_INT_CFG 0x3180 @@ -10636,6 +10636,12 @@ #define G_VFID_PCIE(x) (((x) >> S_VFID_PCIE) & M_VFID_PCIE) #define A_PCIE_VF_INT_INDIR_DATA 0x5c48 + +#define S_T7_VECBASE 0 +#define M_T7_VECBASE 0xfffU +#define V_T7_VECBASE(x) ((x) << S_T7_VECBASE) +#define G_T7_VECBASE(x) (((x) >> S_T7_VECBASE) & M_T7_VECBASE) + #define A_PCIE_VF_256_INT_CFG2 0x5c4c #define A_PCIE_VF_MSI_EN_4 0x5e50 #define A_PCIE_VF_MSI_EN_5 0x5e54 @@ -17723,6 +17729,22 @@ #define V_GPIO20_PE_EN(x) ((x) << S_GPIO20_PE_EN) #define F_GPIO20_PE_EN V_GPIO20_PE_EN(1U) +#define S_T7_GPIO19_PE_EN 19 +#define V_T7_GPIO19_PE_EN(x) ((x) << S_T7_GPIO19_PE_EN) +#define F_T7_GPIO19_PE_EN V_T7_GPIO19_PE_EN(1U) + +#define S_T7_GPIO18_PE_EN 18 +#define V_T7_GPIO18_PE_EN(x) ((x) << S_T7_GPIO18_PE_EN) +#define F_T7_GPIO18_PE_EN V_T7_GPIO18_PE_EN(1U) + +#define S_T7_GPIO17_PE_EN 17 +#define V_T7_GPIO17_PE_EN(x) ((x) << S_T7_GPIO17_PE_EN) +#define F_T7_GPIO17_PE_EN V_T7_GPIO17_PE_EN(1U) + +#define S_T7_GPIO16_PE_EN 16 +#define V_T7_GPIO16_PE_EN(x) ((x) << S_T7_GPIO16_PE_EN) +#define F_T7_GPIO16_PE_EN V_T7_GPIO16_PE_EN(1U) + #define A_DBG_PVT_REG_THRESHOLD 0x611c #define S_PVT_CALIBRATION_DONE 8 @@ -17859,6 +17881,22 @@ #define V_GPIO20_PS_EN(x) ((x) << S_GPIO20_PS_EN) #define F_GPIO20_PS_EN V_GPIO20_PS_EN(1U) +#define S_T7_GPIO19_PS_EN 19 +#define V_T7_GPIO19_PS_EN(x) ((x) << S_T7_GPIO19_PS_EN) +#define F_T7_GPIO19_PS_EN V_T7_GPIO19_PS_EN(1U) + +#define S_T7_GPIO18_PS_EN 18 +#define V_T7_GPIO18_PS_EN(x) ((x) << S_T7_GPIO18_PS_EN) +#define F_T7_GPIO18_PS_EN V_T7_GPIO18_PS_EN(1U) + +#define S_T7_GPIO17_PS_EN 17 +#define V_T7_GPIO17_PS_EN(x) ((x) << S_T7_GPIO17_PS_EN) +#define F_T7_GPIO17_PS_EN V_T7_GPIO17_PS_EN(1U) + +#define S_T7_GPIO16_PS_EN 16 +#define V_T7_GPIO16_PS_EN(x) ((x) << S_T7_GPIO16_PS_EN) +#define F_T7_GPIO16_PS_EN V_T7_GPIO16_PS_EN(1U) + #define A_DBG_PVT_REG_IN_TERMP 0x6120 #define S_REG_IN_TERMP_B 4 @@ -21825,10 +21863,6 @@ #define V_FUTURE_DEXPANSION_WTS(x) ((x) << S_FUTURE_DEXPANSION_WTS) #define G_FUTURE_DEXPANSION_WTS(x) (((x) >> S_FUTURE_DEXPANSION_WTS) & M_FUTURE_DEXPANSION_WTS) -#define S_T7_FUTURE_CEXPANSION_WTS 31 -#define V_T7_FUTURE_CEXPANSION_WTS(x) ((x) << S_T7_FUTURE_CEXPANSION_WTS) -#define F_T7_FUTURE_CEXPANSION_WTS V_T7_FUTURE_CEXPANSION_WTS(1U) - #define S_CL14_WR_CMD_TO_ERROR 30 #define V_CL14_WR_CMD_TO_ERROR(x) ((x) << S_CL14_WR_CMD_TO_ERROR) #define F_CL14_WR_CMD_TO_ERROR V_CL14_WR_CMD_TO_ERROR(1U) @@ -21837,10 +21871,6 @@ #define V_CL13_WR_CMD_TO_ERROR(x) ((x) << S_CL13_WR_CMD_TO_ERROR) #define F_CL13_WR_CMD_TO_ERROR V_CL13_WR_CMD_TO_ERROR(1U) -#define S_T7_FUTURE_DEXPANSION_WTS 15 -#define V_T7_FUTURE_DEXPANSION_WTS(x) ((x) << S_T7_FUTURE_DEXPANSION_WTS) -#define F_T7_FUTURE_DEXPANSION_WTS V_T7_FUTURE_DEXPANSION_WTS(1U) - #define S_CL14_WR_DATA_TO_ERROR 14 #define V_CL14_WR_DATA_TO_ERROR(x) ((x) << S_CL14_WR_DATA_TO_ERROR) #define F_CL14_WR_DATA_TO_ERROR V_CL14_WR_DATA_TO_ERROR(1U) @@ -21965,10 +21995,6 @@ #define V_FUTURE_DEXPANSION_RTE(x) ((x) << S_FUTURE_DEXPANSION_RTE) #define G_FUTURE_DEXPANSION_RTE(x) (((x) >> S_FUTURE_DEXPANSION_RTE) & M_FUTURE_DEXPANSION_RTE) -#define S_T7_FUTURE_CEXPANSION_RTE 31 -#define V_T7_FUTURE_CEXPANSION_RTE(x) ((x) << S_T7_FUTURE_CEXPANSION_RTE) -#define F_T7_FUTURE_CEXPANSION_RTE V_T7_FUTURE_CEXPANSION_RTE(1U) - #define S_CL14_RD_CMD_TO_EN 30 #define V_CL14_RD_CMD_TO_EN(x) ((x) << S_CL14_RD_CMD_TO_EN) #define F_CL14_RD_CMD_TO_EN V_CL14_RD_CMD_TO_EN(1U) @@ -21977,10 +22003,6 @@ #define V_CL13_RD_CMD_TO_EN(x) ((x) << S_CL13_RD_CMD_TO_EN) #define F_CL13_RD_CMD_TO_EN V_CL13_RD_CMD_TO_EN(1U) -#define S_T7_FUTURE_DEXPANSION_RTE 15 -#define V_T7_FUTURE_DEXPANSION_RTE(x) ((x) << S_T7_FUTURE_DEXPANSION_RTE) -#define F_T7_FUTURE_DEXPANSION_RTE V_T7_FUTURE_DEXPANSION_RTE(1U) - #define S_CL14_RD_DATA_TO_EN 14 #define V_CL14_RD_DATA_TO_EN(x) ((x) << S_CL14_RD_DATA_TO_EN) #define F_CL14_RD_DATA_TO_EN V_CL14_RD_DATA_TO_EN(1U) @@ -22105,10 +22127,6 @@ #define V_FUTURE_DEXPANSION_RTS(x) ((x) << S_FUTURE_DEXPANSION_RTS) #define G_FUTURE_DEXPANSION_RTS(x) (((x) >> S_FUTURE_DEXPANSION_RTS) & M_FUTURE_DEXPANSION_RTS) -#define S_T7_FUTURE_CEXPANSION_RTS 31 -#define V_T7_FUTURE_CEXPANSION_RTS(x) ((x) << S_T7_FUTURE_CEXPANSION_RTS) -#define F_T7_FUTURE_CEXPANSION_RTS V_T7_FUTURE_CEXPANSION_RTS(1U) - #define S_CL14_RD_CMD_TO_ERROR 30 #define V_CL14_RD_CMD_TO_ERROR(x) ((x) << S_CL14_RD_CMD_TO_ERROR) #define F_CL14_RD_CMD_TO_ERROR V_CL14_RD_CMD_TO_ERROR(1U) @@ -22117,10 +22135,9 @@ #define V_CL13_RD_CMD_TO_ERROR(x) ((x) << S_CL13_RD_CMD_TO_ERROR) #define F_CL13_RD_CMD_TO_ERROR V_CL13_RD_CMD_TO_ERROR(1U) -#define S_T7_FUTURE_DEXPANSION_RTS 14 -#define M_T7_FUTURE_DEXPANSION_RTS 0x3U -#define V_T7_FUTURE_DEXPANSION_RTS(x) ((x) << S_T7_FUTURE_DEXPANSION_RTS) -#define G_T7_FUTURE_DEXPANSION_RTS(x) (((x) >> S_T7_FUTURE_DEXPANSION_RTS) & M_T7_FUTURE_DEXPANSION_RTS) +#define S_CL14_RD_DATA_TO_ERROR 14 +#define V_CL14_RD_DATA_TO_ERROR(x) ((x) << S_CL14_RD_DATA_TO_ERROR) +#define F_CL14_RD_DATA_TO_ERROR V_CL14_RD_DATA_TO_ERROR(1U) #define S_CL13_RD_DATA_TO_ERROR 13 #define V_CL13_RD_DATA_TO_ERROR(x) ((x) << S_CL13_RD_DATA_TO_ERROR) @@ -22224,10 +22241,9 @@ #define V_FUTURE_DEXPANSION_IPE(x) ((x) << S_FUTURE_DEXPANSION_IPE) #define G_FUTURE_DEXPANSION_IPE(x) (((x) >> S_FUTURE_DEXPANSION_IPE) & M_FUTURE_DEXPANSION_IPE) -#define S_T7_FUTURE_DEXPANSION_IPE 14 -#define M_T7_FUTURE_DEXPANSION_IPE 0x3ffffU -#define V_T7_FUTURE_DEXPANSION_IPE(x) ((x) << S_T7_FUTURE_DEXPANSION_IPE) -#define G_T7_FUTURE_DEXPANSION_IPE(x) (((x) >> S_T7_FUTURE_DEXPANSION_IPE) & M_T7_FUTURE_DEXPANSION_IPE) +#define S_CL14_IF_PAR_EN 14 +#define V_CL14_IF_PAR_EN(x) ((x) << S_CL14_IF_PAR_EN) +#define F_CL14_IF_PAR_EN V_CL14_IF_PAR_EN(1U) #define S_CL13_IF_PAR_EN 13 #define V_CL13_IF_PAR_EN(x) ((x) << S_CL13_IF_PAR_EN) @@ -22292,10 +22308,9 @@ #define V_FUTURE_DEXPANSION_IPS(x) ((x) << S_FUTURE_DEXPANSION_IPS) #define G_FUTURE_DEXPANSION_IPS(x) (((x) >> S_FUTURE_DEXPANSION_IPS) & M_FUTURE_DEXPANSION_IPS) -#define S_T7_FUTURE_DEXPANSION_IPS 14 -#define M_T7_FUTURE_DEXPANSION_IPS 0x3ffffU -#define V_T7_FUTURE_DEXPANSION_IPS(x) ((x) << S_T7_FUTURE_DEXPANSION_IPS) -#define G_T7_FUTURE_DEXPANSION_IPS(x) (((x) >> S_T7_FUTURE_DEXPANSION_IPS) & M_T7_FUTURE_DEXPANSION_IPS) +#define S_CL14_IF_PAR_ERROR 14 +#define V_CL14_IF_PAR_ERROR(x) ((x) << S_CL14_IF_PAR_ERROR) +#define F_CL14_IF_PAR_ERROR V_CL14_IF_PAR_ERROR(1U) #define S_CL13_IF_PAR_ERROR 13 #define V_CL13_IF_PAR_ERROR(x) ((x) << S_CL13_IF_PAR_ERROR) @@ -39030,21 +39045,21 @@ #define A_PM_TX_CH1_OSPI_DEFICIT_THRSHLD 0x10028 #define A_PM_TX_PERR_ENABLE 0x10028 -#define S_T7_1_OSPI_OVERFLOW3 23 -#define V_T7_1_OSPI_OVERFLOW3(x) ((x) << S_T7_1_OSPI_OVERFLOW3) -#define F_T7_1_OSPI_OVERFLOW3 V_T7_1_OSPI_OVERFLOW3(1U) +#define S_OSPI_OVERFLOW3_TX 23 +#define V_OSPI_OVERFLOW3_TX(x) ((x) << S_OSPI_OVERFLOW3_TX) +#define F_OSPI_OVERFLOW3_TX V_OSPI_OVERFLOW3_TX(1U) -#define S_T7_1_OSPI_OVERFLOW2 22 -#define V_T7_1_OSPI_OVERFLOW2(x) ((x) << S_T7_1_OSPI_OVERFLOW2) -#define F_T7_1_OSPI_OVERFLOW2 V_T7_1_OSPI_OVERFLOW2(1U) +#define S_OSPI_OVERFLOW2_TX 22 +#define V_OSPI_OVERFLOW2_TX(x) ((x) << S_OSPI_OVERFLOW2_TX) +#define F_OSPI_OVERFLOW2_TX V_OSPI_OVERFLOW2_TX(1U) -#define S_T7_1_OSPI_OVERFLOW1 21 -#define V_T7_1_OSPI_OVERFLOW1(x) ((x) << S_T7_1_OSPI_OVERFLOW1) -#define F_T7_1_OSPI_OVERFLOW1 V_T7_1_OSPI_OVERFLOW1(1U) +#define S_OSPI_OVERFLOW1_TX 21 +#define V_OSPI_OVERFLOW1_TX(x) ((x) << S_OSPI_OVERFLOW1_TX) +#define F_OSPI_OVERFLOW1_TX V_OSPI_OVERFLOW1_TX(1U) -#define S_T7_1_OSPI_OVERFLOW0 20 -#define V_T7_1_OSPI_OVERFLOW0(x) ((x) << S_T7_1_OSPI_OVERFLOW0) -#define F_T7_1_OSPI_OVERFLOW0 V_T7_1_OSPI_OVERFLOW0(1U) +#define S_OSPI_OVERFLOW0_TX 20 +#define V_OSPI_OVERFLOW0_TX(x) ((x) << S_OSPI_OVERFLOW0_TX) +#define F_OSPI_OVERFLOW0_TX V_OSPI_OVERFLOW0_TX(1U) #define S_T7_BUNDLE_LEN_OVFL_EN 18 #define V_T7_BUNDLE_LEN_OVFL_EN(x) ((x) << S_T7_BUNDLE_LEN_OVFL_EN) @@ -41390,15 +41405,65 @@ #define V_T7_BUBBLE(x) ((x) << S_T7_BUBBLE) #define F_T7_BUBBLE V_T7_BUBBLE(1U) -#define S_TXTOKENFIFO 15 -#define M_TXTOKENFIFO 0x3ffU -#define V_TXTOKENFIFO(x) ((x) << S_TXTOKENFIFO) -#define G_TXTOKENFIFO(x) (((x) >> S_TXTOKENFIFO) & M_TXTOKENFIFO) +#define S_TX_TF_FIFO_PERR 19 +#define V_TX_TF_FIFO_PERR(x) ((x) << S_TX_TF_FIFO_PERR) +#define F_TX_TF_FIFO_PERR V_TX_TF_FIFO_PERR(1U) -#define S_PERR_TP2MPS_TFIFO 13 -#define M_PERR_TP2MPS_TFIFO 0x3U -#define V_PERR_TP2MPS_TFIFO(x) ((x) << S_PERR_TP2MPS_TFIFO) -#define G_PERR_TP2MPS_TFIFO(x) (((x) >> S_PERR_TP2MPS_TFIFO) & M_PERR_TP2MPS_TFIFO) +#define S_TX_FIFO_PERR 18 +#define V_TX_FIFO_PERR(x) ((x) << S_TX_FIFO_PERR) +#define F_TX_FIFO_PERR V_TX_FIFO_PERR(1U) + +#define S_NON_IPSEC_TX_FIFO3_PERR 17 +#define V_NON_IPSEC_TX_FIFO3_PERR(x) ((x) << S_NON_IPSEC_TX_FIFO3_PERR) +#define F_NON_IPSEC_TX_FIFO3_PERR V_NON_IPSEC_TX_FIFO3_PERR(1U) + +#define S_NON_IPSEC_TX_FIFO2_PERR 16 +#define V_NON_IPSEC_TX_FIFO2_PERR(x) ((x) << S_NON_IPSEC_TX_FIFO2_PERR) +#define F_NON_IPSEC_TX_FIFO2_PERR V_NON_IPSEC_TX_FIFO2_PERR(1U) + +#define S_NON_IPSEC_TX_FIFO1_PERR 15 +#define V_NON_IPSEC_TX_FIFO1_PERR(x) ((x) << S_NON_IPSEC_TX_FIFO1_PERR) +#define F_NON_IPSEC_TX_FIFO1_PERR V_NON_IPSEC_TX_FIFO1_PERR(1U) + +#define S_NON_IPSEC_TX_FIFO0_PERR 14 +#define V_NON_IPSEC_TX_FIFO0_PERR(x) ((x) << S_NON_IPSEC_TX_FIFO0_PERR) +#define F_NON_IPSEC_TX_FIFO0_PERR V_NON_IPSEC_TX_FIFO0_PERR(1U) + +#define S_TP2MPS_TX0 13 +#define V_TP2MPS_TX0(x) ((x) << S_TP2MPS_TX0) +#define F_TP2MPS_TX0 V_TP2MPS_TX0(1U) + +#define S_CRYPTO2MPS_TX0 12 +#define V_CRYPTO2MPS_TX0(x) ((x) << S_CRYPTO2MPS_TX0) +#define F_CRYPTO2MPS_TX0 V_CRYPTO2MPS_TX0(1U) + +#define S_TP2MPS_TX1 11 +#define V_TP2MPS_TX1(x) ((x) << S_TP2MPS_TX1) +#define F_TP2MPS_TX1 V_TP2MPS_TX1(1U) + +#define S_CRYPTO2MPS_TX1 10 +#define V_CRYPTO2MPS_TX1(x) ((x) << S_CRYPTO2MPS_TX1) +#define F_CRYPTO2MPS_TX1 V_CRYPTO2MPS_TX1(1U) + +#define S_TP2MPS_TX2 9 +#define V_TP2MPS_TX2(x) ((x) << S_TP2MPS_TX2) +#define F_TP2MPS_TX2 V_TP2MPS_TX2(1U) + +#define S_CRYPTO2MPS_TX2 8 +#define V_CRYPTO2MPS_TX2(x) ((x) << S_CRYPTO2MPS_TX2) +#define F_CRYPTO2MPS_TX2 V_CRYPTO2MPS_TX2(1U) + +#define S_TP2MPS_TX3 7 +#define V_TP2MPS_TX3(x) ((x) << S_TP2MPS_TX3) +#define F_TP2MPS_TX3 V_TP2MPS_TX3(1U) + +#define S_CRYPTO2MPS_TX3 6 +#define V_CRYPTO2MPS_TX3(x) ((x) << S_CRYPTO2MPS_TX3) +#define F_CRYPTO2MPS_TX3 V_CRYPTO2MPS_TX3(1U) + +#define S_NCSI2MPS 5 +#define V_NCSI2MPS(x) ((x) << S_NCSI2MPS) +#define F_NCSI2MPS V_NCSI2MPS(1U) #define A_MPS_TX_INT_CAUSE 0x9408 #define A_MPS_TX_NCSI2MPS_CNT 0x940c @@ -41420,6 +41485,16 @@ #define V_BUBBLEERRINT(x) ((x) << S_BUBBLEERRINT) #define F_BUBBLEERRINT V_BUBBLEERRINT(1U) +#define S_TXTOKENFIFO 15 +#define M_TXTOKENFIFO 0x3ffU +#define V_TXTOKENFIFO(x) ((x) << S_TXTOKENFIFO) +#define G_TXTOKENFIFO(x) (((x) >> S_TXTOKENFIFO) & M_TXTOKENFIFO) + +#define S_PERR_TP2MPS_TFIFO 13 +#define M_PERR_TP2MPS_TFIFO 0x3U +#define V_PERR_TP2MPS_TFIFO(x) ((x) << S_PERR_TP2MPS_TFIFO) +#define G_PERR_TP2MPS_TFIFO(x) (((x) >> S_PERR_TP2MPS_TFIFO) & M_PERR_TP2MPS_TFIFO) + #define A_MPS_TX_PERR_INJECT 0x9414 #define S_MPSTXMEMSEL 1 @@ -42174,7 +42249,45 @@ #define A_MPS_TX_DBG_CNT 0x947c #define A_MPS_TX_INT2_ENABLE 0x9498 + +#define S_T7_TX_FIFO_PERR 4 +#define V_T7_TX_FIFO_PERR(x) ((x) << S_T7_TX_FIFO_PERR) +#define F_T7_TX_FIFO_PERR V_T7_TX_FIFO_PERR(1U) + +#define S_NON_IPSEC_TX_FIFO3 3 +#define V_NON_IPSEC_TX_FIFO3(x) ((x) << S_NON_IPSEC_TX_FIFO3) +#define F_NON_IPSEC_TX_FIFO3 V_NON_IPSEC_TX_FIFO3(1U) + +#define S_NON_IPSEC_TX_FIFO2 2 +#define V_NON_IPSEC_TX_FIFO2(x) ((x) << S_NON_IPSEC_TX_FIFO2) +#define F_NON_IPSEC_TX_FIFO2 V_NON_IPSEC_TX_FIFO2(1U) + +#define S_NON_IPSEC_TX_FIFO1 1 +#define V_NON_IPSEC_TX_FIFO1(x) ((x) << S_NON_IPSEC_TX_FIFO1) +#define F_NON_IPSEC_TX_FIFO1 V_NON_IPSEC_TX_FIFO1(1U) + +#define S_NON_IPSEC_TX_FIFO0 0 +#define V_NON_IPSEC_TX_FIFO0(x) ((x) << S_NON_IPSEC_TX_FIFO0) +#define F_NON_IPSEC_TX_FIFO0 V_NON_IPSEC_TX_FIFO0(1U) + #define A_MPS_TX_INT2_CAUSE 0x949c + +#define S_T7_NON_IPSEC_TX_FIFO3_PERR 3 +#define V_T7_NON_IPSEC_TX_FIFO3_PERR(x) ((x) << S_T7_NON_IPSEC_TX_FIFO3_PERR) +#define F_T7_NON_IPSEC_TX_FIFO3_PERR V_T7_NON_IPSEC_TX_FIFO3_PERR(1U) + +#define S_T7_NON_IPSEC_TX_FIFO2_PERR 2 +#define V_T7_NON_IPSEC_TX_FIFO2_PERR(x) ((x) << S_T7_NON_IPSEC_TX_FIFO2_PERR) +#define F_T7_NON_IPSEC_TX_FIFO2_PERR V_T7_NON_IPSEC_TX_FIFO2_PERR(1U) + +#define S_T7_NON_IPSEC_TX_FIFO1_PERR 1 +#define V_T7_NON_IPSEC_TX_FIFO1_PERR(x) ((x) << S_T7_NON_IPSEC_TX_FIFO1_PERR) +#define F_T7_NON_IPSEC_TX_FIFO1_PERR V_T7_NON_IPSEC_TX_FIFO1_PERR(1U) + +#define S_T7_NON_IPSEC_TX_FIFO0_PERR 0 +#define V_T7_NON_IPSEC_TX_FIFO0_PERR(x) ((x) << S_T7_NON_IPSEC_TX_FIFO0_PERR) +#define F_T7_NON_IPSEC_TX_FIFO0_PERR V_T7_NON_IPSEC_TX_FIFO0_PERR(1U) + #define A_MPS_TX_PERR2_ENABLE 0x94a0 #define A_MPS_TX_INT3_ENABLE 0x94a4 #define A_MPS_TX_INT3_CAUSE 0x94a8 @@ -42307,6 +42420,12 @@ #define G_T5_TXPORT(x) (((x) >> S_T5_TXPORT) & M_T5_TXPORT) #define A_MPS_STAT_PERR_INT_CAUSE_SRAM 0x9614 + +#define S_T5_RXPP 29 +#define M_T5_RXPP 0x3U +#define V_T5_RXPP(x) ((x) << S_T5_RXPP) +#define G_T5_RXPP(x) (((x) >> S_T5_RXPP) & M_T5_RXPP) + #define A_MPS_STAT_PERR_ENABLE_SRAM 0x9618 #define A_MPS_STAT_PERR_INT_ENABLE_TX_FIFO 0x961c @@ -42429,6 +42548,26 @@ #define V_T5_TXVF(x) ((x) << S_T5_TXVF) #define G_T5_TXVF(x) (((x) >> S_T5_TXVF) & M_T5_TXVF) +#define S_RXVF_CERR 12 +#define M_RXVF_CERR 0xfU +#define V_RXVF_CERR(x) ((x) << S_RXVF_CERR) +#define G_RXVF_CERR(x) (((x) >> S_RXVF_CERR) & M_RXVF_CERR) + +#define S_TXVF_CERR 8 +#define M_TXVF_CERR 0xfU +#define V_TXVF_CERR(x) ((x) << S_TXVF_CERR) +#define G_TXVF_CERR(x) (((x) >> S_TXVF_CERR) & M_TXVF_CERR) + +#define S_RXVF_PERR 5 +#define M_RXVF_PERR 0x7U +#define V_RXVF_PERR(x) ((x) << S_RXVF_PERR) +#define G_RXVF_PERR(x) (((x) >> S_RXVF_PERR) & M_RXVF_PERR) + +#define S_TXVF_PERR 0 +#define M_TXVF_PERR 0x1fU +#define V_TXVF_PERR(x) ((x) << S_TXVF_PERR) +#define G_TXVF_PERR(x) (((x) >> S_TXVF_PERR) & M_TXVF_PERR) + #define A_MPS_STAT_PERR_INT_CAUSE_SRAM1 0x96c4 #define A_MPS_STAT_PERR_ENABLE_SRAM1 0x96c8 #define A_MPS_STAT_STOP_UPD_BG 0x96cc @@ -42641,6 +42780,10 @@ #define V_FILTMEM(x) ((x) << S_FILTMEM) #define G_FILTMEM(x) (((x) >> S_FILTMEM) & M_FILTMEM) +#define S_T7_TRCPLERRENB 17 +#define V_T7_TRCPLERRENB(x) ((x) << S_T7_TRCPLERRENB) +#define F_T7_TRCPLERRENB V_T7_TRCPLERRENB(1U) + #define S_T7_MISCPERR 16 #define V_T7_MISCPERR(x) ((x) << S_T7_MISCPERR) #define F_T7_MISCPERR V_T7_MISCPERR(1U) @@ -42814,11 +42957,6 @@ #define A_T7_MPS_TRC_FILTER_RUNT_CTL 0xa4a0 #define A_T7_MPS_TRC_FILTER_DROP 0xa4c0 #define A_T7_MPS_TRC_INT_ENABLE 0xa4e0 - -#define S_T7_TRCPLERRENB 17 -#define V_T7_TRCPLERRENB(x) ((x) << S_T7_TRCPLERRENB) -#define F_T7_TRCPLERRENB V_T7_TRCPLERRENB(1U) - #define A_T7_MPS_TRC_INT_CAUSE 0xa4e4 #define A_T7_MPS_TRC_TIMESTAMP_L 0xa4e8 #define A_T7_MPS_TRC_TIMESTAMP_H 0xa4ec @@ -42885,13 +43023,72 @@ #define G_PERR_TF_IN_CTL(x) (((x) >> S_PERR_TF_IN_CTL) & M_PERR_TF_IN_CTL) #define A_MPS_TRC_INT_ENABLE2 0xa4f4 -#define A_MPS_TRC_INT_CAUSE2 0xa4f8 -#define S_T7_TRC_TF_ECC 22 -#define M_T7_TRC_TF_ECC 0xffU -#define V_T7_TRC_TF_ECC(x) ((x) << S_T7_TRC_TF_ECC) -#define G_T7_TRC_TF_ECC(x) (((x) >> S_T7_TRC_TF_ECC) & M_T7_TRC_TF_ECC) +#define S_TX2RX_DWN_CONV_PERR_PT3_CERR 16 +#define V_TX2RX_DWN_CONV_PERR_PT3_CERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT3_CERR) +#define F_TX2RX_DWN_CONV_PERR_PT3_CERR V_TX2RX_DWN_CONV_PERR_PT3_CERR(1U) + +#define S_TX2RX_DWN_CONV_PERR_PT2_CERR 15 +#define V_TX2RX_DWN_CONV_PERR_PT2_CERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT2_CERR) +#define F_TX2RX_DWN_CONV_PERR_PT2_CERR V_TX2RX_DWN_CONV_PERR_PT2_CERR(1U) + +#define S_TX2RX_DWN_CONV_PERR_PT1_CERR 14 +#define V_TX2RX_DWN_CONV_PERR_PT1_CERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT1_CERR) +#define F_TX2RX_DWN_CONV_PERR_PT1_CERR V_TX2RX_DWN_CONV_PERR_PT1_CERR(1U) + +#define S_TX2RX_DWN_CONV_PERR_PT0_CERR 13 +#define V_TX2RX_DWN_CONV_PERR_PT0_CERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT0_CERR) +#define F_TX2RX_DWN_CONV_PERR_PT0_CERR V_TX2RX_DWN_CONV_PERR_PT0_CERR(1U) +#define S_MPS2MAC_DWN_CONV_PERR_PT1_CERR 12 +#define V_MPS2MAC_DWN_CONV_PERR_PT1_CERR(x) ((x) << S_MPS2MAC_DWN_CONV_PERR_PT1_CERR) +#define F_MPS2MAC_DWN_CONV_PERR_PT1_CERR V_MPS2MAC_DWN_CONV_PERR_PT1_CERR(1U) + +#define S_MPS2MAC_DWN_CONV_PERR_PT0_CERR 11 +#define V_MPS2MAC_DWN_CONV_PERR_PT0_CERR(x) ((x) << S_MPS2MAC_DWN_CONV_PERR_PT0_CERR) +#define F_MPS2MAC_DWN_CONV_PERR_PT0_CERR V_MPS2MAC_DWN_CONV_PERR_PT0_CERR(1U) + +#define S_MAC2MPS_DWN_CONV_PERR_PT1_CERR 10 +#define V_MAC2MPS_DWN_CONV_PERR_PT1_CERR(x) ((x) << S_MAC2MPS_DWN_CONV_PERR_PT1_CERR) +#define F_MAC2MPS_DWN_CONV_PERR_PT1_CERR V_MAC2MPS_DWN_CONV_PERR_PT1_CERR(1U) + +#define S_MAC2MPS_DWN_CONV_PERR_PT0_CERR 9 +#define V_MAC2MPS_DWN_CONV_PERR_PT0_CERR(x) ((x) << S_MAC2MPS_DWN_CONV_PERR_PT0_CERR) +#define F_MAC2MPS_DWN_CONV_PERR_PT0_CERR V_MAC2MPS_DWN_CONV_PERR_PT0_CERR(1U) + +#define S_TX2RX_DWN_CONV_PERR_PT3_PERR 8 +#define V_TX2RX_DWN_CONV_PERR_PT3_PERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT3_PERR) +#define F_TX2RX_DWN_CONV_PERR_PT3_PERR V_TX2RX_DWN_CONV_PERR_PT3_PERR(1U) + +#define S_TX2RX_DWN_CONV_PERR_PT2_PERR 7 +#define V_TX2RX_DWN_CONV_PERR_PT2_PERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT2_PERR) +#define F_TX2RX_DWN_CONV_PERR_PT2_PERR V_TX2RX_DWN_CONV_PERR_PT2_PERR(1U) + +#define S_TX2RX_DWN_CONV_PERR_PT1_PERR 6 +#define V_TX2RX_DWN_CONV_PERR_PT1_PERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT1_PERR) +#define F_TX2RX_DWN_CONV_PERR_PT1_PERR V_TX2RX_DWN_CONV_PERR_PT1_PERR(1U) + +#define S_TX2RX_DWN_CONV_PERR_PT0_PERR 5 +#define V_TX2RX_DWN_CONV_PERR_PT0_PERR(x) ((x) << S_TX2RX_DWN_CONV_PERR_PT0_PERR) +#define F_TX2RX_DWN_CONV_PERR_PT0_PERR V_TX2RX_DWN_CONV_PERR_PT0_PERR(1U) + +#define S_MAC2MPS_DWN_CONV_PERR_PT1_PERR 4 +#define V_MAC2MPS_DWN_CONV_PERR_PT1_PERR(x) ((x) << S_MAC2MPS_DWN_CONV_PERR_PT1_PERR) +#define F_MAC2MPS_DWN_CONV_PERR_PT1_PERR V_MAC2MPS_DWN_CONV_PERR_PT1_PERR(1U) + +#define S_MAC2MPS_DWN_CONV_PERR_PT0_PERR 3 +#define V_MAC2MPS_DWN_CONV_PERR_PT0_PERR(x) ((x) << S_MAC2MPS_DWN_CONV_PERR_PT0_PERR) +#define F_MAC2MPS_DWN_CONV_PERR_PT0_PERR V_MAC2MPS_DWN_CONV_PERR_PT0_PERR(1U) + +#define S_MPS2MAC_DWN_CONV_PERR_PT1_PERR 2 +#define V_MPS2MAC_DWN_CONV_PERR_PT1_PERR(x) ((x) << S_MPS2MAC_DWN_CONV_PERR_PT1_PERR) +#define F_MPS2MAC_DWN_CONV_PERR_PT1_PERR V_MPS2MAC_DWN_CONV_PERR_PT1_PERR(1U) + +#define S_MPS2MAC_DWN_CONV_PERR_PT0_PERR 1 +#define V_MPS2MAC_DWN_CONV_PERR_PT0_PERR(x) ((x) << S_MPS2MAC_DWN_CONV_PERR_PT0_PERR) +#define F_MPS2MAC_DWN_CONV_PERR_PT0_PERR V_MPS2MAC_DWN_CONV_PERR_PT0_PERR(1U) + +#define A_MPS_TRC_INT_CAUSE2 0xa4f8 #define A_MPS_CLS_CTL 0xd000 #define S_MEMWRITEFAULT 4 @@ -43743,9 +43940,9 @@ #define A_MPS_RX_CHMN_CNT 0x11070 #define A_MPS_CTL_STAT 0x11070 -#define S_T7_CTL 0 -#define V_T7_CTL(x) ((x) << S_T7_CTL) -#define F_T7_CTL V_T7_CTL(1U) +#define S_T7_MPS_CTL 0 +#define V_T7_MPS_CTL(x) ((x) << S_T7_MPS_CTL) +#define F_T7_MPS_CTL V_T7_MPS_CTL(1U) #define A_MPS_RX_PERR_INT_CAUSE 0x11074 @@ -43849,54 +44046,60 @@ #define V_T6_INT_ERR_INT(x) ((x) << S_T6_INT_ERR_INT) #define F_T6_INT_ERR_INT V_T6_INT_ERR_INT(1U) -#define S_MAC_IN_FIFO_768B 30 -#define V_MAC_IN_FIFO_768B(x) ((x) << S_MAC_IN_FIFO_768B) -#define F_MAC_IN_FIFO_768B V_MAC_IN_FIFO_768B(1U) - -#define S_T7_1_INT_ERR_INT 29 -#define V_T7_1_INT_ERR_INT(x) ((x) << S_T7_1_INT_ERR_INT) -#define F_T7_1_INT_ERR_INT V_T7_1_INT_ERR_INT(1U) +#define S_T7_INT_ERR_INT 30 +#define V_T7_INT_ERR_INT(x) ((x) << S_T7_INT_ERR_INT) +#define F_T7_INT_ERR_INT V_T7_INT_ERR_INT(1U) #define S_FLOP_PERR 28 #define V_FLOP_PERR(x) ((x) << S_FLOP_PERR) #define F_FLOP_PERR V_FLOP_PERR(1U) -#define S_RPLC_MAP 13 -#define M_RPLC_MAP 0x1fU -#define V_RPLC_MAP(x) ((x) << S_RPLC_MAP) -#define G_RPLC_MAP(x) (((x) >> S_RPLC_MAP) & M_RPLC_MAP) +#define S_MPS_RX_ATRB_MAP_PERR 23 +#define V_MPS_RX_ATRB_MAP_PERR(x) ((x) << S_MPS_RX_ATRB_MAP_PERR) +#define F_MPS_RX_ATRB_MAP_PERR V_MPS_RX_ATRB_MAP_PERR(1U) -#define S_TKN_RUNT_DROP_FIFO 12 -#define V_TKN_RUNT_DROP_FIFO(x) ((x) << S_TKN_RUNT_DROP_FIFO) -#define F_TKN_RUNT_DROP_FIFO V_TKN_RUNT_DROP_FIFO(1U) +#define S_RPLC_MAP_VNI_PERR 18 +#define M_RPLC_MAP_VNI_PERR 0x1fU +#define V_RPLC_MAP_VNI_PERR(x) ((x) << S_RPLC_MAP_VNI_PERR) +#define G_RPLC_MAP_VNI_PERR(x) (((x) >> S_RPLC_MAP_VNI_PERR) & M_RPLC_MAP_VNI_PERR) -#define S_T7_PPM3 9 -#define M_T7_PPM3 0x7U -#define V_T7_PPM3(x) ((x) << S_T7_PPM3) -#define G_T7_PPM3(x) (((x) >> S_T7_PPM3) & M_T7_PPM3) +#define S_RPLC_MAP_MCAST_PERR 13 +#define M_RPLC_MAP_MCAST_PERR 0x1fU +#define V_RPLC_MAP_MCAST_PERR(x) ((x) << S_RPLC_MAP_MCAST_PERR) +#define G_RPLC_MAP_MCAST_PERR(x) (((x) >> S_RPLC_MAP_MCAST_PERR) & M_RPLC_MAP_MCAST_PERR) -#define S_T7_PPM2 6 -#define M_T7_PPM2 0x7U -#define V_T7_PPM2(x) ((x) << S_T7_PPM2) -#define G_T7_PPM2(x) (((x) >> S_T7_PPM2) & M_T7_PPM2) +#define S_PPM3_PERR 9 +#define M_PPM3_PERR 0x7U +#define V_PPM3_PERR(x) ((x) << S_PPM3_PERR) +#define G_PPM3_PERR(x) (((x) >> S_PPM3_PERR) & M_PPM3_PERR) -#define S_T7_PPM1 3 -#define M_T7_PPM1 0x7U -#define V_T7_PPM1(x) ((x) << S_T7_PPM1) -#define G_T7_PPM1(x) (((x) >> S_T7_PPM1) & M_T7_PPM1) +#define S_PPM2_PERR 6 +#define M_PPM2_PERR 0x7U +#define V_PPM2_PERR(x) ((x) << S_PPM2_PERR) +#define G_PPM2_PERR(x) (((x) >> S_PPM2_PERR) & M_PPM2_PERR) -#define S_T7_PPM0 0 -#define M_T7_PPM0 0x7U -#define V_T7_PPM0(x) ((x) << S_T7_PPM0) -#define G_T7_PPM0(x) (((x) >> S_T7_PPM0) & M_T7_PPM0) +#define S_PPM1_PERR 3 +#define M_PPM1_PERR 0x7U +#define V_PPM1_PERR(x) ((x) << S_PPM1_PERR) +#define G_PPM1_PERR(x) (((x) >> S_PPM1_PERR) & M_PPM1_PERR) + +#define S_PPM0_PERR 0 +#define M_PPM0_PERR 0x7U +#define V_PPM0_PERR(x) ((x) << S_PPM0_PERR) +#define G_PPM0_PERR(x) (((x) >> S_PPM0_PERR) & M_PPM0_PERR) #define A_MPS_RX_PERR_INT_ENABLE 0x11078 +#define A_MPS_RX_PERR_ENABLE 0x1107c -#define S_T7_2_INT_ERR_INT 30 -#define V_T7_2_INT_ERR_INT(x) ((x) << S_T7_2_INT_ERR_INT) -#define F_T7_2_INT_ERR_INT V_T7_2_INT_ERR_INT(1U) +#define S_MPS_RX_ATRB_MA_PERRP 23 +#define V_MPS_RX_ATRB_MA_PERRP(x) ((x) << S_MPS_RX_ATRB_MA_PERRP) +#define F_MPS_RX_ATRB_MA_PERRP V_MPS_RX_ATRB_MA_PERRP(1U) + +#define S_RPLC_MAP_VN_PERRI 18 +#define M_RPLC_MAP_VN_PERRI 0x1fU +#define V_RPLC_MAP_VN_PERRI(x) ((x) << S_RPLC_MAP_VN_PERRI) +#define G_RPLC_MAP_VN_PERRI(x) (((x) >> S_RPLC_MAP_VN_PERRI) & M_RPLC_MAP_VN_PERRI) -#define A_MPS_RX_PERR_ENABLE 0x1107c #define A_MPS_RX_PERR_INJECT 0x11080 #define A_MPS_RX_FUNC_INT_CAUSE 0x11084 @@ -43965,6 +44168,38 @@ #define V_LEN_ERR_INT(x) ((x) << S_LEN_ERR_INT) #define F_LEN_ERR_INT V_LEN_ERR_INT(1U) +#define S_MTU_ERR3 19 +#define V_MTU_ERR3(x) ((x) << S_MTU_ERR3) +#define F_MTU_ERR3 V_MTU_ERR3(1U) + +#define S_MTU_ERR2 18 +#define V_MTU_ERR2(x) ((x) << S_MTU_ERR2) +#define F_MTU_ERR2 V_MTU_ERR2(1U) + +#define S_MTU_ERR1 17 +#define V_MTU_ERR1(x) ((x) << S_MTU_ERR1) +#define F_MTU_ERR1 V_MTU_ERR1(1U) + +#define S_MTU_ERR0 16 +#define V_MTU_ERR0(x) ((x) << S_MTU_ERR0) +#define F_MTU_ERR0 V_MTU_ERR0(1U) + +#define S_DBG_LEN_ERR 15 +#define V_DBG_LEN_ERR(x) ((x) << S_DBG_LEN_ERR) +#define F_DBG_LEN_ERR V_DBG_LEN_ERR(1U) + +#define S_DBG_SPI_ERR 14 +#define V_DBG_SPI_ERR(x) ((x) << S_DBG_SPI_ERR) +#define F_DBG_SPI_ERR V_DBG_SPI_ERR(1U) + +#define S_DBG_SE_CNT_ERR 13 +#define V_DBG_SE_CNT_ERR(x) ((x) << S_DBG_SE_CNT_ERR) +#define F_DBG_SE_CNT_ERR V_DBG_SE_CNT_ERR(1U) + +#define S_DBG_SPI_LEN_SE_CNT_ERR 12 +#define V_DBG_SPI_LEN_SE_CNT_ERR(x) ((x) << S_DBG_SPI_LEN_SE_CNT_ERR) +#define F_DBG_SPI_LEN_SE_CNT_ERR V_DBG_SPI_LEN_SE_CNT_ERR(1U) + #define A_MPS_RX_FUNC_INT_ENABLE 0x11088 #define A_MPS_RX_PAUSE_GEN_TH_0 0x1108c @@ -43980,59 +44215,59 @@ #define A_MPS_RX_PERR_INT_CAUSE2 0x1108c -#define S_CRYPT2MPS_RX_INTF_FIFO 28 -#define M_CRYPT2MPS_RX_INTF_FIFO 0xfU -#define V_CRYPT2MPS_RX_INTF_FIFO(x) ((x) << S_CRYPT2MPS_RX_INTF_FIFO) -#define G_CRYPT2MPS_RX_INTF_FIFO(x) (((x) >> S_CRYPT2MPS_RX_INTF_FIFO) & M_CRYPT2MPS_RX_INTF_FIFO) +#define S_CRYPTO2MPS_RX0_PERR 31 +#define V_CRYPTO2MPS_RX0_PERR(x) ((x) << S_CRYPTO2MPS_RX0_PERR) +#define F_CRYPTO2MPS_RX0_PERR V_CRYPTO2MPS_RX0_PERR(1U) -#define S_INIC2MPS_TX0_PERR 27 -#define V_INIC2MPS_TX0_PERR(x) ((x) << S_INIC2MPS_TX0_PERR) -#define F_INIC2MPS_TX0_PERR V_INIC2MPS_TX0_PERR(1U) +#define S_CRYPTO2MPS_RX1_PERR 30 +#define V_CRYPTO2MPS_RX1_PERR(x) ((x) << S_CRYPTO2MPS_RX1_PERR) +#define F_CRYPTO2MPS_RX1_PERR V_CRYPTO2MPS_RX1_PERR(1U) + +#define S_CRYPTO2MPS_RX2_PERR 29 +#define V_CRYPTO2MPS_RX2_PERR(x) ((x) << S_CRYPTO2MPS_RX2_PERR) +#define F_CRYPTO2MPS_RX2_PERR V_CRYPTO2MPS_RX2_PERR(1U) -#define S_INIC2MPS_TX1_PERR 26 +#define S_CRYPTO2MPS_RX3_PERR 28 +#define V_CRYPTO2MPS_RX3_PERR(x) ((x) << S_CRYPTO2MPS_RX3_PERR) +#define F_CRYPTO2MPS_RX3_PERR V_CRYPTO2MPS_RX3_PERR(1U) + +#define S_INIC2MPS_TX1_PERR 27 #define V_INIC2MPS_TX1_PERR(x) ((x) << S_INIC2MPS_TX1_PERR) #define F_INIC2MPS_TX1_PERR V_INIC2MPS_TX1_PERR(1U) -#define S_XGMAC2MPS_RX0_PERR 25 -#define V_XGMAC2MPS_RX0_PERR(x) ((x) << S_XGMAC2MPS_RX0_PERR) -#define F_XGMAC2MPS_RX0_PERR V_XGMAC2MPS_RX0_PERR(1U) +#define S_INIC2MPS_TX0_PERR 26 +#define V_INIC2MPS_TX0_PERR(x) ((x) << S_INIC2MPS_TX0_PERR) +#define F_INIC2MPS_TX0_PERR V_INIC2MPS_TX0_PERR(1U) -#define S_XGMAC2MPS_RX1_PERR 24 +#define S_XGMAC2MPS_RX1_PERR 25 #define V_XGMAC2MPS_RX1_PERR(x) ((x) << S_XGMAC2MPS_RX1_PERR) #define F_XGMAC2MPS_RX1_PERR V_XGMAC2MPS_RX1_PERR(1U) -#define S_MPS2CRYPTO_RX_INTF_FIFO 20 -#define M_MPS2CRYPTO_RX_INTF_FIFO 0xfU -#define V_MPS2CRYPTO_RX_INTF_FIFO(x) ((x) << S_MPS2CRYPTO_RX_INTF_FIFO) -#define G_MPS2CRYPTO_RX_INTF_FIFO(x) (((x) >> S_MPS2CRYPTO_RX_INTF_FIFO) & M_MPS2CRYPTO_RX_INTF_FIFO) - -#define S_MAC_RX_PPROC_MPS2TP_TF 19 -#define V_MAC_RX_PPROC_MPS2TP_TF(x) ((x) << S_MAC_RX_PPROC_MPS2TP_TF) -#define F_MAC_RX_PPROC_MPS2TP_TF V_MAC_RX_PPROC_MPS2TP_TF(1U) - -#define S_MAC_RX_PPROC_LB_CH3 18 -#define V_MAC_RX_PPROC_LB_CH3(x) ((x) << S_MAC_RX_PPROC_LB_CH3) -#define F_MAC_RX_PPROC_LB_CH3 V_MAC_RX_PPROC_LB_CH3(1U) +#define S_XGMAC2MPS_RX0_PERR 24 +#define V_XGMAC2MPS_RX0_PERR(x) ((x) << S_XGMAC2MPS_RX0_PERR) +#define F_XGMAC2MPS_RX0_PERR V_XGMAC2MPS_RX0_PERR(1U) -#define S_MAC_RX_PPROC_LB_CH2 17 -#define V_MAC_RX_PPROC_LB_CH2(x) ((x) << S_MAC_RX_PPROC_LB_CH2) -#define F_MAC_RX_PPROC_LB_CH2 V_MAC_RX_PPROC_LB_CH2(1U) +#define S_MPS2CRYPTO_CH0_INTF_FIFO_PERR 20 +#define M_MPS2CRYPTO_CH0_INTF_FIFO_PERR 0xfU +#define V_MPS2CRYPTO_CH0_INTF_FIFO_PERR(x) ((x) << S_MPS2CRYPTO_CH0_INTF_FIFO_PERR) +#define G_MPS2CRYPTO_CH0_INTF_FIFO_PERR(x) (((x) >> S_MPS2CRYPTO_CH0_INTF_FIFO_PERR) & M_MPS2CRYPTO_CH0_INTF_FIFO_PERR) -#define S_MAC_RX_PPROC_LB_CH1 16 -#define V_MAC_RX_PPROC_LB_CH1(x) ((x) << S_MAC_RX_PPROC_LB_CH1) -#define F_MAC_RX_PPROC_LB_CH1 V_MAC_RX_PPROC_LB_CH1(1U) +#define S_RX_FINAL_TF_FIFO_PERR 19 +#define V_RX_FINAL_TF_FIFO_PERR(x) ((x) << S_RX_FINAL_TF_FIFO_PERR) +#define F_RX_FINAL_TF_FIFO_PERR V_RX_FINAL_TF_FIFO_PERR(1U) -#define S_MAC_RX_PPROC_LB_CH0 15 -#define V_MAC_RX_PPROC_LB_CH0(x) ((x) << S_MAC_RX_PPROC_LB_CH0) -#define F_MAC_RX_PPROC_LB_CH0 V_MAC_RX_PPROC_LB_CH0(1U) +#define S_MPS_LB_FIFO_PERR 15 +#define M_MPS_LB_FIFO_PERR 0xfU +#define V_MPS_LB_FIFO_PERR(x) ((x) << S_MPS_LB_FIFO_PERR) +#define G_MPS_LB_FIFO_PERR(x) (((x) >> S_MPS_LB_FIFO_PERR) & M_MPS_LB_FIFO_PERR) -#define S_MAC_RX_PPROC_DWRR_CH0_3 14 -#define V_MAC_RX_PPROC_DWRR_CH0_3(x) ((x) << S_MAC_RX_PPROC_DWRR_CH0_3) -#define F_MAC_RX_PPROC_DWRR_CH0_3 V_MAC_RX_PPROC_DWRR_CH0_3(1U) +#define S_MPS_DWRR_FIFO_PERR 14 +#define V_MPS_DWRR_FIFO_PERR(x) ((x) << S_MPS_DWRR_FIFO_PERR) +#define F_MPS_DWRR_FIFO_PERR V_MPS_DWRR_FIFO_PERR(1U) -#define S_MAC_RX_FIFO_PERR 13 -#define V_MAC_RX_FIFO_PERR(x) ((x) << S_MAC_RX_FIFO_PERR) -#define F_MAC_RX_FIFO_PERR V_MAC_RX_FIFO_PERR(1U) +#define S_MAC_TF_FIFO_PERR 13 +#define V_MAC_TF_FIFO_PERR(x) ((x) << S_MAC_TF_FIFO_PERR) +#define F_MAC_TF_FIFO_PERR V_MAC_TF_FIFO_PERR(1U) #define S_MAC2MPS_PT3_PERR 12 #define V_MAC2MPS_PT3_PERR(x) ((x) << S_MAC2MPS_PT3_PERR) @@ -44050,13 +44285,18 @@ #define V_MAC2MPS_PT0_PERR(x) ((x) << S_MAC2MPS_PT0_PERR) #define F_MAC2MPS_PT0_PERR V_MAC2MPS_PT0_PERR(1U) -#define S_LPBK_FIFO_PERR 8 -#define V_LPBK_FIFO_PERR(x) ((x) << S_LPBK_FIFO_PERR) -#define F_LPBK_FIFO_PERR V_LPBK_FIFO_PERR(1U) +#define S_TP_LPBK_FIFO_PERR 8 +#define V_TP_LPBK_FIFO_PERR(x) ((x) << S_TP_LPBK_FIFO_PERR) +#define F_TP_LPBK_FIFO_PERR V_TP_LPBK_FIFO_PERR(1U) -#define S_TP2MPS_TF_FIFO_PERR 7 -#define V_TP2MPS_TF_FIFO_PERR(x) ((x) << S_TP2MPS_TF_FIFO_PERR) -#define F_TP2MPS_TF_FIFO_PERR V_TP2MPS_TF_FIFO_PERR(1U) +#define S_TP_LPBK_TF_PERR 7 +#define V_TP_LPBK_TF_PERR(x) ((x) << S_TP_LPBK_TF_PERR) +#define F_TP_LPBK_TF_PERR V_TP_LPBK_TF_PERR(1U) + +#define S_RSDV1 0 +#define M_RSDV1 0x7fU +#define V_RSDV1(x) ((x) << S_RSDV1) +#define G_RSDV1(x) (((x) >> S_RSDV1) & M_RSDV1) #define A_MPS_RX_PAUSE_GEN_TH_1 0x11090 #define A_MPS_RX_PERR_INT_ENABLE2 0x11090 @@ -44978,67 +45218,407 @@ #define A_MPS_VF_RPLCT_MAP6 0x11308 #define A_MPS_VF_RPLCT_MAP7 0x1130c #define A_MPS_RX_PERR_INT_CAUSE3 0x11310 + +#define S_FIFO_REPL_CH3_CERR 28 +#define V_FIFO_REPL_CH3_CERR(x) ((x) << S_FIFO_REPL_CH3_CERR) +#define F_FIFO_REPL_CH3_CERR V_FIFO_REPL_CH3_CERR(1U) + +#define S_FIFO_REPL_CH2_CERR 27 +#define V_FIFO_REPL_CH2_CERR(x) ((x) << S_FIFO_REPL_CH2_CERR) +#define F_FIFO_REPL_CH2_CERR V_FIFO_REPL_CH2_CERR(1U) + +#define S_FIFO_REPL_CH1_CERR 26 +#define V_FIFO_REPL_CH1_CERR(x) ((x) << S_FIFO_REPL_CH1_CERR) +#define F_FIFO_REPL_CH1_CERR V_FIFO_REPL_CH1_CERR(1U) + +#define S_FIFO_REPL_CH0_CERR 25 +#define V_FIFO_REPL_CH0_CERR(x) ((x) << S_FIFO_REPL_CH0_CERR) +#define F_FIFO_REPL_CH0_CERR V_FIFO_REPL_CH0_CERR(1U) + +#define S_VLAN_FILTER_RAM_CERR 24 +#define V_VLAN_FILTER_RAM_CERR(x) ((x) << S_VLAN_FILTER_RAM_CERR) +#define F_VLAN_FILTER_RAM_CERR V_VLAN_FILTER_RAM_CERR(1U) + +#define S_MPS_RX_TD_STAT_FIFO_PERR_CH3 23 +#define V_MPS_RX_TD_STAT_FIFO_PERR_CH3(x) ((x) << S_MPS_RX_TD_STAT_FIFO_PERR_CH3) +#define F_MPS_RX_TD_STAT_FIFO_PERR_CH3 V_MPS_RX_TD_STAT_FIFO_PERR_CH3(1U) + +#define S_RPLCT_HDR_FIFO_IN_PERR_CH3 22 +#define V_RPLCT_HDR_FIFO_IN_PERR_CH3(x) ((x) << S_RPLCT_HDR_FIFO_IN_PERR_CH3) +#define F_RPLCT_HDR_FIFO_IN_PERR_CH3 V_RPLCT_HDR_FIFO_IN_PERR_CH3(1U) + +#define S_ID_FIFO_IN_PERR_CH3 21 +#define V_ID_FIFO_IN_PERR_CH3(x) ((x) << S_ID_FIFO_IN_PERR_CH3) +#define F_ID_FIFO_IN_PERR_CH3 V_ID_FIFO_IN_PERR_CH3(1U) + +#define S_DESC_HDR2_PERR_CH3 20 +#define V_DESC_HDR2_PERR_CH3(x) ((x) << S_DESC_HDR2_PERR_CH3) +#define F_DESC_HDR2_PERR_CH3 V_DESC_HDR2_PERR_CH3(1U) + +#define S_FIFO_REPL_PERR_CH3 19 +#define V_FIFO_REPL_PERR_CH3(x) ((x) << S_FIFO_REPL_PERR_CH3) +#define F_FIFO_REPL_PERR_CH3 V_FIFO_REPL_PERR_CH3(1U) + +#define S_MPS_RX_TD_PERR_CH3 18 +#define V_MPS_RX_TD_PERR_CH3(x) ((x) << S_MPS_RX_TD_PERR_CH3) +#define F_MPS_RX_TD_PERR_CH3 V_MPS_RX_TD_PERR_CH3(1U) + +#define S_MPS_RX_TD_STAT_FIFO_PERR_CH2 17 +#define V_MPS_RX_TD_STAT_FIFO_PERR_CH2(x) ((x) << S_MPS_RX_TD_STAT_FIFO_PERR_CH2) +#define F_MPS_RX_TD_STAT_FIFO_PERR_CH2 V_MPS_RX_TD_STAT_FIFO_PERR_CH2(1U) + +#define S_RPLCT_HDR_FIFO_IN_PERR_CH2 16 +#define V_RPLCT_HDR_FIFO_IN_PERR_CH2(x) ((x) << S_RPLCT_HDR_FIFO_IN_PERR_CH2) +#define F_RPLCT_HDR_FIFO_IN_PERR_CH2 V_RPLCT_HDR_FIFO_IN_PERR_CH2(1U) + +#define S_ID_FIFO_IN_PERR_CH2 15 +#define V_ID_FIFO_IN_PERR_CH2(x) ((x) << S_ID_FIFO_IN_PERR_CH2) +#define F_ID_FIFO_IN_PERR_CH2 V_ID_FIFO_IN_PERR_CH2(1U) + +#define S_DESC_HDR2_PERR_CH2 14 +#define V_DESC_HDR2_PERR_CH2(x) ((x) << S_DESC_HDR2_PERR_CH2) +#define F_DESC_HDR2_PERR_CH2 V_DESC_HDR2_PERR_CH2(1U) + +#define S_FIFO_REPL_PERR_CH2 13 +#define V_FIFO_REPL_PERR_CH2(x) ((x) << S_FIFO_REPL_PERR_CH2) +#define F_FIFO_REPL_PERR_CH2 V_FIFO_REPL_PERR_CH2(1U) + +#define S_MPS_RX_TD_PERR_CH2 12 +#define V_MPS_RX_TD_PERR_CH2(x) ((x) << S_MPS_RX_TD_PERR_CH2) +#define F_MPS_RX_TD_PERR_CH2 V_MPS_RX_TD_PERR_CH2(1U) + +#define S_MPS_RX_TD_STAT_FIFO_PERR_CH1 11 +#define V_MPS_RX_TD_STAT_FIFO_PERR_CH1(x) ((x) << S_MPS_RX_TD_STAT_FIFO_PERR_CH1) +#define F_MPS_RX_TD_STAT_FIFO_PERR_CH1 V_MPS_RX_TD_STAT_FIFO_PERR_CH1(1U) + +#define S_RPLCT_HDR_FIFO_IN_PERR_CH1 10 +#define V_RPLCT_HDR_FIFO_IN_PERR_CH1(x) ((x) << S_RPLCT_HDR_FIFO_IN_PERR_CH1) +#define F_RPLCT_HDR_FIFO_IN_PERR_CH1 V_RPLCT_HDR_FIFO_IN_PERR_CH1(1U) + +#define S_ID_FIFO_IN_PERR_CH1 9 +#define V_ID_FIFO_IN_PERR_CH1(x) ((x) << S_ID_FIFO_IN_PERR_CH1) +#define F_ID_FIFO_IN_PERR_CH1 V_ID_FIFO_IN_PERR_CH1(1U) + +#define S_DESC_HDR2_PERR_CH1 8 +#define V_DESC_HDR2_PERR_CH1(x) ((x) << S_DESC_HDR2_PERR_CH1) +#define F_DESC_HDR2_PERR_CH1 V_DESC_HDR2_PERR_CH1(1U) + +#define S_FIFO_REPL_PERR_CH1 7 +#define V_FIFO_REPL_PERR_CH1(x) ((x) << S_FIFO_REPL_PERR_CH1) +#define F_FIFO_REPL_PERR_CH1 V_FIFO_REPL_PERR_CH1(1U) + +#define S_MPS_RX_TD_PERR_CH1 6 +#define V_MPS_RX_TD_PERR_CH1(x) ((x) << S_MPS_RX_TD_PERR_CH1) +#define F_MPS_RX_TD_PERR_CH1 V_MPS_RX_TD_PERR_CH1(1U) + +#define S_MPS_RX_TD_STAT_FIFO_PERR_CH0 5 +#define V_MPS_RX_TD_STAT_FIFO_PERR_CH0(x) ((x) << S_MPS_RX_TD_STAT_FIFO_PERR_CH0) +#define F_MPS_RX_TD_STAT_FIFO_PERR_CH0 V_MPS_RX_TD_STAT_FIFO_PERR_CH0(1U) + +#define S_RPLCT_HDR_FIFO_IN_PERR_CH0 4 +#define V_RPLCT_HDR_FIFO_IN_PERR_CH0(x) ((x) << S_RPLCT_HDR_FIFO_IN_PERR_CH0) +#define F_RPLCT_HDR_FIFO_IN_PERR_CH0 V_RPLCT_HDR_FIFO_IN_PERR_CH0(1U) + +#define S_ID_FIFO_IN_PERR_CH0 3 +#define V_ID_FIFO_IN_PERR_CH0(x) ((x) << S_ID_FIFO_IN_PERR_CH0) +#define F_ID_FIFO_IN_PERR_CH0 V_ID_FIFO_IN_PERR_CH0(1U) + +#define S_DESC_HDR2_PERR_CH0 2 +#define V_DESC_HDR2_PERR_CH0(x) ((x) << S_DESC_HDR2_PERR_CH0) +#define F_DESC_HDR2_PERR_CH0 V_DESC_HDR2_PERR_CH0(1U) + +#define S_FIFO_REPL_PERR_CH0 1 +#define V_FIFO_REPL_PERR_CH0(x) ((x) << S_FIFO_REPL_PERR_CH0) +#define F_FIFO_REPL_PERR_CH0 V_FIFO_REPL_PERR_CH0(1U) + +#define S_MPS_RX_TD_PERR_CH0 0 +#define V_MPS_RX_TD_PERR_CH0(x) ((x) << S_MPS_RX_TD_PERR_CH0) +#define F_MPS_RX_TD_PERR_CH0 V_MPS_RX_TD_PERR_CH0(1U) + #define A_MPS_RX_PERR_INT_ENABLE3 0x11314 #define A_MPS_RX_PERR_ENABLE3 0x11318 #define A_MPS_RX_PERR_INT_CAUSE4 0x1131c -#define S_CLS 20 -#define M_CLS 0x3fU -#define V_CLS(x) ((x) << S_CLS) -#define G_CLS(x) (((x) >> S_CLS) & M_CLS) +#define S_VNI_MULTICAST_FIFO_ECC_ERR_CH3 30 +#define V_VNI_MULTICAST_FIFO_ECC_ERR_CH3(x) ((x) << S_VNI_MULTICAST_FIFO_ECC_ERR_CH3) +#define F_VNI_MULTICAST_FIFO_ECC_ERR_CH3 V_VNI_MULTICAST_FIFO_ECC_ERR_CH3(1U) + +#define S_VNI_MULTICAST_FIFO_ECC_ERR_CH2 29 +#define V_VNI_MULTICAST_FIFO_ECC_ERR_CH2(x) ((x) << S_VNI_MULTICAST_FIFO_ECC_ERR_CH2) +#define F_VNI_MULTICAST_FIFO_ECC_ERR_CH2 V_VNI_MULTICAST_FIFO_ECC_ERR_CH2(1U) + +#define S_HASH_SRAM_CLS_ENG1 28 +#define V_HASH_SRAM_CLS_ENG1(x) ((x) << S_HASH_SRAM_CLS_ENG1) +#define F_HASH_SRAM_CLS_ENG1 V_HASH_SRAM_CLS_ENG1(1U) + +#define S_HASH_SRAM_CLS_ENG0 27 +#define V_HASH_SRAM_CLS_ENG0(x) ((x) << S_HASH_SRAM_CLS_ENG0) +#define F_HASH_SRAM_CLS_ENG0 V_HASH_SRAM_CLS_ENG0(1U) *** 1584 LINES SKIPPED *** From nobody Sat Jan 10 23:38:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpZp95V6wz6N5hN for ; Sat, 10 Jan 2026 23:38: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpZp92h7Tz3fkb for ; Sat, 10 Jan 2026 23:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768088305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gHKJhlwhYhfQfVTut4p+gBlGaW3q/mccrQaLOPuTmgw=; b=WrBJgV0Xf8E2SzMhZqTCoOkThtafBnhGpmg10etNDGkiDqUK5Qy8eKSGCoPhbzQvO1Mj3j 0ZkSxx/oFYJlFbkRPheR+dtDoTA1S038oRZfFmdn2FK4t9YEVjPTsYhosoYl8L9e/aGxXQ juF3mhiZtkB4GUPH1CoXH7RwWNAap5sLwkLxKAH1kNSvM5zGxwgbA+hnW/AvuPiJEiKiBF mUIKr6t0FONSmTi//dpB2Lw+FU3ZBvaNYqVb16bANognHehcnkVYERGfIvTGyf8xK4ZnNK M4H3hTPRanen/DJIenxeioof0U83fo1ErYdF64C8ZL3+px4FEB/vcjZ1vvj+bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768088305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gHKJhlwhYhfQfVTut4p+gBlGaW3q/mccrQaLOPuTmgw=; b=TXJeeEIGAN9qtV619nwPE2dMi7ksAVSAWV08faAKY5LBwQuz4LKR/ofst+wNv7JExKGKbS 11kulbEydiZSdln6Cvy8/EzK9bqv38RXkEsskSv6laB6HAV8NFNbE1Ier3hsyfNqBl9O9l wzMl5u/+TxZCv1svcHloRbnrcnhrDaT2AAPWOWqt0Uy4CjCQ4Dg2xrDfwyKhGmT/5OMMkv GwntiNfok9/hklPY9Ewx0lExmi/fiKy0Di5yRSA14s9i+Gv31RbUiSz97bDt07IRx6y3GG IuLZEUE3Ifk3wRvHorNg8cKd4+CXmnbpUtVg2qg7BVmFGrDW/13VTefpAEdVZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768088305; a=rsa-sha256; cv=none; b=lmgPzPJdXJczpcGJCQSWLjPLt7ObsQfR6nVPhRlQtkfsYJ+iAVA2EE+NkM4/hK1vk+21Fb Bt9c4CntIv8TDGWDSDZPeEvJQyQEOWimcAOlq7LSz9Y11Hw134WKxCbPudsY35h4q18V9v gVKn0sx1R3TeVvqqk+71ng+fRLDGeYZdtmXN+fDAoRe7FwTLDlWZrDdg6Iy5bcWJMHTAxu eQgr12qSYqDkWpey4cJ99Q982r0V6rqkmzt0gbDlS7vZBmMYHr1SAl3rq+itStPXEIVzXO Z7RbrSEeWqw3KNJ8/uwtQzmPmoAP5BlAot+e92EV0cHRR5mtKvnIgSWI3qMpFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpZp92F2kz1j7 for ; Sat, 10 Jan 2026 23:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3980d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 23:38:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 01c0005dced1 - main - cxgbe(4): Move CPL-specific handling out of eth_rx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01c0005dced136423829724d6b6e9566de10966c Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 23:38:25 +0000 Message-Id: <6962e2f1.3980d.6e3a546b@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=01c0005dced136423829724d6b6e9566de10966c commit 01c0005dced136423829724d6b6e9566de10966c Author: Navdeep Parhar AuthorDate: 2026-01-10 02:48:36 +0000 Commit: Navdeep Parhar CommitDate: 2026-01-10 22:44:31 +0000 cxgbe(4): Move CPL-specific handling out of eth_rx IPsec rx uses a new CPL and this prepares eth_rx for IPsec support in future commits. Tidy up the comment and code around M_TSTMP while here. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_sge.c | 131 +++++++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index e9754ace27c2..b6d44792dce4 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -1548,16 +1548,13 @@ sort_before_lro(struct lro_ctrl *lro) } #endif -#define CGBE_SHIFT_SCALE 10 - static inline uint64_t -t4_tstmp_to_ns(struct adapter *sc, uint64_t lf) +t4_tstmp_to_ns(struct adapter *sc, uint64_t hw_tstmp) { struct clock_sync *cur, dcur; uint64_t hw_clocks; uint64_t hw_clk_div; sbintime_t sbt_cur_to_prev, sbt; - uint64_t hw_tstmp = lf & 0xfffffffffffffffULL; /* 60b, not 64b. */ seqc_t gen; for (;;) { @@ -1967,25 +1964,12 @@ get_segment_len(struct adapter *sc, struct sge_fl *fl, int plen) return (min(plen, len)); } -static int -eth_rx(struct adapter *sc, struct sge_rxq *rxq, const struct iq_desc *d, - u_int plen) +static void +handle_cpl_rx_pkt(struct adapter *sc, struct sge_rxq *rxq, + const struct cpl_rx_pkt *cpl, struct mbuf *m0) { - struct mbuf *m0; if_t ifp = rxq->ifp; - struct sge_fl *fl = &rxq->fl; - struct vi_info *vi = if_getsoftc(ifp); - const struct cpl_rx_pkt *cpl; -#if defined(INET) || defined(INET6) - struct lro_ctrl *lro = &rxq->lro; -#endif uint16_t err_vec, tnl_type, tnlhdr_len; - static const int sw_hashtype[4][2] = { - {M_HASHTYPE_NONE, M_HASHTYPE_NONE}, - {M_HASHTYPE_RSS_IPV4, M_HASHTYPE_RSS_IPV6}, - {M_HASHTYPE_RSS_TCP_IPV4, M_HASHTYPE_RSS_TCP_IPV6}, - {M_HASHTYPE_RSS_UDP_IPV4, M_HASHTYPE_RSS_UDP_IPV6}, - }; static const int sw_csum_flags[2][2] = { { /* IP, inner IP */ @@ -2015,43 +1999,6 @@ eth_rx(struct adapter *sc, struct sge_rxq *rxq, const struct iq_desc *d, }, }; - MPASS(plen > sc->params.sge.fl_pktshift); - if (vi->pfil != NULL && PFIL_HOOKED_IN(vi->pfil) && - __predict_true((fl->flags & FL_BUF_RESUME) == 0)) { - struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; - caddr_t frame; - int rc, slen; - - slen = get_segment_len(sc, fl, plen) - - sc->params.sge.fl_pktshift; - frame = sd->cl + fl->rx_offset + sc->params.sge.fl_pktshift; - CURVNET_SET_QUIET(if_getvnet(ifp)); - rc = pfil_mem_in(vi->pfil, frame, slen, ifp, &m0); - CURVNET_RESTORE(); - if (rc == PFIL_DROPPED || rc == PFIL_CONSUMED) { - skip_fl_payload(sc, fl, plen); - return (0); - } - if (rc == PFIL_REALLOCED) { - skip_fl_payload(sc, fl, plen); - goto have_mbuf; - } - } - - m0 = get_fl_payload(sc, fl, plen); - if (__predict_false(m0 == NULL)) - return (ENOMEM); - - m0->m_pkthdr.len -= sc->params.sge.fl_pktshift; - m0->m_len -= sc->params.sge.fl_pktshift; - m0->m_data += sc->params.sge.fl_pktshift; - -have_mbuf: - m0->m_pkthdr.rcvif = ifp; - M_HASHTYPE_SET(m0, sw_hashtype[d->rss.hash_type][d->rss.ipv6]); - m0->m_pkthdr.flowid = be32toh(d->rss.hash_val); - - cpl = (const void *)(&d->rss + 1); if (sc->params.tp.rx_pkt_encap) { const uint16_t ev = be16toh(cpl->err_vec); @@ -2136,23 +2083,79 @@ have_mbuf: rxq->vlan_extraction++; } } +} + +static int +eth_rx(struct adapter *sc, struct sge_rxq *rxq, const struct iq_desc *d, + u_int plen) +{ + struct mbuf *m0; + if_t ifp = rxq->ifp; + struct sge_fl *fl = &rxq->fl; + struct vi_info *vi = if_getsoftc(ifp); +#if defined(INET) || defined(INET6) + struct lro_ctrl *lro = &rxq->lro; +#endif + int rc; + const uint8_t fl_pktshift = sc->params.sge.fl_pktshift; + static const uint8_t sw_hashtype[4][2] = { + {M_HASHTYPE_NONE, M_HASHTYPE_NONE}, + {M_HASHTYPE_RSS_IPV4, M_HASHTYPE_RSS_IPV6}, + {M_HASHTYPE_RSS_TCP_IPV4, M_HASHTYPE_RSS_TCP_IPV6}, + {M_HASHTYPE_RSS_UDP_IPV4, M_HASHTYPE_RSS_UDP_IPV6}, + }; + + MPASS(plen > fl_pktshift); + if (vi->pfil != NULL && PFIL_HOOKED_IN(vi->pfil) && + __predict_true((fl->flags & FL_BUF_RESUME) == 0)) { + struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; + caddr_t frame; + const int slen = get_segment_len(sc, fl, plen) - fl_pktshift; + + frame = sd->cl + fl->rx_offset + fl_pktshift; + CURVNET_SET_QUIET(if_getvnet(ifp)); + rc = pfil_mem_in(vi->pfil, frame, slen, ifp, &m0); + CURVNET_RESTORE(); + if (rc == PFIL_DROPPED || rc == PFIL_CONSUMED) { + skip_fl_payload(sc, fl, plen); + return (0); + } + if (rc == PFIL_REALLOCED) { + skip_fl_payload(sc, fl, plen); + goto have_mbuf; + } + } + + m0 = get_fl_payload(sc, fl, plen); + if (__predict_false(m0 == NULL)) + return (ENOMEM); + m0->m_pkthdr.len -= fl_pktshift; + m0->m_len -= fl_pktshift; + m0->m_data += fl_pktshift; +have_mbuf: + m0->m_pkthdr.rcvif = ifp; + M_HASHTYPE_SET(m0, sw_hashtype[d->rss.hash_type][d->rss.ipv6]); + m0->m_pkthdr.flowid = be32toh(d->rss.hash_val); +#ifdef NUMA + m0->m_pkthdr.numa_domain = if_getnumadomain(ifp); +#endif if (rxq->iq.flags & IQ_RX_TIMESTAMP) { /* - * Fill up rcv_tstmp but do not set M_TSTMP as - * long as we get a non-zero back from t4_tstmp_to_ns(). + * Fill up rcv_tstmp and set M_TSTMP if we get a a non-zero back + * from t4_tstmp_to_ns(). The descriptor has a 60b timestamp. */ m0->m_pkthdr.rcv_tstmp = t4_tstmp_to_ns(sc, - be64toh(d->rsp.u.last_flit)); + be64toh(d->rsp.u.last_flit) & 0x0fffffffffffffffULL); if (m0->m_pkthdr.rcv_tstmp != 0) m0->m_flags |= M_TSTMP; } -#ifdef NUMA - m0->m_pkthdr.numa_domain = if_getnumadomain(ifp); -#endif + handle_cpl_rx_pkt(sc, rxq, (const void *)(&d->rss + 1), m0); + #if defined(INET) || defined(INET6) - if (rxq->iq.flags & IQ_LRO_ENABLED && tnl_type == 0 && + if (rxq->iq.flags & IQ_LRO_ENABLED && + (m0->m_pkthdr.rsstype & M_HASHTYPE_INNER) == 0 && (M_HASHTYPE_GET(m0) == M_HASHTYPE_RSS_TCP_IPV4 || M_HASHTYPE_GET(m0) == M_HASHTYPE_RSS_TCP_IPV6)) { if (sort_before_lro(lro)) { From nobody Sun Jan 11 02:34:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpfjB1HmTz6NKFD for ; Sun, 11 Jan 2026 02:34: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpfjB0WVsz43yS for ; Sun, 11 Jan 2026 02:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768098862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=46mZsk1lne9lpePC1DqxQ73xljB/Rg0LaKPyB6zl74g=; b=WME28N6z7M66DclWrTrEBM+UKebMkwRaDm/RS8Ymz2iCotRFs3Ho7HNoQW/jqsl/dHP77P /ynvQsUWVyIC0VyCKFZN3doNDL6LfxACmH0Dtj4SCrJdUbevjqatobp9EKH6g9Huwiti1j fkGE84xWCa0VCwUEUt7PC2rF8B64UPpGFpYO3Aa4MTwQMiWgAglUMjiy4k0kH7hInV9shr bQYUcOLzGbESBBjUNoflvC8KsXsd1P1Iyz/EfIjPc7Pbm1bbiK/VXYrVo4pxGBac8v1FNO xJryawRww9Kck8fYsmW0hDcyy4OsI0k7ihUrsIKIVIoIjYh+J1+CdgnjuxSo4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768098862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=46mZsk1lne9lpePC1DqxQ73xljB/Rg0LaKPyB6zl74g=; b=M4ysUkV4l8FVA8JRqJ4joT2zD7zKfAT1wsWUNVDkII4Ckc9Kz1JYVWlvF6STJ7gs8sQuFG nLI45Pw9agNpn8IzeAorscjm3STvaz36noXM+AFyIVvuBlQMaR+pwO+bWv6uh5XUQy8L5k u+kOrCVVlX12njR/nyNrU4U9C8p2JAs2K+A5SG5QfzuBV3CC6ZdY9LarJb2cbldSvewV9z 6xMCmREsvR5vanvOlW8cGpbYeqGiOn42Td4fLnlFJV1EHRGRGVrEk+sUeCNvdO1NvHJhSV k8M61VQ48zNnJx5/KjI+SvpaFSgiwbT2gmUSiA5dOzBhThL4UyJnErepsEDA7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768098862; a=rsa-sha256; cv=none; b=BcBJ6tiI+OOC4spZZoSzSBn5KLzgt7u1uwp+99fzaCf8KRFlfCJ5XW0tQRpLI0K4jcR0uk 5wbOhY7bJ+rXXpVCwN15sZu7ILZHV7XHUQtKCGQoPE6PMx4C0NxT8euT8w6kp0yGxWR3LF vAvbo2g19vRTo0//kL1yKfbR3E/stZnJM/Vw5wAuuiD0qjZ5CSnDDFkyt9S246U2dVhPpZ tah4IUnh9xmllzcV5r93/QUq+2qJCIgWB50o23MJZRgiaK/nwIHPPAbrJqn0F9XcxUvCLO lSTRcWdRDVJK1JrE2tKJIp3eEyOovMVmI+ULnjTQJtpxuvWu9chdNf6Dsznchw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpfj96ld5z6mv for ; Sun, 11 Jan 2026 02:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b582 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 02:34:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 68562f8145e8 - main - newfs: Add an option to disable soft updates List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68562f8145e8154e7e276897a546995f0d8f3428 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 02:34:21 +0000 Message-Id: <69630c2d.b582.7d7d1621@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=68562f8145e8154e7e276897a546995f0d8f3428 commit 68562f8145e8154e7e276897a546995f0d8f3428 Author: Dag-Erling Smørgrav AuthorDate: 2026-01-11 02:34:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-01-11 02:34:18 +0000 newfs: Add an option to disable soft updates A previous commit turned soft updates on by default for UFS2 without providing a way to turn them off. This corrects that by adding a new -u flag which forces soft updates (and soft updates journaling) off. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Fixes: 61dece6d27fb ("Enable soft updates by default for UFS2 filesystems.") Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D54576 --- sbin/newfs/newfs.8 | 24 ++++++++++++++++++------ sbin/newfs/newfs.c | 9 ++++++--- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 16bca26f7cd8..6416e0f0ec8d 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 23, 2025 +.Dd January 7, 2026 .Dt NEWFS 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd construct a new UFS1/UFS2 file system .Sh SYNOPSIS .Nm -.Op Fl EJNUjlnt +.Op Fl EJNUjlntu .Op Fl L Ar volname .Op Fl O Ar filesystem-type .Op Fl S Ar sector-size @@ -98,10 +98,20 @@ The default format is UFS2. For backward compatibility. .It Fl U Enable soft updates on the new file system. -Soft updates are enabled by default for UFS2 format file systems. -Use -.Xr tunefs 8 -to disable soft updates if they are not wanted. +If neither +.Fl U +nor +.Fl u +is specified, soft updates are enabled by default for UFS2 format file +systems and disabled otherwise. +.It Fl u +Do not enable soft updates on the new file system. +If neither +.Fl U +nor +.Fl u +is specified, soft updates are enabled by default for UFS2 format file +systems and disabled otherwise. .It Fl a Ar maxcontig Specify the maximum number of contiguous blocks that will be laid out before forcing a rotational delay. @@ -166,6 +176,8 @@ One inode is required for each distinct file, so this value effectively specifies the average file size on the file system. .It Fl j Enable soft updates journaling on the new file system. +This implies +.Fl U . This flag is implemented by running the .Xr tunefs 8 utility found in the user's diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 418319d1cd3a..61448dd1fce3 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -76,7 +76,7 @@ int Lflag; /* add a volume label */ int Nflag; /* run without writing file system */ int Oflag = 2; /* file system format (1 => UFS1, 2 => UFS2) */ int Rflag; /* regression test */ -int Uflag; /* enable soft updates for file system */ +int Uflag = -1; /* enable soft updates for file system */ int jflag; /* enable soft updates journaling for filesys */ int Xflag = 0; /* exit in middle of newfs for testing */ int Jflag; /* enable gjournal for file system */ @@ -179,6 +179,9 @@ main(int argc, char *argv[]) case 'U': Uflag = 1; break; + case 'u': + Uflag = 0; + break; case 'X': Xflag++; break; @@ -386,8 +389,8 @@ main(int argc, char *argv[]) opt = FS_OPTSPACE; } /* Use soft updates by default for UFS2 and above */ - if (Oflag > 1) - Uflag = 1; + if (Uflag < 0) + Uflag = Oflag > 1; realsectorsize = sectorsize; if (sectorsize != DEV_BSIZE) { /* XXX */ int secperblk = sectorsize / DEV_BSIZE; From nobody Sun Jan 11 02:44:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpfxG2GCWz6NKWN for ; Sun, 11 Jan 2026 02:44: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpfxG1Y9Sz451M for ; Sun, 11 Jan 2026 02:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768099490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ThkzhwlD7hltyyTNG3RwUvWoCr4kY/r0vhVbIQ9Jv4A=; b=qhk3ufwHrKu7DJR7+JVbCcitS5POwGCL1iB7kr3Ih/KfwcaaAPdVIRuy7MOsn9ccsu8oWu BMexuTjVFzdP0Q/xdwVNdyeSeF6nyPa37OtA4JgkImHvUMip7Y1OiuYHf+XR/1J7bNTyEI XYg6rQ2QLuoeZCk5A2p30fIL2PlmhAEmFMXWhpN3uREkFXrmctIrklYJK3mwmQCdx3GpFP uzL6cmpcKOwhl96XFbapF7oPxQoEKq5yV99LNVi1gnZNWTW4+gj2uQSQKuGbGetjCUbCpz TikQQzCh4xmy0aqqd+JR1YhpaFY8vr0qSRdiJ/8dXtJvv7qGNUTabPgXHAC9PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768099490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ThkzhwlD7hltyyTNG3RwUvWoCr4kY/r0vhVbIQ9Jv4A=; b=y35npsDBQAZTmcNK0uBdictJTmB8o3O4w0HU2hR2z/rW6q7C89SUI4BDFMrk4XAS7Zl3fI lrEe8CpJ/ud+gwE0ug1cO9dHh3H0mz64fDXbAesWXEsTmjGVYYWi4OUCyUjVrTY+rM9jds Ozh1UVq9tM9hU77AFgHcOYVikJ075cVLbbFGLph4tpPaYVS0OrsOhMGSQo9dZlCH0ZX8Bm 7g7vFj957LH/OStl3wklKl7RuALgcHy6819/mLiKFIS3iYL5uFOcYfji2hxlt+hK9mGSKb PDVcLmN9ia2CDdALvTIRNElH5ZpoSqTg1f9l9QFBbuMVPEYtJ7GziBAulsoIrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768099490; a=rsa-sha256; cv=none; b=J6LXjDnJ+ejVkfZHCjHaWVCEnQRd4yDsY1GA1AYNT4PUNjiaLI4/Yhg9NNOl5O2TVHhT16 P5fpwXMTz8TIFUfoRHk98YA/vZExLJYlKVO9q9jeDW5ABcpTDxhjx06ZE9MUj7+RfqGjow 1UUfSXfCIQg1NADmd51LWVHE1UtPnavEyQXHPBjAK82d10SwPl9kWAZdopG/wcwIhhiSj3 6IbcjFJupPWbJw7CVqsHU1Uf4mN3DOpab+N8o49EIWR6RoXsYwBspAZLKmNIIdWKmpkJP5 2fYNoyIpGAxSFn2iTd8x1+uK0ByJOYOBm6d6hnnc/6ZPmCwhta287HEoKO/fxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpfxG11Gvz6yt for ; Sun, 11 Jan 2026 02:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ac34 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 02:44:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: 9cd89fc5aa3c - main - bsd.man.mk fix staging List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cd89fc5aa3c0e76375732788fe9d4282d65224f Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 02:44:50 +0000 Message-Id: <69630ea2.ac34.397f5428@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9cd89fc5aa3c0e76375732788fe9d4282d65224f commit 9cd89fc5aa3c0e76375732788fe9d4282d65224f Author: Simon J. Gerraty AuthorDate: 2026-01-11 02:44:40 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-11 02:44:40 +0000 bsd.man.mk fix staging The STAGE_SETS and STAGE_TARGETS need to match STAGE_DIR. For each STAGE_SET we have STAGE_DIR.${STAGE_SET} and create a target stage_files.${STAGE_SET}, the settings all need to be self consistent to work. --- share/mk/bsd.man.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index dde11afb8283..412576eb2fe9 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -252,10 +252,10 @@ _MANLINKS+= ${CATDIR}${_osect}${MANSUBDIR}/${_oname} \ .if defined(${__group}) && !empty(${__group}) .if ${MK_STAGING_MAN} == "yes" -STAGE_TARGETS+= stage_files.${__group} _mansets.${__group}:= ${${__group}:E:O:u:M*[1-9]:@s@man$s@} -STAGE_SETS+= ${_mansets.${__group}} .for _page in ${${__group}} +STAGE_SETS+= ${__group}.man${_page:T:E} +STAGE_TARGETS+= stage_files.${__group}.man${_page:T:E} stage_files.${__group}.man${_page:T:E}: ${_page} .if target(${_page}${MCOMPRESS_EXT}) stage_files.${__group}.man${_page:T:E}: ${_page}${MCOMPRESS_EXT} From nobody Sun Jan 11 02:59:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpgG70zSwz6NLV5 for ; Sun, 11 Jan 2026 02:59: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpgG668Kjz46TL for ; Sun, 11 Jan 2026 02:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768100366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fR4Esg2ZmQWrmPvlwSdJCu1qh1l/DeLZf8U2Id5x/SU=; b=vpVF8BwGq7Uut+YhbW54H65p7jE54sX2/urEi6pqCDFir91yYiQ2/IHFiINsWQFSat+rEo 7H0F/6Fz0Wmsus//6JsOO7QHjHudHatmqvxTSainsRHqsN3lCFkyyLEbfCzr5cJ48CoTR+ YU25IUsRw7TBHT+pVKtVODNUk+dvQ0VOMTpvxbAYm4o+pKotmwDk0B7SBfCXITz6RWEF6+ 3ruA/lltN2GKkXbg+v8kxFkZw/c7Uu2ug2r1M7/uScto9b+6fjzCj1yqi0B09etQId+cm7 484up7n8ESniZVzqkjw1kmLCinGFqb1YmCuFZBjEq/BBqPB8/SmxgJmACkhKYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768100366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fR4Esg2ZmQWrmPvlwSdJCu1qh1l/DeLZf8U2Id5x/SU=; b=Yn+d4hseVbAfDHBGY8TDhhLC8XU0NGgVrQDBIWtfwJt/so8T0a6v1IrfclYiSpZqC6/i2I v9AKFBq5OfgT0PgfS9gxP0kn+pUqvck1tuJysDCNzbo1NJXnh6ScRm8PqlAdZ6X65Zdn/7 kLa3ER7TK2kTmxzwUhmguRYW+4RA1K3NfIHg9JIM7rBroixen5/UJNYhw3lGaJyO4RnCkd KHKBpWXCVE1KPpP11PwiWlMmnqWpJYWmS+oKd9UE2gaegwh6VVjgToMBrUzwtfTHFpLweF /5R/pw+pUqtQGZdEcOPurcC4GM+6rbJ3UjJ6iWaoTK8LbxHazAvGPnuaa0bJXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768100366; a=rsa-sha256; cv=none; b=wIsDC0anhrRHJny0bDpJ1+a8yBWzDTVzeKWE2UeVaxmXFvCKVhTTZ2LDxkCSQGHGer/qCB TN5BUcolUlGMiSswGO71j+wHhiqD6wjoGmx1NBn68Yd5wLnwhGtmOX9S4O8mwX45RZolzt 4Y1JijbSD7XSk+tnt7UqNlLzkrTtV82x6HYvvMHQna7JOfot7COyXVBfLoVnrf4rnmLajw dHcGEDiFrfTgwYJ/w92k/qxGP+s9n+jwaYEqWhe7cYdEWE6A0089LPfQ0cxfYx8cQ/YLSm KBA3SAWy9/WxvlTq8JNQMH/lRjVQLWQ7PrNVjckGxc8/m8hlrCrqo8GuJQrUbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpgG65Ff1z751 for ; Sun, 11 Jan 2026 02:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d883 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 02:59:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: 9fed072b4422 - main - bsd.man.mk simplify staging List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9fed072b44223f061a0dbf604741091b3bc09aee Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 02:59:26 +0000 Message-Id: <6963120e.d883.21154dc@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9fed072b44223f061a0dbf604741091b3bc09aee commit 9fed072b44223f061a0dbf604741091b3bc09aee Author: Simon J. Gerraty AuthorDate: 2026-01-11 02:59:20 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-11 02:59:20 +0000 bsd.man.mk simplify staging We actually only need the high level targets stage_files and stage_links meta.stage.mk will take care of the details. --- share/mk/bsd.man.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 412576eb2fe9..7490fd13aefc 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -252,10 +252,10 @@ _MANLINKS+= ${CATDIR}${_osect}${MANSUBDIR}/${_oname} \ .if defined(${__group}) && !empty(${__group}) .if ${MK_STAGING_MAN} == "yes" +STAGE_TARGETS+= stage_files _mansets.${__group}:= ${${__group}:E:O:u:M*[1-9]:@s@man$s@} .for _page in ${${__group}} STAGE_SETS+= ${__group}.man${_page:T:E} -STAGE_TARGETS+= stage_files.${__group}.man${_page:T:E} stage_files.${__group}.man${_page:T:E}: ${_page} .if target(${_page}${MCOMPRESS_EXT}) stage_files.${__group}.man${_page:T:E}: ${_page}${MCOMPRESS_EXT} @@ -263,8 +263,8 @@ stage_files.${__group}.man${_page:T:E}: ${_page}${MCOMPRESS_EXT} STAGE_DIR.${__group}.man${_page:T:E}?= ${STAGE_OBJTOP}${MANDIR}${_page:T:E}${MANSUBDIR} .endfor .if !defined(NO_MLINKS) && !empty(${__group}LINKS) +STAGE_TARGETS+= stage_links STAGE_SETS+= mlinks.${__group} -STAGE_TARGETS+= stage_links.${__group} STAGE_LINKS.mlinks.${__group}:= ${${__group}LINKS:M*.[1-9]:@f@${f:S,^,${MANDIR}${f:E}${MANSUBDIR}/,}@} stage_links.mlinks.${__group}: ${_mansets.${__group}:@s@stage_files.${__group}.$s@} .endif From nobody Sun Jan 11 05:10:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpk9h5T3lz6NTb5 for ; Sun, 11 Jan 2026 05:10:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpk9g5zjfz3K4R for ; Sun, 11 Jan 2026 05:10:47 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=YdKO+WQK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::62b as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-2a1388cdac3so38807045ad.0 for ; Sat, 10 Jan 2026 21:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768108241; x=1768713041; darn=freebsd.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=UeJq0rFG33VmsIbp1EpjG01cxk+cWQ39XBgyxiVY50Q=; b=YdKO+WQKg2wsNKNuPKCsUcA1E8krAlzryn7MQGM3SuOayDfqpu3lH9yR5nRU7tuHKP LCQEiEbblVZhkYh7AUM58cZy3bYIjBBVki/fM44I9i+jYDGfbY8f6bLw1i5gHeuOaoZW FXScobLkV/qM+IFJF6qA/vrJdcuTTx0Kc2W06j6OcglFv0vcS+5eRMGm11s2X8QMlfI0 2J7P9fsfiCHYNeEOIAGoWVTDljPaHVVCaKO7MERSmNQEyCfDT+TgEizUDac1/S+fOKgJ 49iGI24j3/gvjOaIIXibDB1V/1VfBV2dT1zI/N25cF95lzx7tFjjqwvfqv08Tz2s1xaL a+YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768108241; x=1768713041; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UeJq0rFG33VmsIbp1EpjG01cxk+cWQ39XBgyxiVY50Q=; b=HeZ2OiyNn9q8MatD+zocOEgtpyr4031Fp0elioTrbiV8KRde0MGh/6NuoeoVz9zGE8 peAoLf0LkL22hitGSqY/cQJojWHPR3NwJjWFVVr8nCp2+maJyevlQFglA6efRkdmlNnJ qtaOn0P0oDtRfl+KNcq+xgCpQYC2EXLNvFCRMyzc57JgQfp3tpepJFblNw9SBhFa8fa9 MfvDnQlZLIRa6soppmBjRF+5qGKb5hE5cS8VUJlGFfnzWgWw1MhbIm4koSTpGrjXUNI1 Wg/KBuO4BZRyxgnSOHftGNDr376GACeftZUPqjdHhWUOKijvebLfEsmZFRmWZgp10OUo DcVQ== X-Forwarded-Encrypted: i=1; AJvYcCUFpt7RS8oDfsyK64YAmy6SVEkJrmS58QUu+TlUR9mOiIp+IzoBxFn2XPh8ah22L+bpfSD7VvfbsZulOp99NMhTQNB5BA==@freebsd.org X-Gm-Message-State: AOJu0YxP1dOl5dNgMxIoZusGj4eCh+EE4mSV/JGZ35LR4KjoEaleVg3x LMc/Q0Ly06yq6ecEbsAoIYP5oWiX0XPbqXallTAXcJAn0o+d+xmTC5TO X-Gm-Gg: AY/fxX5+VgNVCIxdlU2dK1H90hfDlvBGyBvDwMRWIL5oLuduwsCdSYJ7HIkZsogidyp bnBmmMwwwIgUWEBMf0kkmLAkTsIakyhZhAMaBrXbhq+7cPt9uiw3hAxCdyEmd4sWxXNcTPL1GIs 2B4jUNbPNXUl6L8fLw2pMEFMLI29uj/YtjJCW7cLdiGxPaGEcAd+NAUUwxCGoL1qs++PlKM48jt EmCbmDKCb444q6D0dGJL/xhDy2svccaOhw486Rbs7tKG4LU8XMag9UE9BMgtUCmMbbLyyckzXmP RV697eFEEAKElYsKfM60Tzj2kACh2papBmLsnCrK+mCB5C60n+snFV3QnSEnGKzb5vMJSN8GcPf JkweSsc9uzyPu34Zf3QA/gj55ujHy433FzajCF6iecdcZhu7uAkAh1s3sW6pMfYITn6W7g5bRz6 JUSupLjkkSNpG/gw/78Y3MkvavdcM= X-Google-Smtp-Source: AGHT+IGVXbv0akI8kqQwmJPkSvxsGe+ek8HNTjHXEVVB1L1HF5NQT9NlFqMts4A1j7zXzzvmgNJQcw== X-Received: by 2002:a17:902:f546:b0:290:ac36:2ed6 with SMTP id d9443c01a7336-2a3ee42a386mr129843315ad.14.1768108241370; Sat, 10 Jan 2026 21:10:41 -0800 (PST) Received: from smtpclient.apple ([45.90.222.74]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3c3a512sm142853965ad.10.2026.01.10.21.10.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jan 2026 21:10:40 -0800 (PST) From: "Enji Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_E171B85B-34E5-4F71-8E48-63CE71FBE9CB" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: Re: git: f224591746bd - main - Add ASMC_DEBUG make option Date: Sat, 10 Jan 2026 21:10:28 -0800 In-Reply-To: <1990810.vR5SVPPSqJ@ravel> Cc: Enji Cooper , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org To: Olivier Certner References: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> <1990810.vR5SVPPSqJ@ravel> X-Mailer: Apple Mail (2.3826.700.81.1.4) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.36 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.86)[-0.856]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62b:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4dpk9g5zjfz3K4R --Apple-Mail=_E171B85B-34E5-4F71-8E48-63CE71FBE9CB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Olivier, > On Jan 9, 2026, at 8:44=E2=80=AFAM, Olivier Certner = wrote: >=20 > Hi Enji, >=20 >> The branch main has been updated by ngie: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df224591746bdaf14ad5f63de4738a314= 6cc2f55f >>=20 >> commit f224591746bdaf14ad5f63de4738a3146cc2f55f >> Author: Enji Cooper >> AuthorDate: 2026-01-04 08:27:57 +0000 >> Commit: Enji Cooper >> CommitDate: 2026-01-06 01:43:04 +0000 >>=20 >> Add ASMC_DEBUG make option >=20 > This commit broke the i386 build. I've just committed a fix. Also, = I've restored 'device vt_efifb' in NOTES (under 'x86/' instead of = 'amd64/'), as AFAIK, NOTES should list all possible devices/options. re: vt_efifb: what I did was removed the duplicate entry, since it was = already in the x86 one: = https://cgit.freebsd.org/src/tree/sys/x86/conf/NOTES#n332 . > Please make sure you also MFC the two following commits (67599eef01f5 = ("sys/x86/NOTES: Add vt_efifb"), fde9fe18219f i386 ("Fix kernel = compilation after introduction of ASMC_DEBUG option")) along with the = original one. Sure =E2=80=94 although the correct fix would be to not build the driver = at all on i386, since it doesn=E2=80=99t support 32-bit CPUs. Apple sold = very few i386-based Intel chips before they transitioned to amd64-only = ones (it was only a matter of 8-9 months IIRC) and asmc(4) doesn=E2=80=99t= support any of the 32-bit chips (I checked). Cheers, -Enji= --Apple-Mail=_E171B85B-34E5-4F71-8E48-63CE71FBE9CB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Olivier,

On Jan 9, 2026, at = 8:44=E2=80=AFAM, Olivier Certner <olce@freebsd.org> = wrote:

Hi = Enji,

The branch main has been updated = by ngie:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df224591746bdaf14ad5f63de4738a314= 6cc2f55f

commit = f224591746bdaf14ad5f63de4738a3146cc2f55f
Author: =     Enji Cooper = <ngie@FreeBSD.org>
AuthorDate: 2026-01-04 08:27:57 = +0000
Commit:     Enji Cooper = <ngie@FreeBSD.org>
CommitDate: 2026-01-06 01:43:04 = +0000

   Add ASMC_DEBUG make = option

This commit broke the i386 build.  I've = just committed a fix.  Also, I've restored 'device vt_efifb' in = NOTES (under 'x86/' instead of 'amd64/'), as AFAIK, NOTES should list = all possible = devices/options.

re: = vt_efifb: what I did was removed the duplicate entry, since it was = already in the x86 one: https:/= /cgit.freebsd.org/src/tree/sys/x86/conf/NOTES#n332 .
Please make sure you also MFC the two = following commits (67599eef01f5 ("sys/x86/NOTES: Add vt_efifb"), = fde9fe18219f i386 ("Fix kernel compilation after introduction of = ASMC_DEBUG option")) along with the original = one.

Sure =E2=80=94 although the = correct fix would be to not build the driver at all on i386, since it = doesn=E2=80=99t support 32-bit CPUs. Apple sold very few i386-based = Intel chips before they transitioned to amd64-only ones (it was only a = matter of 8-9 months IIRC) and asmc(4) doesn=E2=80=99t support any of = the 32-bit chips (I = checked).
Cheers,
-Enji
= --Apple-Mail=_E171B85B-34E5-4F71-8E48-63CE71FBE9CB-- From nobody Sun Jan 11 05:25:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpkWS2zjqz6NVvG for ; Sun, 11 Jan 2026 05:26:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpkWR2f7mz3LDR for ; Sun, 11 Jan 2026 05:26:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="c/kZpfBA"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::62d as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2a09d981507so32082425ad.1 for ; Sat, 10 Jan 2026 21:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768109165; x=1768713965; darn=freebsd.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=bvadG6WCKihagz6E2j6chFP1tXL0cXiZNXMAwM7LF7w=; b=c/kZpfBA2aNs6AGoPmxI++3DFxA6/tqWf9TY69vndGPkEITe8b4DuBMpI7nW6VQuVs Y9dyVfWcQcUd0GlLeBV1HFAaz5tkrN5FqammNoYOGFujLMkx8JgrxIEDBvOCu+S51uZm RNMlpe1AEXQLu3CSfFPn1G4hEISBqgBcwwhzIpy2GxuuPIw/PRpIZ2Q9qtOzlmFwPqef MzTPHNNZILOFWUpH5sC18lptqsGFmiHcVWAxUtd8HaO+0zzh9QPF90pDWHhM3MthNMDE M9lDomnLAAGHFadpMz1Qmihd32wS5EwbDFsw+EsOwkX9aAQy1X/lMw6Z7zKBpgVsA4MA 2n4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768109165; x=1768713965; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bvadG6WCKihagz6E2j6chFP1tXL0cXiZNXMAwM7LF7w=; b=WwPuToNGKzGlO0IDthPXd8R5X58pNLmbV9+HyDC+RHs6TV97zG0hz8BlpmkWDb/EDM SQN6nUGDdPVXTos0FSzADrHDlLz4/ezERjYcO7Mhrrk9ClCM32ABJiFBa0T4Pt3EhI5/ p/MujWbyvKq0sLkHFy1HVD8d+KXGXM9LmiBzE5K4tJQ7R72gR4FVBkLatn0PpJrYcBwK 7aEmhCyppYWtgVLsxcOnvWPqiO1vNOKpyNaT+GhcxhATP2FiEZgd5s4DwySQDoxlPoUM o0tEkGvQ5rrdh3Jx8+/iNt6Ak6WODD+ieKXleARp4ys/VLdZD7esG8fIMu4QEn+EjyvM GwHw== X-Forwarded-Encrypted: i=1; AJvYcCXsrEFS0cUvkJGwEFqEKQ3tMVuZWJ/u8tav69egvoKBUIBvqhikdTy7k1iJEytXaaxvxK69wgnjtb3y6kbF7R8rUg97vw==@freebsd.org X-Gm-Message-State: AOJu0YyBQ6bU6vt5uA0ecgs3mZACoMykTpfc9rBxCYiKNumfcSVqrRj9 Ier/OYJlVJoigPLAjgo7ujCzZraaYjczbEWI3waEV3MP49XpG+efXZXJ X-Gm-Gg: AY/fxX7PRi6IfX03kxDLksNMVT0eRAe9AsEGRDkZPu5h2Al9Rv2h1FdZAd7D7cR+XWe fUkQj9Zd1mutuiemrDRh2BWghFUJfovkohFm1E/jhHsrCAmIHmh3S1yQtkPoAI78r2WJxWIu2v7 KtKXIht4wk3tLwEswimftjilyvDX+Hea1b5ozCY/wNj3fgPMYgx3O+4H0vilRHZhUP0EVzvergu vfyB7AFyqDG2kR3aLNpTYF6BGPJrehz+OY3UpkdOoBzMep7/PWQ1BPJEJNhrL+EFpTHvv+9O8u4 AgOG+6c9GRsHspSUXLJXgRuxo+2jtTMtYXy8+Aw/JH/9J9zmy75qeIHHfpDMTyc3sSvkBe8gJYK t58aj8tzK6TaY5No9KHrCtvSFw4EAOhXrxWhr54cA7SlptfQI+O41URZU+/e933tWHdRkgaHR+y nYWr5uJ6CjY7I6/zU81y+j7KyUbMUdh3mJ X-Google-Smtp-Source: AGHT+IGBPovwz+bzKztaJiW9IlZpG/3P4Y/g6Je+ECe/c3UrrqwZgzOlIccWYko2mASSK9fprmBAPA== X-Received: by 2002:a17:903:187:b0:2a0:d527:4d07 with SMTP id d9443c01a7336-2a3edb73820mr156274715ad.17.1768109164977; Sat, 10 Jan 2026 21:26:04 -0800 (PST) Received: from smtpclient.apple ([45.90.222.74]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cb2df6sm142380185ad.61.2026.01.10.21.26.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jan 2026 21:26:04 -0800 (PST) From: "Enji Cooper (yaneurabeya)" Message-Id: <76722189-7324-4BAE-9359-65948F51DDD1@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_58919F3F-F4E4-4A0F-B837-EABBBE06AE34" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: Re: git: eb1c0d74cbb9 - main - Convert fully to Python 3. Remove licence text, only keep Date: Sat, 10 Jan 2026 21:25:52 -0800 In-Reply-To: <695ba4fb.35e3f.3a916a95@gitrepo.freebsd.org> Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: "George V. Neville-Neil" References: <695ba4fb.35e3f.3a916a95@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3826.700.81.1.4) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.29 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.79)[-0.793]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62d:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4dpkWR2f7mz3LDR --Apple-Mail=_58919F3F-F4E4-4A0F-B837-EABBBE06AE34 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Some comments below=E2=80=A6 +o pedantic-python > On Jan 5, 2026, at 3:48=E2=80=AFAM, George V. Neville-Neil = wrote: >=20 > The branch main has been updated by gnn: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Deb1c0d74cbb99f329767b3d565ae57a3= ec032bee >=20 > commit eb1c0d74cbb99f329767b3d565ae57a3ec032bee > Author: George V. Neville-Neil > AuthorDate: 2026-01-05 11:40:12 +0000 > Commit: George V. Neville-Neil > CommitDate: 2026-01-05 11:40:12 +0000 >=20 > Convert fully to Python 3. Remove licence text, only keep >=20 > SPDX. >=20 > Update to use argparse rather than OptionParser (now deprecated). All good stuff :). > -import sys > import subprocess > from subprocess import PIPE > +import argparse Please sort imports =E2=80=94 thanks :). > -# Use input() for Python version 3 > -if sys.version_info[0] =3D=3D 3: > - raw_input =3D input > +def gather_counters(): > + """Run program and return output as array of lines.""" > + result =3D subprocess.run("pmccontrol -L", shell=3DTrue, = capture_output=3DTrue, text=3DTrue) Instead of using `shell=3DTrue`, please use `[=E2=80=9Cpmccontrol=E2=80=9D= , =E2=80=9C-L=E2=80=9D] =E2=80=94 this employs best practices and avoids = complaints from bandit [1] and ruff [2]. Will this command ever return non-UTF8 encodable characters? If so, this = call will crash when decoding the output. > + tabbed =3D result.stdout.strip().split('\n') Please use `.splitlines()` instead of `.split(=E2=80=9C\n=E2=80=9D)`: it = avoids hardcoding the text form of the character and achieves the same = thing as the bytes form. Plus, it=E2=80=99s a bit easier to read/grok = for humans. > + return [line.replace('\t', '') for line in tabbed] >=20 > # A list of strings that are not really counters, just > # name tags that are output by pmccontrol -L > @@ -62,37 +36,28 @@ notcounter =3D ["IAF", "IAP", "TSC", "UNC", "UCF", = "UCP", "SOFT" ] >=20 > def main(): >=20 > - from optparse import OptionParser > - =20 > - parser =3D OptionParser() > - parser.add_option("-p", "--program", dest=3D"program",=20 > - help=3D"program to execute") > - parser.add_option("-w", "--wait", action=3D"store_true", = dest=3D"wait", > - default=3DTrue, help=3D"wait after each = execution") > + parser =3D argparse.ArgumentParser(description=3D'Exercise a = program under hwpmc') > + parser.add_argument('--program', type=3Dstr, required=3DTrue, = help=3D'target program') > + parser.add_argument('--wait', action=3D'store_true', help=3D'Wait = after each counter.') >=20 > - (options, args) =3D parser.parse_args() > + args =3D parser.parse_args() >=20 > - if (options.program =3D=3D None): > - print("specify program, such as ls, with -p/--program") > - sys.exit() > - =20 > - p =3D subprocess.Popen(["pmccontrol", "-L"], stdout=3DPIPE) > - counters =3D p.communicate()[0] > + counters =3D gather_counters() >=20 > if len(counters) <=3D 0: This is tautologically impossible for < 0. PEP8 says to express it this = way: `If not counters:` > print("no counters found") > sys.exit() >=20 > - for counter in counters.split(): > + for counter in counters: > if counter in notcounter: > continue > - p =3D subprocess.Popen(["pmcstat", "-p", counter, = options.program], > - stdout=3DPIPE) > - result =3D p.communicate()[0] > + p =3D subprocess.Popen(["pmcstat", "-p", counter, = args.program], > + text=3DTrue, stderr=3DPIPE) > + result =3D p.communicate()[1] > print(result) > - if (options.wait =3D=3D True): > + if (args.wait =3D=3D True): `if args.wait:` is the equivalent simpler PEP8-compatible form. You = don=E2=80=99t need to compare against True/False explicitly. > try: > - value =3D raw_input("next?") > + value =3D input("Waitin for you to press ENTER") This wording=E2=80=99s a bit more direct and fixes a typo: `"Please = press ENTER=E2=80=9D`. > except EOFError: > sys.exit() Cheers! -Enji 1. https://bandit.readthedocs.io/en/latest/ 2. https://docs.astral.sh/ruff/= --Apple-Mail=_58919F3F-F4E4-4A0F-B837-EABBBE06AE34 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Some comments = below=E2=80=A6

+o pedantic-python

On Jan 5, 2026, at 3:48=E2=80=AFAM, George V. = Neville-Neil <gnn@FreeBSD.org> wrote:

The branch main has been = updated by gnn:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3Deb1c0d74cbb99f329767b3d565ae57a3= ec032bee

commit = eb1c0d74cbb99f329767b3d565ae57a3ec032bee
Author: =     George V. Neville-Neil = <gnn@FreeBSD.org>
AuthorDate: 2026-01-05 11:40:12 = +0000
Commit:     George V. Neville-Neil = <gnn@FreeBSD.org>
CommitDate: 2026-01-05 11:40:12 +0000

=    Convert fully to Python 3.  Remove licence text, = only keep

   SPDX.

=    Update to use argparse rather than OptionParser (now = deprecated).

All good stuff = :).

-import sys
= import subprocess
from subprocess import PIPE
+import = argparse

Please sort imports = =E2=80=94 thanks :).

-# Use = input() for Python version 3
-if sys.version_info[0] =3D=3D 3:
- =    raw_input =3D input
+def gather_counters():
+ =    """Run program and return output as array of = lines."""
+    result =3D subprocess.run("pmccontrol = -L", shell=3DTrue, capture_output=3DTrue, = text=3DTrue)

Instead of using = `shell=3DTrue`, please use `[=E2=80=9Cpmccontrol=E2=80=9D, =E2=80=9C-L=E2=80= =9D] =E2=80=94 this employs best practices and avoids complaints from = bandit [1] and ruff [2].

Will this command ever = return non-UTF8 encodable characters? If so, this call will crash when = decoding the output.

+ =    tabbed =3D = result.stdout.strip().split('\n')

Please use `.splitlines()` instead of `.split(=E2=80=9C\n=E2=80=9D)`: = it avoids hardcoding the text form of the character and achieves the = same thing as the bytes form. Plus, it=E2=80=99s a bit easier to = read/grok for humans.

+ =    return [line.replace('\t', '') for line in = tabbed]

# A list of strings that are not really counters, = just
# name tags that are output by pmccontrol -L
@@ -62,37 = +36,28 @@ notcounter =3D ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", = "SOFT" ]

def main():

-    from optparse = import OptionParser
-    
- =    parser =3D OptionParser()
- =    parser.add_option("-p", "--program", dest=3D"program", =
- =             &n= bsp;        help=3D"program to = execute")
-    parser.add_option("-w", "--wait", = action=3D"store_true", dest=3D"wait",
- =             &n= bsp;        default=3DTrue, = help=3D"wait after each execution")
+    parser =3D = argparse.ArgumentParser(description=3D'Exercise a program under = hwpmc')
+    parser.add_argument('--program', = type=3Dstr, required=3DTrue, help=3D'target program')
+ =    parser.add_argument('--wait', action=3D'store_true', = help=3D'Wait after each counter.')

-    (options, = args) =3D parser.parse_args()
+    args =3D = parser.parse_args()

-    if (options.program =3D=3D = None):
-        print("specify = program, such as ls, with -p/--program")
- =        sys.exit()
- =        
-    p =3D = subprocess.Popen(["pmccontrol", "-L"], stdout=3DPIPE)
- =    counters =3D p.communicate()[0]
+ =    counters =3D gather_counters()

=     if len(counters) <=3D = 0:

This is tautologically = impossible for < 0. PEP8 says to express it this = way:

`If not = counters:`

=         print("no counters = found")
=         sys.exit()

- =    for counter in counters.split():
+ =    for counter in counters:
=         if counter in = notcounter:
=             co= ntinue
-        p =3D = subprocess.Popen(["pmcstat", "-p", counter, options.program],
- =             &n= bsp;           &nbs= p;   stdout=3DPIPE)
- =        result =3D = p.communicate()[0]
+        p =3D = subprocess.Popen(["pmcstat", "-p", counter, args.program],
+ =             &n= bsp;           &nbs= p;   text=3DTrue, stderr=3DPIPE)
+ =        result =3D = p.communicate()[1]
=         print(result)
- =        if (options.wait =3D=3D = True):
+        if (args.wait =3D=3D= True):

`if args.wait:` is = the equivalent simpler PEP8-compatible form. You don=E2=80=99t need to = compare against True/False = explicitly.

=             tr= y:
- =             &n= bsp;  value =3D raw_input("next?")
+ =             &n= bsp;  value =3D input("Waitin for you to press = ENTER")

This wording=E2=80= =99s a bit more direct and fixes a typo: `"Please press = ENTER=E2=80=9D`.

=             ex= cept EOFError:
=             &n= bsp;   sys.exit()

Cheers!
-Enji

2. https://docs.astral.sh/ruff/= --Apple-Mail=_58919F3F-F4E4-4A0F-B837-EABBBE06AE34-- From nobody Sun Jan 11 05:34:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpkjF4SmHz6NWR6 for ; Sun, 11 Jan 2026 05:34:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpkjF0Tllz3M3p for ; Sun, 11 Jan 2026 05:34:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=CwNEWjVb; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::630 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2a09d981507so32099745ad.1 for ; Sat, 10 Jan 2026 21:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768109675; x=1768714475; darn=freebsd.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=TM21KDyhcJUoAmM+A858DiQ2z1+q97+OMUE6Jv88IaM=; b=CwNEWjVbDOHI4Om4LLkb/tu3jSSMbWvqmmKqvhVoubh4ya2M3u+3R1B6kgAO4Xql97 ZvX88ZkYyhOA57jLtmpTeZySN4nP0ib7sEKRF5wgYLo6I2qD12pXnG4Aa0jDG6/8ZG/r 10a6q5RhCvtGa/Rpc4SLVnZ4vyWQYNJZK/f5q+AgCj2Ye0cGHvaEHU/Ce83agtxn9BQI CBOb+030WOer9RB+k34R7jRuLPLTabFn5uQ9u1MBJ+0iW+wLb0Kqa/WNJr7iDGSMK194 9TRAaZ8cDBbDnAF+PT+Kcku41M9IspG6RXjvddbXH4LPYbcuufAGBy5lu5Y+SgQzV1qq TPxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768109675; x=1768714475; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TM21KDyhcJUoAmM+A858DiQ2z1+q97+OMUE6Jv88IaM=; b=aSiHqwETBM63kBaw+CW1Q4FvUhBaB91DF/Di98l3qmv0J4icwTB4HU9tZ+QDx70sWN ksI9wVoUWGCnb9eBPPZc4SFquVd2crioJZZIIb+a4T59WDXErcJ9D1O9Wi1q8Tpe9KQd gXKwhU+0pa5CYleQVaplZ6QyesqzTsTY65StHUuilRoFhnY+cS/KZYQ6ir3hpPT2XOzD vyPbcJJBmKSQ7AQC27CcrthNexledluuNqZVhp/TO3m/5f0In1AMaFEZrl5DngY7YrES 4aLNfat8nQmvMv0uOxNU12nE3XzalDNTK1+b9cmFRgCKCiCWRuedt8ytBad8R8+Qs9T+ IHjA== X-Forwarded-Encrypted: i=1; AJvYcCVIlkJCxyHlKSqR0USpL+pniPMD5ZBI0M7wT6/M2/6WYdLc6BBUsccOl9Fgd1Ruo4kK93qxOCNX+lqqTOciMOebQGaB6g==@freebsd.org X-Gm-Message-State: AOJu0YyhZ42rOpiqQ4/rRgs4Zt63fmZ78xMkgZfA6U6uAv3vsyXfDy/7 X8OJZrOdohlq9cXwQLm1oop9cn+pEh9PkFTxd7gM/lRK41i7ASvmG1vl X-Gm-Gg: AY/fxX7vpRShccHj3JxGeBPZCBK+kadud8c7dCzCpWV6i0Hpe8B8IC4iSF/iIFE9dIB gYlTyj/N27YbSxCA/dYOr8EwqIoQcQirv/lruP90qYqfp6KYt5TySbCRFtzCxNpSjdhYCgug9zk ECPKUSqkW9LrCX3+59H/ZuqYOrQzAiGcWh0v5GQk2aeOZMf2UrB/Szzqizo2mNcZcdsDszTxOH3 02RT5HaQBtYNR7jtHNI5ltSBzEtnLY37qVGKuFFsjEm/18fTp7FBm4sFh5DhGIQEw5P+Ev1deqq 18WRs3SQyU47qruWdrUb44alGAvKSS5xmBK2/3o0SHQ3NWm7zCb6F4x9ajyNftYixf0ETtlwkJg B0ZlX44Z4iZHRF1DOstVRRAulrFcSFN5t97lMDQMGziokqSar4UiJShFu7LLqBLcDYkgu4mKDSc jf88XxOLDdJIeCJ9MqiC4H5DVawVY= X-Google-Smtp-Source: AGHT+IEYE0ELOOzWEOaqNBvIesd+lTe1ToCa09qBO60HM4NTeDte0MWd1Q3Rx9fkqYPN4zJ2253SQQ== X-Received: by 2002:a17:903:2986:b0:2a3:ccf5:6694 with SMTP id d9443c01a7336-2a3e39828e6mr173224265ad.3.1768109674739; Sat, 10 Jan 2026 21:34:34 -0800 (PST) Received: from smtpclient.apple ([45.90.222.74]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cd3284sm142760975ad.91.2026.01.10.21.34.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jan 2026 21:34:34 -0800 (PST) From: "Enji Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_64F372D2-2D56-4D15-9FBC-6196F027B3BA" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: Re: git: f224591746bd - main - Add ASMC_DEBUG make option Date: Sat, 10 Jan 2026 21:34:22 -0800 In-Reply-To: Cc: Enji Cooper , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org To: Olivier Certner References: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> <1990810.vR5SVPPSqJ@ravel> X-Mailer: Apple Mail (2.3826.700.81.1.4) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.995]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::630:from]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4dpkjF0Tllz3M3p --Apple-Mail=_64F372D2-2D56-4D15-9FBC-6196F027B3BA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 10, 2026, at 9:10=E2=80=AFPM, Enji Cooper (yaneurabeya) = wrote: >=20 > Hi Olivier, >=20 >> On Jan 9, 2026, at 8:44=E2=80=AFAM, Olivier Certner = wrote: >>=20 >> Hi Enji, >>=20 >>> The branch main has been updated by ngie: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df224591746bdaf14ad5f63de4738a314= 6cc2f55f >>>=20 >>> commit f224591746bdaf14ad5f63de4738a3146cc2f55f >>> Author: Enji Cooper >>> AuthorDate: 2026-01-04 08:27:57 +0000 >>> Commit: Enji Cooper >>> CommitDate: 2026-01-06 01:43:04 +0000 >>>=20 >>> Add ASMC_DEBUG make option >>=20 >> This commit broke the i386 build. I've just committed a fix. Also, = I've restored 'device vt_efifb' in NOTES (under 'x86/' instead of = 'amd64/'), as AFAIK, NOTES should list all possible devices/options. >=20 > re: vt_efifb: what I did was removed the duplicate entry, since it was = already in the x86 one: = https://cgit.freebsd.org/src/tree/sys/x86/conf/NOTES#n332 . Admittedly, my commit message re: it already being in GENERIC was wrong. = It being in x86/NOTES is what mattered. >> Please make sure you also MFC the two following commits (67599eef01f5 = ("sys/x86/NOTES: Add vt_efifb"), fde9fe18219f i386 ("Fix kernel = compilation after introduction of ASMC_DEBUG option")) along with the = original one. >=20 > Sure =E2=80=94 although the correct fix would be to not build the = driver at all on i386, since it doesn=E2=80=99t support 32-bit CPUs. = Apple sold very few i386-based Intel chips before they transitioned to = amd64-only ones (it was only a matter of 8-9 months IIRC) and asmc(4) = doesn=E2=80=99t support any of the 32-bit chips (I checked). Cheers, -Enji= --Apple-Mail=_64F372D2-2D56-4D15-9FBC-6196F027B3BA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jan 10, 2026, at 9:10=E2=80=AFPM, Enji Cooper = (yaneurabeya) <yaneurabeya@gmail.com> wrote:

Hi Olivier,

On Jan = 9, 2026, at 8:44=E2=80=AFAM, Olivier Certner <olce@freebsd.org> = wrote:

Hi = Enji,

The branch main has been updated = by ngie:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df224591746bdaf14ad5f63de4738a314= 6cc2f55f

commit = f224591746bdaf14ad5f63de4738a3146cc2f55f
Author: =     Enji Cooper = <ngie@FreeBSD.org>
AuthorDate: 2026-01-04 08:27:57 = +0000
Commit:     Enji Cooper = <ngie@FreeBSD.org>
CommitDate: 2026-01-06 01:43:04 = +0000

   Add ASMC_DEBUG make = option

This commit broke the i386 build.  I've = just committed a fix.  Also, I've restored 'device vt_efifb' in = NOTES (under 'x86/' instead of 'amd64/'), as AFAIK, NOTES should list = all possible = devices/options.

re: = vt_efifb: what I did was removed the duplicate entry, since it was = already in the x86 one: https:/= /cgit.freebsd.org/src/tree/sys/x86/conf/NOTES#n332 .
<= /div>

Admittedly, my commit message re: it = already being in GENERIC was wrong. It being in x86/NOTES is what = mattered.

Please make sure = you also MFC the two following commits (67599eef01f5 ("sys/x86/NOTES: = Add vt_efifb"), fde9fe18219f i386 ("Fix kernel compilation after = introduction of ASMC_DEBUG option")) along with the original = one.

Sure =E2=80=94 although the correct fix would be = to not build the driver at all on i386, since it doesn=E2=80=99t support = 32-bit CPUs. Apple sold very few i386-based Intel chips before they = transitioned to amd64-only ones (it was only a matter of 8-9 months = IIRC) and asmc(4) doesn=E2=80=99t support any of the 32-bit chips (I = checked).

Cheers,
-Enji= --Apple-Mail=_64F372D2-2D56-4D15-9FBC-6196F027B3BA-- From nobody Sun Jan 11 07:05:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpmjm0m1Nz6Nbm6 for ; Sun, 11 Jan 2026 07:05: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpmjl5Qsxz3TT8 for ; Sun, 11 Jan 2026 07:05:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768115115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TXZciDfFWotR/qn6D0wJ9dFcG0CWQbla+7r6JVsLyMQ=; b=hyjjJJjpWXWLt8NPUSs1P8aC+DLoWclzpLf80SFf1V5my7sRAzA9YrQIK2g+46QhEoWHwh Or6A/iLEZo+34v+IwSwVbpSpVekz0VnqdYZ+l2JHD3HG0ij6EorErx4iYfIgyDe8bzbe3x n2hw2L3kOikeq6vKfJduXXqrLtf9rjVPaFWIcUnvGi8sR1SyCGBduhzqeWZdvFEfz+qSB6 1C4n4zw6ypIbQgww3SB+0ssaiR7ahfDLiyIPi6VUuHtHa9wxmxX97nCnEeLxbeyrsfxTou Q61UApkKSJ1DdaR2IRKVcD+KozFnUxg1r02+ACp02zYK2q05T46ycNyT6QGw4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768115115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TXZciDfFWotR/qn6D0wJ9dFcG0CWQbla+7r6JVsLyMQ=; b=rnj9msaFMcKtdLWxwXQILpdAJsZN7o30dPS+aOemJ80sQz7hvqM5dWGX1d7OCV9TPAsxxk c8Xx5o6fohWoJ0jy+gbmrD6+3G0DMhgvL3gXaJ09tpUB2YIIvC0c5mcpdvulkyqDRvvqgK P2zXprVnuSEtFWDgyMGKUTSEVwwH7JMnjfavEBJBH0ASk6oklQrmiFBkbzZ44Oop91eXpc mnvd+1BwCbIgMxnr55AXQ3spBMFVpU6EuB/rYGt8QGUjXF2d4fG1PHE4jY1SmHuSciiR1a ocrtBvfXD+dO9jI9mIzsg1cNPVD/cNWXkl8Hucq66f4OisDhtYL7YLl77S99kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768115115; a=rsa-sha256; cv=none; b=nPJWNLAO3jK4nc5xlvMGkDuQBYsPd8JFdmY1HVzQYHIJRinQ0owhPqIM8JTISptbgvqskB jEgkE9vsoLgh9rrW5luNcfid+E0wIOuVrvGz2pih/N7PUoAWX4ssCG6bKDDrL9qObdRSOK VmnNvAeSWfuoOTDjp7m9LtPuY+o1ohEhp9s+7LHkVxsWNKriKz9vqd9DC7q3stvA7BHKTX 7jcuZ/05S2TQnolyV1wtO4PwedituZFZroBiUCroF9nr52C6u7G1JR6WNyLye9yNzqSEhR SWETpeCZ6mdf9PQ6ehdt3a4IRoOZGcCWVtpcfhzNmug2akj3Q/CVO/syzK1X+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpmjl3fHfzWTc for ; Sun, 11 Jan 2026 07:05:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3de26 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 07:05:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 7afa03963c44 - main - powerpc: fix release image building for Apple partitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7afa03963c448a14b1735a10eaf84941b0b74862 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 07:05:15 +0000 Message-Id: <69634bab.3de26.424af035@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=7afa03963c448a14b1735a10eaf84941b0b74862 commit 7afa03963c448a14b1735a10eaf84941b0b74862 Author: Adrian Chadd AuthorDate: 2026-01-11 03:59:41 +0000 Commit: Adrian Chadd CommitDate: 2026-01-11 07:04:57 +0000 powerpc: fix release image building for Apple partitions awk changed somewhere between 14 and 15 and it stopped accepting a hexadecimal number as its input - it will always return 0. This results in a very badly written apple boot block. So just remove it; do the math in shell. PR: kern/292341 Differential Revision: https://reviews.freebsd.org/D54639 Reviewed by: imp MFC after: 1 week --- release/powerpc/mkisoimages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/powerpc/mkisoimages.sh b/release/powerpc/mkisoimages.sh index 705545dead4b..ac02e2513e93 100644 --- a/release/powerpc/mkisoimages.sh +++ b/release/powerpc/mkisoimages.sh @@ -75,7 +75,7 @@ if [ -n "$bootable" ]; then # Apple boot code uudecode -p "`dirname "$0"`/hfs-boot.bz2.uu" | bunzip2 > $BOOTBLOCK OFFSET=$(hd $BOOTBLOCK | grep 'Loader START' | cut -f 1 -d ' ') - OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') + OFFSET=$((0x${OFFSET} / 512)) dd if="$BASEBITSDIR/boot/loader" of=$BOOTBLOCK seek=$OFFSET conv=notrunc bootable="-o bootimage=macppc;$BOOTBLOCK -o no-emul-boot" From nobody Sun Jan 11 13:44:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpxZc1qcyz6P0Wf for ; Sun, 11 Jan 2026 13:44: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpxZb5vVPz45Z3 for ; Sun, 11 Jan 2026 13:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768139079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+jSY9YClGpQ2LPeXiB0vI8rUwPIbLyPiqr0D32Wlmpg=; b=Jf/+jtbD4fNWOpkXXL5Wdbtby1v/v0+Q2lMR9e/bcp/Bwfy9koIbDZ8XQMcsWKsAXvkUSH 0KgcHVvn3HXnTHj17Qy4NbKFwSbQeBo0NNghhpG8HOvstzJznC0mk/TbmyU04FkbTNCySi 6Lad0Cq/r8UV0mUAxxalfiQBB+S44UnSC7AG9khlcrMIHqvm46KeW9xe94fMzhuRh1ArHV s+zqlG8w7daGfAgrTLY2MKc2rSS54j8Nu95+5cGkXM+2BRhttQ46HHEYqpwknoM7eMHFHI P7MCw6AmAWXuAHTuHf0fS+McNArvALp+5NEBDOyWfqM0Zu3rls9Hf1LvWSFdSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768139079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+jSY9YClGpQ2LPeXiB0vI8rUwPIbLyPiqr0D32Wlmpg=; b=gRhQ0MV592MOOvnQwQXT9vFe2oJcGrfMFM5mNwTZcOo4ykLb4nLDbyUjKR+s49D1o0YAyX hBxzln4ySavn4N4X0WncAJGMAFzZr1D/dW07rTOs6Pa9wnO76Jl6dFN2R7NZcMKaFAt4sS 6LwXXiPjlk8CqWeyR1vfH/1oM+0IYB7UtPjIxbB+L9mVt8DY9oxal432ZgEZym2rb361Z1 OB19sbYLmJVd4iW06tnZfUIagPU197m8O+ZoFLYQ9XnU5YKSFpJI4lo4/KtbKHbsWMHp2D KFlyAtm59lRlOGop9BUYR79j2w29ozPi3Duk0o+gG8MbiI/WrgtqiAE6oxHUyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768139079; a=rsa-sha256; cv=none; b=L2y4Wqv9lvOpMT1cue7qeXusFQAfJ7CcXbkZw7wNppsZH781c4UVgiNu/yVfOykBDeFRgd 0+2PO7RnUEFKBxck0hYNOBYQFbVZ/3huVPO1hna70bjwb1YAtrNgqikSv04MLJ7nfJI4mU xUNXx6upZbPD7iDYEsauvX36SfV0MKh873w8tr9ZIweP6l16t+DFkIK5TdB7Xy/HII4smW 144nQXEXDEdMht5YU7jjkc1cKh7lX8PD0HkGUg+YzN7n7vRNtjT01L51E02EdTgUrpbUXL oYTTtFCQpDY7Gb1UdSKtaFbgQVMLWymdQnsQ8+EUe6Y7KQKyGBfuRtXsMWQfAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpxZb4tC2zkLj for ; Sun, 11 Jan 2026 13:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42ee7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 13:44:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 8a21c17ccfec - main - kyua: Add "debug -x|--execute cmd" option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a21c17ccfecf0ee54becd46d3e08ccab76ca3d6 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 13:44:39 +0000 Message-Id: <6963a947.42ee7.1f4091b9@gitrepo.freebsd.org> The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=8a21c17ccfecf0ee54becd46d3e08ccab76ca3d6 commit 8a21c17ccfecf0ee54becd46d3e08ccab76ca3d6 Author: Igor Ostapenko AuthorDate: 2026-01-11 13:43:33 +0000 Commit: Igor Ostapenko CommitDate: 2026-01-11 13:43:33 +0000 kyua: Add "debug -x|--execute cmd" option With execenv=jail specified, the "cmd" runs inside the test's jail. Reviewed by: ngie, markj Differential Revision: https://reviews.freebsd.org/D52642 --- contrib/kyua/cli/cmd_debug.cpp | 82 +++++++++++++++++++++++++++++++++- contrib/kyua/engine/debugger.hpp | 7 +++ contrib/kyua/engine/scheduler.cpp | 3 ++ contrib/kyua/utils/cmdline/options.cpp | 20 +++++++-- contrib/kyua/utils/cmdline/options.hpp | 8 +++- contrib/kyua/utils/cmdline/parser.cpp | 20 ++++++--- contrib/kyua/utils/process/child.cpp | 24 ++++++++++ contrib/kyua/utils/process/child.hpp | 5 +++ contrib/kyua/utils/process/child.ipp | 20 +++++++++ 9 files changed, 178 insertions(+), 11 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index 978ccae0fdf1..060113d137fa 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -28,6 +28,10 @@ #include "cli/cmd_debug.hpp" +extern "C" { +#include +} + #include #include @@ -39,13 +43,20 @@ #include "utils/cmdline/parser.ipp" #include "utils/cmdline/ui.hpp" #include "utils/format/macros.hpp" +#include "utils/fs/path.hpp" +#include "utils/process/child.ipp" #include "utils/process/executor.hpp" +#include "utils/process/operations.hpp" +#include "utils/process/status.hpp" namespace cmdline = utils::cmdline; namespace config = utils::config; namespace executor = utils::process::executor; +namespace process = utils::process; using cli::cmd_debug; +using utils::process::args_vector; +using utils::process::child; namespace { @@ -62,6 +73,57 @@ const cmdline::bool_option pause_before_cleanup_option( "Pauses right before the test cleanup"); +static const char* DEFAULT_CMD = "$SHELL"; +const cmdline::string_option execute_option( + 'x', "execute", + "A command to run within the given execenv upon test failure", + "cmd", DEFAULT_CMD, true); + + +/// Functor to execute a program. +class execute { + const std::string& _cmd; + executor::exit_handle& _eh; + +public: + /// Constructor. + /// + /// \param program Program binary absolute path. + /// \param args Program arguments. + execute( + const std::string& cmd_, + executor::exit_handle& eh_) : + _cmd(cmd_), + _eh(eh_) + { + } + + /// Body of the subprocess. + void + operator()(void) + { + if (::chdir(_eh.work_directory().c_str()) == -1) { + std::cerr << "execute: chdir() errors: " + << strerror(errno) << ".\n"; + std::exit(EXIT_FAILURE); + } + + std::string program_path = "/bin/sh"; + const char* shell = std::getenv("SHELL"); + if (shell) + program_path = shell; + + args_vector av; + if (!(_cmd.empty() || _cmd == DEFAULT_CMD)) { + av.push_back("-c"); + av.push_back(_cmd); + } + + process::exec(utils::fs::path(program_path), av); + } +}; + + /// The debugger interface implementation. class dbg : public engine::debugger { /// Object to interact with the I/O of the program. @@ -103,6 +165,21 @@ public: } }; + void upon_test_failure( + const model::test_program_ptr&, + const model::test_case&, + optional< model::test_result >&, + executor::exit_handle& eh) const + { + if (!_cmdline.has_option(execute_option.long_name())) + return; + const std::string& cmd = _cmdline.get_option( + execute_option.long_name()); + std::unique_ptr< process::child > child = child::fork_interactive( + execute(cmd, eh)); + (void) child->wait(); + }; + }; @@ -127,6 +204,8 @@ cmd_debug::cmd_debug(void) : cli_command( add_option(cmdline::path_option( "stderr", "Where to direct the standard error of the test case", "path", "/dev/stderr")); + + add_option(execute_option); } @@ -151,7 +230,8 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, engine::debugger_ptr debugger = nullptr; if (cmdline.has_option(pause_before_cleanup_upon_fail_option.long_name()) - || cmdline.has_option(pause_before_cleanup_option.long_name())) { + || cmdline.has_option(pause_before_cleanup_option.long_name()) + || cmdline.has_option(execute_option.long_name())) { debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline)); } diff --git a/contrib/kyua/engine/debugger.hpp b/contrib/kyua/engine/debugger.hpp index 3c4d087f8ad0..ce87d41ed94d 100644 --- a/contrib/kyua/engine/debugger.hpp +++ b/contrib/kyua/engine/debugger.hpp @@ -58,6 +58,13 @@ public: const model::test_case&, optional< model::test_result >&, executor::exit_handle&) const = 0; + + /// Called upon test failure. + virtual void upon_test_failure( + const model::test_program_ptr&, + const model::test_case&, + optional< model::test_result >&, + executor::exit_handle&) const = 0; }; diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index a0719ec461ab..d04fc1dfbd3d 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -1403,6 +1403,9 @@ scheduler::scheduler_handle::wait_any(void) if (debugger) { debugger->before_cleanup(test_data->test_program, test_case, result, handle); + if (!result.get().good()) + debugger->upon_test_failure(test_data->test_program, test_case, + result, handle); } if (test_data->needs_cleanup) { diff --git a/contrib/kyua/utils/cmdline/options.cpp b/contrib/kyua/utils/cmdline/options.cpp index 61736e31c11e..9d448503e3f9 100644 --- a/contrib/kyua/utils/cmdline/options.cpp +++ b/contrib/kyua/utils/cmdline/options.cpp @@ -53,15 +53,18 @@ namespace text = utils::text; /// purposes. /// \param default_value_ If not NULL, specifies that the option has a default /// value for the mandatory argument. +/// \param arg_is_optional_ Specifies if a value must be provided or not. cmdline::base_option::base_option(const char short_name_, const char* long_name_, const char* description_, const char* arg_name_, - const char* default_value_) : + const char* default_value_, + bool arg_is_optional_) : _short_name(short_name_), _long_name(long_name_), _description(description_), _arg_name(arg_name_ == NULL ? "" : arg_name_), + _arg_is_optional(arg_is_optional_), _has_default_value(default_value_ != NULL), _default_value(default_value_ == NULL ? "" : default_value_) { @@ -164,6 +167,16 @@ cmdline::base_option::arg_name(void) const } +/// Returns optionality of the argument. +/// +/// \return The optionality. +bool +cmdline::base_option::arg_is_optional(void) const +{ + return _arg_is_optional; +} + + /// Checks whether the option has a default value for its argument. /// /// \pre needs_arg() must be true. @@ -558,9 +571,10 @@ cmdline::string_option::string_option(const char short_name_, const char* long_name_, const char* description_, const char* arg_name_, - const char* default_value_) : + const char* default_value_, + bool arg_is_optional_) : base_option(short_name_, long_name_, description_, arg_name_, - default_value_) + default_value_, arg_is_optional_) { } diff --git a/contrib/kyua/utils/cmdline/options.hpp b/contrib/kyua/utils/cmdline/options.hpp index f3a83889e491..d11de14af514 100644 --- a/contrib/kyua/utils/cmdline/options.hpp +++ b/contrib/kyua/utils/cmdline/options.hpp @@ -91,6 +91,9 @@ class base_option { /// Descriptive name of the required argument; empty if not allowed. std::string _arg_name; + /// If the option can be used without an explicit argument provided. + bool _arg_is_optional = false; + /// Whether the option has a default value or not. /// /// \todo We should probably be using the optional class here. @@ -101,7 +104,7 @@ class base_option { public: base_option(const char, const char*, const char*, const char* = NULL, - const char* = NULL); + const char* = NULL, bool = false); base_option(const char*, const char*, const char* = NULL, const char* = NULL); virtual ~base_option(void); @@ -113,6 +116,7 @@ public: bool needs_arg(void) const; const std::string& arg_name(void) const; + bool arg_is_optional(void) const; bool has_default_value(void) const; const std::string& default_value(void) const; @@ -219,7 +223,7 @@ public: class string_option : public base_option { public: string_option(const char, const char*, const char*, const char*, - const char* = NULL); + const char* = NULL, bool = false); string_option(const char*, const char*, const char*, const char* = NULL); virtual ~string_option(void) {} diff --git a/contrib/kyua/utils/cmdline/parser.cpp b/contrib/kyua/utils/cmdline/parser.cpp index 5c83f6d69cc4..29dd4612f6ad 100644 --- a/contrib/kyua/utils/cmdline/parser.cpp +++ b/contrib/kyua/utils/cmdline/parser.cpp @@ -88,7 +88,10 @@ options_to_getopt_data(const cmdline::options_vector& options, long_option.name = option->long_name().c_str(); if (option->needs_arg()) - long_option.has_arg = required_argument; + if (option->arg_is_optional()) + long_option.has_arg = optional_argument; + else + long_option.has_arg = required_argument; else long_option.has_arg = no_argument; @@ -96,7 +99,7 @@ options_to_getopt_data(const cmdline::options_vector& options, if (option->has_short_name()) { data.short_options += option->short_name(); if (option->needs_arg()) - data.short_options += ':'; + data.short_options += option->arg_is_optional() ? "::" : ":"; id = option->short_name(); } else { id = cur_id++; @@ -320,9 +323,11 @@ cmdline::parse(const int argc, const char* const* argv, for (cmdline::options_vector::const_iterator iter = options.begin(); iter != options.end(); iter++) { const cmdline::base_option* option = *iter; - if (option->needs_arg() && option->has_default_value()) + if (option->needs_arg() && option->has_default_value() && + !option->arg_is_optional()) { option_values[option->long_name()].push_back( option->default_value()); + } } args_vector args; @@ -357,8 +362,13 @@ cmdline::parse(const int argc, const char* const* argv, if (::optarg != NULL) { option->validate(::optarg); option_values[option->long_name()].push_back(::optarg); - } else - INV(option->has_default_value()); + } else { + if (option->arg_is_optional()) + option_values[option->long_name()].push_back( + option->default_value()); + else + INV(option->has_default_value()); + } } else { option_values[option->long_name()].push_back(""); } diff --git a/contrib/kyua/utils/process/child.cpp b/contrib/kyua/utils/process/child.cpp index 36b6b6b3e51f..c51c39e6d1ff 100644 --- a/contrib/kyua/utils/process/child.cpp +++ b/contrib/kyua/utils/process/child.cpp @@ -235,6 +235,30 @@ process::child::fork_capture_aux(void) } +std::unique_ptr< process::child > +process::child::fork_interactive(void) +{ + std::cout.flush(); + std::cerr.flush(); + + std::unique_ptr< signals::interrupts_inhibiter > inhibiter( + new signals::interrupts_inhibiter); + pid_t pid = detail::syscall_fork(); + if (pid == -1) { + inhibiter.reset(); // Unblock signals. + throw process::system_error("fork(2) failed", errno); + } else if (pid == 0) { + inhibiter.reset(); // Unblock signals. + return {}; + } else { + signals::add_pid_to_kill(pid); + inhibiter.reset(NULL); // Unblock signals. + return std::unique_ptr< process::child >( + new process::child(new impl(pid, NULL))); + } +} + + /// Helper function for fork(). /// /// Please note: if you update this function to change the return type or to diff --git a/contrib/kyua/utils/process/child.hpp b/contrib/kyua/utils/process/child.hpp index 3e00cea8752c..fbe32311a05b 100644 --- a/contrib/kyua/utils/process/child.hpp +++ b/contrib/kyua/utils/process/child.hpp @@ -80,6 +80,8 @@ class child : noncopyable { static std::unique_ptr< child > fork_capture_aux(void); + static std::unique_ptr< child > fork_interactive(void); + static std::unique_ptr< child > fork_files_aux(const fs::path&, const fs::path&); @@ -92,6 +94,9 @@ public: static std::unique_ptr< child > fork_capture(Hook); std::istream& output(void); + template< typename Hook > + static std::unique_ptr< child > fork_interactive(Hook); + template< typename Hook > static std::unique_ptr< child > fork_files(Hook, const fs::path&, const fs::path&); diff --git a/contrib/kyua/utils/process/child.ipp b/contrib/kyua/utils/process/child.ipp index beb2ea3b0b0a..86bc01fc0d6e 100644 --- a/contrib/kyua/utils/process/child.ipp +++ b/contrib/kyua/utils/process/child.ipp @@ -104,6 +104,26 @@ child::fork_capture(Hook hook) } +template< typename Hook > +std::unique_ptr< child > +child::fork_interactive(Hook hook) +{ + std::unique_ptr< child > child = fork_interactive(); + if (child.get() == NULL) { + try { + hook(); + std::abort(); + } catch (const std::runtime_error& e) { + detail::report_error_and_abort(e); + } catch (...) { + detail::report_error_and_abort(); + } + } + + return child; +} + + } // namespace process } // namespace utils From nobody Sun Jan 11 14:08:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpy615HWjz6P29k for ; Sun, 11 Jan 2026 14:08: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpy611q6qz47DN for ; Sun, 11 Jan 2026 14:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768140505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Us0ve7xmqGiEgtZLVj5EFTxbHLZcv6mHaow1OpcVRVo=; b=ptXDGSz2ujH69OAxsIpi02F86n0tCQTqscFZWJ3J+YbeNix/MePeGF9/Rt7nvKIwi6QNgn pTGXIR6ZtOmWwVM5ZijM2VLyYBrFAU9WuE+z/A+kSG5HwQRw626sFvgOmwECLg8i+9wyJ6 tmeOc+3luMb7ovz1Xsb0YCcMHS5CT8yWehHFRzerfMMCebggN/WiDDr9YxaJJamWEzSXhm GUmLLm70DpWBnAROJkRr29aFBxB0YTiwjcIhgm32/vlvcfQNI8jCVVpaj6tH8WjlYBmEQM dGqFsqg3tO5iPdEI7zOx9SaUcf7oZGBdvNHI297TKXwyrKm2B3PdBQ3Ru9xyRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768140505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Us0ve7xmqGiEgtZLVj5EFTxbHLZcv6mHaow1OpcVRVo=; b=wqFP/lIxOE5IF2aogE446MX+CsdvjbZy0kBV8i8wGxHZudaNrQQz69xDglZ468nnXOhHP7 XeyNP7faTp+ArxKZwTT6w7Xz5sDt62jEZorm0EkvY+vX+tpOOBNIelLCBBYzfgZ/ENmaN/ er21m9WAnbVmzo6PQgCGVOJkR/JvGzKpBptACSRnSx/4x4NkcYPQ68J6V2awegVd+/Z6pl w8gx+VMt23ZZ4VvR52SxlMlU8MrjkIC4UFi8pmT7HFADb1wnLTGjeyt5ALn0jio3ehTw9q AfZQgP2hs11P4ecDcmspdvN2UApqIQND2m8bPNc7wktQGMCI70ScE4nuOUKU1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768140505; a=rsa-sha256; cv=none; b=BamsD6nMfNwrRmrv5HbqRdljGJ17EkDktgzUD6eBuH+hhiZ5Gyq7oYLYhvhof5wyp1MQ7u YgTi2MvXxyRIfeSZwKqlcC5roeXJMy/rFsJ5oPT/pDjKFXGSqeDo/4ehCk1gPY6oVBlPDK d1CH8ppzcgRTKSzADB+ExruvuKWIlMFQe46IlW4y4cJ3CTsTwbxEoZWrcIWm323T119pd9 EVcelHqiPingBesR3xyVQqc350EVYr6FR9L5V8UqllyOvIuvrzXrf8zg4a+0ZDrllEkKhI VW8fgh3RKqadbtXeNEFUsgCZwo/mHhLseaQXl8Qxfj3414pbrH/QZsi1vBvLTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpy610MdQzkS8 for ; Sun, 11 Jan 2026 14:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 472a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 14:08:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 717ae163919e - main - newfs: Add -u to getopt string List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 717ae163919e48f000b94f85dc188e0d92261929 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 14:08:25 +0000 Message-Id: <6963aed9.472a2.110aec89@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=717ae163919e48f000b94f85dc188e0d92261929 commit 717ae163919e48f000b94f85dc188e0d92261929 Author: Dag-Erling Smørgrav AuthorDate: 2026-01-11 14:07:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-01-11 14:08:21 +0000 newfs: Add -u to getopt string Fixes: 68562f8145e8 ("newfs: Add an option to disable soft updates") --- sbin/newfs/newfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 61448dd1fce3..78f0bfcf458d 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -129,7 +129,7 @@ main(int argc, char *argv[]) part_name = 'c'; reserved = 0; while ((ch = getopt(argc, argv, - "EJL:NO:RS:T:UXa:b:c:d:e:f:g:h:i:jk:lm:no:p:r:s:t")) != -1) + "EJL:NO:RS:T:UXa:b:c:d:e:f:g:h:i:jk:lm:no:p:r:s:tu")) != -1) switch (ch) { case 'E': Eflag = 1; From nobody Sun Jan 11 16:50:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dq1j22bNzz6NDZl for ; Sun, 11 Jan 2026 16:50: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dq1j21pZ2z3QXL for ; Sun, 11 Jan 2026 16:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768150230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iXcBm+Jgl1gbOBX4pU8+ZZThRaC8A+nkPiCKE3gGm+U=; b=boumaMiCEMUnHxtTq4CCW0Sg89iMMF3tmeXAByoT5eOVlH9KrVeCenGvDScgCbJzAUl+O8 xGk7dRX4hniLZ5VoK8Ha02Qq9HGSukzGG4+t7UWXhctNNiSpTcSKHxla+agon2tYv6GYUf deIZPpQum6j/TZQ0ipcJEKRXc+hKtLX73ENXPncBZRJlG6/2nkwlFIMIXd47fbUabB1HQa UhyUIPjrri2JDp7GSOAwZcDRpUcnz9Zl4jNkLACPsKsJBra+dHDYNbaURmmR6EupPG7bfh N0Pordb+p7eofuOcjLFiUKb07N/eKg1464wo+3TaSSq24RPhFIQdlk2wpNNsyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768150230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iXcBm+Jgl1gbOBX4pU8+ZZThRaC8A+nkPiCKE3gGm+U=; b=JcELujzt8mjv2RnsGJLFMa5lKppWrczapYNlMk6zlacmkrTWV3Kei7804pmW395Hi1oV0H Um0qDCDwLcM76lS/nH9XN5+DNrexwuX6gr8imBMN1G+FdppkuwNGaQ6IEZ4/eB6wFeK+OV +3cFcsyb9nBKpbz9QFxKoIAS3HKnpCT1MhUpsmbgOVdoY1bTMROwR3IK55hh5KALvZacB0 nrD4OsBOdUmILSzhH5DnqrOZAM7g8OV2U7mIXDZtfofA+AJ/V8bSv/H6CUJKla/ZRnDJlJ +HFBg+SPUqsahwNvgfdZy+5fb3hV4SfU+rKcxsC78ThxfAX95/DR4mbPQfyH4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768150230; a=rsa-sha256; cv=none; b=ORSDZOTfMxML/W/OIct6UiVFLPEMLqr3NdlvYGHYQFEjQcFSXiYESZvoHJSnBYElho3/wR 4/Fx2lqbq8L9lYzwtawqe+ronyTOWsxYBE56Hz6wARUAgxdMCTn0pzn/2qCjk8Er7PxUpw yZZ/TziWeuhFAqDVq3acFna4cEsSYEkTZMHnI/bRURPO/FkVUMhyFDRMjHuiJPRwitB7nl dBLsXN2WtTL+nwQlHIFvS85Oo/OGxoGO0DV4eTMr+FIbjw2C+Qj5zmHL3yKlx+NpOxhEYI oZYOwzSwBWVlxmUx0FTEVmaLuq9pVNni9VhUoDkQC+zWSZ81K6fMK5Rs4eh9jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dq1j21GvGzq4Q for ; Sun, 11 Jan 2026 16:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25e7b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 16:50:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 4250d2ad991b - main - Import latest mtree from NetBSD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4250d2ad991b7bb9915e4c6b6d93b17369747ff0 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 16:50:27 +0000 Message-Id: <6963d4d3.25e7b.7b2dbff8@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4250d2ad991b7bb9915e4c6b6d93b17369747ff0 commit 4250d2ad991b7bb9915e4c6b6d93b17369747ff0 Merge: 717ae163919e 7e59b238fcf3 Author: Jose Luis Duran AuthorDate: 2026-01-11 16:42:18 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-11 16:42:18 +0000 Import latest mtree from NetBSD Merge commit '7e59b238fcf32f3d365e78ddc702ca494e1ff68d' This commit partially reverts the previous vendor import, given that the "type" keyword has been historically mandatory and should not be removed by "-R all". This was clarified in the man page. Reported by: glebius PR: 219467 MFC after: 1 week contrib/mtree/create.c | 7 +++---- contrib/mtree/mtree.8 | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 16 deletions(-) From nobody Sun Jan 11 17:56:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dq39324Zrz6NJF6 for ; Sun, 11 Jan 2026 17:56: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dq3930QP9z3YgM for ; Sun, 11 Jan 2026 17:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768154183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b/gjTLegSzvw7i9WPtOHh8udu37nhb2hsGwLlP41kWA=; b=MrMbW9APk8qNkuwKcZ0YOZKuYoIsRNWq7uUuckleL+OfHzPB3XNceOCaBole4vwFwxYGvK kAuGzv2sm/RlB63CK6Oar2GgHRLLodQpzPynNTjrQ8hroGaIimT69vOWZfj3wPoFI7ZD1s uuVdH+wHtnHw7XaTMP3QvvwFLk2aP6U5R8fiQVdRiRZnxNT/c/BuG4lcN2WkbbEphZXhmP m/h+T/TlcZgCoJC4EPMTx7y+T7QcO46ostGYNJvVRnxHMvBMcPjexZcBZ64NSmPPTqebAH jP0d3RQjHbc7K6FNf/TjWEOwMdnnHruZiullMork+chuCfE/6v2lDMEEYybQbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768154183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b/gjTLegSzvw7i9WPtOHh8udu37nhb2hsGwLlP41kWA=; b=nZciTij+2pJJDLWMj5IP7PKsZbuNBzwqAOtoDdDjGPlUnwzifVmV79A32uxF6vtaYHkhEL OcpQf4meyrSbXbMUaPEHJgWJ2TiO6zr1nXHdrvWMY5NHMOawWxBtfI5LtR9k5itbCcmKaV MUNYeWKyWqx+CaWaB1MvejmSzT+zuX1yL5FlMq5HMGo68vj/9fa+FoPzT3C7xClKr1k2T0 8kH8ATS7WVSj0GorATayQVCAht+8IQ1z21fwJVc4E4/q+HgKvALk0UVJXY0TC2zTGI0OiM Aj1z2rv7ga/cf30Mh3WbNZMyjk+/XdBGjmQgv+4Xs7K2oYn0Jqrgu7DkGbm1+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768154183; a=rsa-sha256; cv=none; b=pm/2Efioba2QDr/SnYaaWmpIYWfFgZysyZbiD/D36UK9t8HiIJhm49IMBIqKmHExbZ5235 l4NlHyWskpPdDIqOE1+a24bI3+M73fF2y9vIfmkg15qrPDUL8fKa5t0YQ4YBx5PRFc3zBJ +DaEO8T9RnW7rN1mPlztBjVlKQEcjwbS9j17NNzQ6wvlCDNCFyCckWRT+QGISgw92LTWdO ACio3s7WWp++l/ucWDEWB4UXf3lQHUvJxS7dbP0ZBESR88uDdV6cMn1DLYrhDE7DpdCcGp AIbVgAU7uE2zKXLOHLaDzxNEMUxegpUCQ05IE280K226WIX6cmzrfd/TimV86w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dq3926V2YzrV0 for ; Sun, 11 Jan 2026 17:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36049 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 17:56:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Craig Leres Subject: git: da5d94d29a5e - main - Remove obsolete BUGS section from zgrep(1) man page, add test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: leres X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da5d94d29a5ec29817476c39ae2b2ad1666c3f06 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 17:56:22 +0000 Message-Id: <6963e446.36049.308ac183@gitrepo.freebsd.org> The branch main has been updated by leres: URL: https://cgit.FreeBSD.org/src/commit/?id=da5d94d29a5ec29817476c39ae2b2ad1666c3f06 commit da5d94d29a5ec29817476c39ae2b2ad1666c3f06 Author: Craig Leres AuthorDate: 2026-01-10 00:34:39 +0000 Commit: Craig Leres CommitDate: 2026-01-11 17:53:55 +0000 Remove obsolete BUGS section from zgrep(1) man page, add test I forgot to check/update the man page with D54217. While here add a test for multiple -e flags. Reviewed by: markj Approved by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54632 --- usr.bin/grep/tests/grep_freebsd_test.sh | 11 +++++++++++ usr.bin/grep/zgrep.1 | 18 ------------------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/usr.bin/grep/tests/grep_freebsd_test.sh b/usr.bin/grep/tests/grep_freebsd_test.sh index eaf3694c2b1e..ae9a9c1274f3 100755 --- a/usr.bin/grep/tests/grep_freebsd_test.sh +++ b/usr.bin/grep/tests/grep_freebsd_test.sh @@ -126,6 +126,16 @@ qflag_body() atf_check zgrep -q '1 2' in } +atf_test_case eflags +eflags_body() +{ + # Test use with more than one -e expression + printf "aaa bbb ccc\n111 222 333\ndon't match this line" > in + + atf_check -o 'inline:aaa bbb ccc\n111 222 333\n' \ + /tmp/zgrep.sh -eaaa -e333 in +} + atf_init_test_cases() { atf_add_test_case grep_r_implied @@ -134,4 +144,5 @@ atf_init_test_cases() atf_add_test_case zflag atf_add_test_case color_dupe atf_add_test_case qflag + atf_add_test_case eflags } diff --git a/usr.bin/grep/zgrep.1 b/usr.bin/grep/zgrep.1 index 76eb145db82d..7fa42c916002 100644 --- a/usr.bin/grep/zgrep.1 +++ b/usr.bin/grep/zgrep.1 @@ -92,21 +92,3 @@ This version of the .Nm utility was written by .An Thomas Klausner Aq Mt wiz@NetBSD.org . -.Sh BUGS -.Xr zgrep 1 -does not handle flags that take arguments if there is no whitespace -between the flag and the argument, for example: -.Pp -.Dl "zgrep -enfs /etc/rpc" -.Pp -When more than one -.Fl e -flag is used matching -should occur for any of the patterns (similar to multiple patterns -supplied in a file with the -.Fl f -flag). -.Xr zgrep 1 -only matches the last -.Fl e -pattern. From nobody Sun Jan 11 20:01:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dq5x51XP9z6NRll for ; Sun, 11 Jan 2026 20:01: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dq5x50qrpz3nfy for ; Sun, 11 Jan 2026 20:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768161673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dMBA//gzX8BS/Iay685Bq7fX3sIYJUzt08SCYekc/sA=; b=OR69ddvRSHo+40I4mQhdkTUzZISA26KMHv7p7+g129L/uArpu/W9zI8j0JBxEuuBZF/3NO 9Kr/5IkKhEMvd5paDc4PLMC7Z1nbxRo3xFuIKDi7EUz+GYcA7ISnSuUMMAYT8zNoIvg/mw tx7bvMjny7FUqZLsJDPOJ6kE/bvWH5NeiXxdX62GwPOkIrDzPxibjz6qscHd5njlSLOvug TKh3syFpmKDyK/zoDA1xiD9FXg+uZdaMOg3e2TqJPpdC1DZ//BXlYtNgZYCyAerahbFtw3 Y3OuLcGjYuA/scQ3mMz70NAa1utt/cP5oQGVaSXqK1HjKlK6P8Kzt1C0O3z41g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768161673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dMBA//gzX8BS/Iay685Bq7fX3sIYJUzt08SCYekc/sA=; b=dG0wemGKS53JczlOasbTz/hs3RhvEvM7UdhxTmPfuPUHsgbk0icjNObUPs+014dQCpqL++ Fw0XoZzuKMc/NUSuB2/grnCxaCEHj1uKf8bl3CClKhN1FlhcE1qsjuQ0nvMBle4JYsiHui 8dS11sr8KsDuIUTNH90pjAWyj9EkauanumTukaAS3F5QL2RWiBcszUXxbH1DXjouWrxLAO 9y0NVjvhwqfq8Bf0xjxjr3MlGm51+yGNi/7FSvbw2KwvJrGJg0VOIkdzliym0rVnUfNclc vahD3QgUmX0l6YbWb8RgbGKnT5c0YzyzJ68DMPqt9q1y7UCFc21ATKpmfM5yUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768161673; a=rsa-sha256; cv=none; b=PXscN4XBJiclOi+089w+IhGpj8VyzLM58KFxZDMi80Puzt5HFxEJ+jRh3ec5xl3A3GUhyK +Sxdr3c9sgvyeGOF+bDD6d24d01RRtKu3b5Ln3xt/GAzDrJC1+rt76dCRyXDqo5Omm4fi3 +N9LKwE8z/F84zY6fLvayrI+cOKxmwDFW2NCPf8AodPTNVjPi91JWmZfw3r/76hH8yIzxo CFRtiSx/M4gIOvtsWI8VJVVAVJ7a27vwRJTuvp2mwY2sm5yY0lrQPG1jkwCiMjlXPSoVu1 LCXIOPhnd4YznVKNtaEJhUy2mZ9ue2HooWZcSXcs+u8zDAVnZppQac9732QCtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dq5x50LfVzvTn for ; Sun, 11 Jan 2026 20:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a58a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 20:01:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9b54998d1bdd - main - MAINTAINERS/CODEOWNERS: Add myself to mpr, mps and mpi3mr List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b54998d1bdd5098d5538052024f88edcd625b4f Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 20:01:13 +0000 Message-Id: <69640189.a58a.34b68876@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9b54998d1bdd5098d5538052024f88edcd625b4f commit 9b54998d1bdd5098d5538052024f88edcd625b4f Author: Warner Losh AuthorDate: 2026-01-11 06:22:41 +0000 Commit: Warner Losh CommitDate: 2026-01-11 19:36:02 +0000 MAINTAINERS/CODEOWNERS: Add myself to mpr, mps and mpi3mr Yea, I realize these are decaying, but I'm going to take a run at automatically tagging reviews for github pull requests. I suspect that tagging will help with the 'stale' issues with at least CODEOWNER. As better data becomes available, especailly for contrib, I'll update things. Sponsored by: Netflix --- .github/CODEOWNERS | 3 +++ MAINTAINERS | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 98ef1f5db2ce..63d8e9869c1c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -83,6 +83,9 @@ /sys/dev/iscsi/ @trasz /sys/dev/nctgpio/ @stephane-rochoy-stormshield /sys/dev/ncthwm/ @stephane-rochoy-stormshield +/sys/dev/mpi3mr @bsdimp +/sys/dev/mps @bsdimp +/sys/dev/mpr @bsdimp /sys/dev/nvd @bsdimp /sys/dev/nvme @bsdimp /sys/dev/pci @bsdimp @bsdjhb diff --git a/MAINTAINERS b/MAINTAINERS index e32822f8675d..fd3d4c40d508 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -70,6 +70,9 @@ lpr gad Pre-commit review requested, particularly for nanobsd imp Pre-commit phabricator review requested. net80211 adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org nfs freebsd-fs@FreeBSD.org, rmacklem is best for reviews. +mpi3mr(4) imp Pre-commit review requested. +mpr(4) imp Pre-commit review requested. +mps(4) imp Pre-commit review requested. nvd(4) imp Pre-commit review requested. nvme(4) imp Pre-commit review requested. nvmecontrol(8) imp Pre-commit review requested. From nobody Sun Jan 11 22:32:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dq9Hh3JRVz6Nc9P for ; Sun, 11 Jan 2026 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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dq9Hh2B7kz45wj for ; Sun, 11 Jan 2026 22:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768170752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a088oaYQejapS+ZMRkBza8uxYgvB8x08z8XrfANDC9Q=; b=soTV96/4fU0lJP9t69ds2DFi5koeJkNv/E9UPIznshreiDstKyhIt4Xhq/h/UCqmImGq/E RNvGZO7X1edAqEHdYHVIDTDEXUcgKaIEwWgtKqboTXd9ppdxi5Nf/JMUo1o51Bt3BWcTAd o1HeCuc0b1ujlTW7hRuHy38DHIbQ+ke8w1Qt2reMycXE/Grr68pUkGYHxYoqIfMddhs7B+ XAErenOsCXWfE6l6+SPyILVNhKSaYtfIu40IvtI5vyZG1F5g8mfwFCKhiukL+pXAiEix7n P6TxmddSIQbazH2kJhzwz+ap0N/haS0EaCtv5L7/5dZ3EXR1x2lYpSESiTYysg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768170752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a088oaYQejapS+ZMRkBza8uxYgvB8x08z8XrfANDC9Q=; b=HpiIPA2+RgGMwd0Z6fQWSkssfmzPhtpEsEIKDPAds+91GMQrR7wNl7HiDREivzf8mUJy0t wW60IVh9s92/oFx1kisj91X/C3y09A2kZMMqmaOudon0C2PKa8bmpWb+hACV5GUxWmGNbj 8Hf96U+oXUprD5fMtmvq28OyAPOz4UcMwYraRAChYnFvQlbR1eaJYS5qb0gbVWvYVv8OxA 2tbSoersFPNn02vcbGxkoSAigYmlHoHb6NU7K9qZGAyHudXfbTHZ0KB4RrEnwtNu4Mjisn nxCPXEqHdduj98u6J6dUaiJ8Sml66OVpwCNi7fzNZfAcFuRtUn9G6OTc4ZNrcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768170752; a=rsa-sha256; cv=none; b=Sa3iyD47WHciy72ZkDUKnuoVz/WqOXKNKQqS+ZyhGVLuCZMUmy9/eAFMqU3E3PVqwk+Rrd 7eNs9bDaLdVRZ/FvdjdHKfgHJ9X+m4zJY99Zk0wcPd14n8YsqnRR/tNAMUgZ6yZv6hhhmD AWO2E84ct41IMqKxiiRl18d89mnvw7cmUMsvV91LcZT2quFb6DkVgWwI35Pi0h/Ui0VOC6 /ePFZUWbBuIyp+z8nD2xk3fGn48jxYLPd6hpgX6fhOVyHc53LdAcTHJdOu0BuDrOgbyKr+ xAjFADPPSj19pYoysjzxaJGbkSQu7LaA22yuAVsRumucmYD+QL8JpJ73DERinQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dq9Hh1FMhz10qr for ; Sun, 11 Jan 2026 22:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2786d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 22:32:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: b558c92fd000 - main - EC2: Add extra SSM Parameter names for releases List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b558c92fd0005d311edbcd02953c17d4a34fb909 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 22:32:32 +0000 Message-Id: <69642500.2786d.2bc0b399@gitrepo.freebsd.org> The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b558c92fd0005d311edbcd02953c17d4a34fb909 commit b558c92fd0005d311edbcd02953c17d4a34fb909 Author: Colin Percival AuthorDate: 2026-01-11 22:25:51 +0000 Commit: Colin Percival CommitDate: 2026-01-11 22:32:24 +0000 EC2: Add extra SSM Parameter names for releases Record releases in the SSM Parameter Store not just as e.g. /aws/service/freebsd/arm64/small/ufs/15.0/RELEASE but also as .../RELEASE/latest, e.g. /aws/service/freebsd/arm64/small/ufs/15.0/RELEASE/latest The latter parameters will be updated when new AMIs are built with security and errata updates appplied, and have been backfilled for 15.0. MFC after: 3 days MFC to: stable/15 (14.x will not get security-update AMIs) Sponsored by: Amazon --- release/Makefile.ec2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index 47561feefc23..c33345201b36 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -61,6 +61,9 @@ cw-ec2-portinstall: .for _FL in ${EC2_FLAVOURS:tl} .if defined(SSMPREFIX) && !empty(SSMPREFIX) SSMOPTS_${_FL}_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/${_FL}/${_FS}/${REVISION}/${BRANCH} +.if ${BRANCH} == "RELEASE" +SSMOPTSEXTRA_${_FL}_${_FS}= --ssm-name-extra ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/${_FL}/${_FS}/${REVISION}/${BRANCH}/latest +.endif .endif EC2AMILIST+= ec2ami-${_FL}-${_FS} CLEANFILES+= ec2ami-${_FL}-${_FS} @@ -84,7 +87,8 @@ ec2ami-${_FL}-${_FS}: cw-ec2-${_FL}-${_FS} ${CW_EC2_PORTINSTALL} @false .endif /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ - ${EC2ARCH} ${SSMOPTS_${_FL}_${_FS}} ${BOOTMODEOPT} --sriov --ena \ + ${EC2ARCH} ${SSMOPTS_${_FL}_${_FS}} ${SSMOPTSEXTRA_${_FL}_${_FS}} \ + ${BOOTMODEOPT} --sriov --ena \ ${.OBJDIR}/${EC2-${_FL:tu}${_FS:tu}IMAGE} \ "${AMIBASENAME} ${_FL} ${_FS:tu}" \ "${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \ From nobody Sun Jan 11 23:18:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dqBJd5pYwz6Nfrx for ; Sun, 11 Jan 2026 23:18:25 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dqBJc6LXSz49kZ for ; Sun, 11 Jan 2026 23:18:24 +0000 (UTC) (envelope-from ctuffli@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of ctuffli@gmail.com designates 209.85.215.171 as permitted sender) smtp.mailfrom=ctuffli@gmail.com Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-ba599137cf8so1745280a12.0 for ; Sun, 11 Jan 2026 15:18:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768173503; x=1768778303; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=M8HkODoNvUiuShebxlYa55EziAHQDlCTZbo9b7KE5/s=; b=YqOcv4BOaZy5UzlCuAqNdUJYqyOyCeP/CjgJd83TFlzAfELBHMqLEs3vymGR8qDcia 3hhNmPP6+xUMerV+4g9GN2m7WiJ4/bMDmlYDXvXreT93gFr3pNDCSTksOlFxeOOmiKHH s7oM0gFuwjGzbkyooRHKv63ckw5wtJiJ9B465CWOlTByTCJ3ah7MEMuJIic841/dbdQS oU37JUQ5a9SnhkZ36vOFM+CMbpqAZTmvh70/luykmqijteia8irpl4vefTCFQesZUOY4 0woq2nMYTy/hWieBSWlXba8IM4WJRooE2S2s9kV2ZUy7+F2YmtqSGa4fFKDeDJQv/Rqr r3wQ== X-Forwarded-Encrypted: i=1; AJvYcCW+DoBkcLCPSzccY2AENYMVhOxdMC1+Lptc/ymcK1iZL1cI3Kn617URQESQ8O13jSXFNwCqlve099PTn5B8vOch3Z45jA==@freebsd.org X-Gm-Message-State: AOJu0YxY8oijlFG77OEHM5d+GpT8+e8K0/OjkqE2i2to/wbLa7SL3tO6 mQtG7v2bGK3Q5XC7U34Y1mBRrMOw5XqCUW91nE+OCe0Xgbtbe+Sw7YK+Zphuxg== X-Gm-Gg: AY/fxX4l0sOMCko91F8f7o5cu4auIkuUtRSqdCh4rJP6G9+74SSfid6AZeREgQtHoPS qECP2RYeZZZfw64OXKQshb6baGVd/zTPdjAh51gPmCVayjAAQaJpeMXdobTDRiPMev+LD9a/6mk 7I7uMkceviDuCsOIH6Q/kK/PXoG7yvBn8GoWHVFuWfpdPQm66VAXC/qZWlcj8jvx431/iXH/Pg+ e98N9mgOYt9ydD6q/6x3qA2f8vcVWXaYwU/m6gQtoEGGb4gfCiovQZ2u+ui2XBgLNIkU29s1e+u gAfMF24/yQOTNlNTAreCQeXdXVIKr6aPrTfTFE9X1qJA7Vp1f4u/fNifXzSoIKLmEfP/vggJrcG hobCybe1x9vBTNfrUlmwiJPLPuPzh+MUFT54tWZWQmUh+q6lAki8YOg1qVyTg5MizxopC6XOrZ0 9CsglPNIRRaU3ORK7+8zuuzy0zwfAV164fdsVONcavN4eo5Xkv7L0tMTw= X-Google-Smtp-Source: AGHT+IEMi5z65TTrJHPXQ+7emVaONN3grdIh3f81riaSCcb/GIHUuaH2u0q/dIygn8HH9nZOIATfCg== X-Received: by 2002:a17:902:da8d:b0:2a0:e7e0:1d31 with SMTP id d9443c01a7336-2a3e3992e27mr212904835ad.11.1768173503038; Sun, 11 Jan 2026 15:18:23 -0800 (PST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com. [209.85.216.48]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cd2ac2sm157422235ad.90.2026.01.11.15.18.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Jan 2026 15:18:22 -0800 (PST) Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-34c93e0269cso2607773a91.1 for ; Sun, 11 Jan 2026 15:18:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUqTAXfKFAN+z/3ar+aCue0onUBGUOpxP4LdLbZ6oueN3ATiPKJOKU7fINDF4KG0Z7O/KQzV0fPUY7t/7QWSTorO2vCIA==@freebsd.org X-Received: by 2002:a17:90b:2e8f:b0:343:3898:e7c7 with SMTP id 98e67ed59e1d1-34f68c010d0mr14449473a91.12.1768173502378; Sun, 11 Jan 2026 15:18:22 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <69616257.8255.cd9e3ac@gitrepo.freebsd.org> In-Reply-To: <69616257.8255.cd9e3ac@gitrepo.freebsd.org> From: Chuck Tuffli Date: Sun, 11 Jan 2026 15:18:11 -0800 X-Gmail-Original-Message-ID: X-Gm-Features: AZwV_QhTvQzpHAVtsh6-SGCggImBpJrNu9PomM10A91_hYZ14cm3uIr2rrQUvbo Message-ID: Subject: Re: git: 763179042246 - main - Fix NULL deref segfault in bhyve's usb_mouse.c To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Jack Bendtsen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Spamd-Result: default: False [-0.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FORGED_SENDER(0.30)[chuck@freebsd.org,ctuffli@gmail.com]; NEURAL_HAM_SHORT(-0.26)[-0.263]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_SPAM_LONG(0.17)[0.173]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[chuck@freebsd.org,ctuffli@gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[209.85.215.171:from,209.85.216.48:received]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.215.171:from]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4dqBJc6LXSz49kZ On Fri, Jan 9, 2026 at 12:18=E2=80=AFPM Warner Losh wrote= : > > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D7631790422464de1aec309018e= 2c444defe5f629 > > commit 7631790422464de1aec309018e2c444defe5f629 > Author: Jack Bendtsen > AuthorDate: 2025-06-19 07:40:31 +0000 > Commit: Warner Losh > CommitDate: 2026-01-09 20:17:13 +0000 > > Fix NULL deref segfault in bhyve's usb_mouse.c > > Some of the cases inside umouse_request() (usr.sbin/bhyve/usb_mouse.c= ) > use the data component of an event, while only partially checking if > it's NULL. 'data' has a NULL check, but then 'data' is immediately > deferenced anyway after the check regardless of if it's NULL or not. The SmartOS/Illumos folks ran into this issue a bit ago and fixed their version of bhyve differently (https://www.illumos.org/issues/17784). This has been on my to-do list, but it didn't make it to the top before this (point hat: chuck@). Any concerns or objections to my committing https://reviews.freebsd.org/D54661 to minimize our diffs with SmartOS/illumos? --chuck From nobody Sun Jan 11 23:18:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dqBKC3WZ2z6Ng1B for ; Sun, 11 Jan 2026 23:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dqBKB0mZZz4Bng for ; Sun, 11 Jan 2026 23:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768173534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l6Qk+qmpJjo0X9ae2O5OoGdTIRLl0xwpmFgrTgNZtrY=; b=wNWqqgId9s/GVXS3sWReq1f+4F9xGxzE0/UPnF9gq543Zzvgwg3TYbbKbe/JX7sKR09GRh C/h3lAQ4pBtqDATsSpUN9UCpqPm0MiUnIv6zznogiqIPXgViwhB/KBGEQWzcK8hfpkXW7N xWD2cXJswJiUoypvgvXLTULGpD2CaQXDPtys/GxBL1DEuoLpR2NjUdkW9UEEpB67+2Rc22 1jRSAG6AD9TQmCk/2/ePPO461dWl3MafaO3876RdwGpGlLxbU8P1J/WGxe96koXaHGhmpH ujIKuYuJUMC8uDq9GNRQ4xQP4pGEM+Ect1TcywIEACBw+agAH/lZQpvJQHYr+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768173534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l6Qk+qmpJjo0X9ae2O5OoGdTIRLl0xwpmFgrTgNZtrY=; b=omX09p9EUzVFltRB4u8sGmmWE7N4P8nbhWM4vLmwhNcGYcDwb4U5hag/Q2UjaPIlxCQ347 Dl5O6Jf102X8PSV8VllhT7S91HMvlkvDZ9dlnVkHdoxA/FmwArZlpuTsGJdl429R2ShvZD Zsw4GRYwQlKkrJ4xTULGpN6vlZvKFJR8euNLr+H2QaLx4bffnzU7runL++gGYWUpWIuBjy qeSEEjKdCJtfCgcZx03+1MC/johAnbHTjfgAAtClbb+E4lfkfKdzr8KB5VRfvOCIYOItHE NwHFBqYZGufNIDAugXw0DeRnCV+336vLjruv5cOXLBL1bBU5k4kVvRpb2JtiDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768173534; a=rsa-sha256; cv=none; b=lVJjAObPAacICEkZdhPm0irgXBqN9RNBFh0fdUNFOdJGQ449X8+uciBLXhXI++xELF22c2 QK130zNtBswyXhFksBoGMqhWcTZeKn6hJ2a4f1S1wR/oLqeeFqLyJViqwtQ3YBVTYVOm4z HLbUmFQFzdg4dQA/H09lLMSnuPb+xK37uGf9MqnojezS/7wuKl01vz9Oy+0P/13+tf8S47 zpIipEN8xE7IqoFK6dSkRJyNEfcI3hhOi/6TkcuH139I7GGCeIJyqBqnLkkur4qnXj5Cqy JCYKixv+y8EWv/8EAQ07C8sA7GrpcADeaPLaLPwraC9ks54S/ZVZ+kyY/IyzQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dqBK954Bjz11m7 for ; Sun, 11 Jan 2026 23:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35266 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 23:18:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e3bfcf6b594e - main - RELNOTES: Add some entries from the past several weeks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3bfcf6b594e8388c4a2e1835519a8026e90cf71 Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 23:18:53 +0000 Message-Id: <69642fdd.35266.29c80146@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e3bfcf6b594e8388c4a2e1835519a8026e90cf71 commit e3bfcf6b594e8388c4a2e1835519a8026e90cf71 Author: Mark Johnston AuthorDate: 2026-01-09 17:58:00 +0000 Commit: Mark Johnston CommitDate: 2026-01-11 23:18:31 +0000 RELNOTES: Add some entries from the past several weeks Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D54628 --- RELNOTES | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/RELNOTES b/RELNOTES index 9136fa151f2c..3c3f90769ae7 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,38 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +493d26c58e73: + The aq(4) driver was added, imported from the vendor repository. + This provides support for Aquantia / Marvell PCIe 1/2.5/5/10 Gigabit + Ethernet adapters (AQC107, AQC108, AQC109, AQC111, AQC112). + +1a7151f79664: + A new CAM provider was added to dtrace. This enables tracing of I/O + requests through the CAM layer without relying on fragile function + boundary tracing. See dtrace_cam(4) for details. + +b8c99e7d912f: + The tdestroy(3) function was added to libc. The tdestroy() function + destroys a whole search tree, freeing all allocated nodes. + +4bf8ce037dc8: + The rge(4) driver was added, ported from OpenBSD. This provides + support for RealTek RTL8125, RTL8126 and RTL8127 PCIe Ethernet + controllers. + +cbc6f7e941e4: + bhyve(8)'s VNC device can now listen on a unix(4) socket for VNC client + connections. + +39ee24182b92: + An rc(8) service can now be started as a specific user for auditing + purposes by setting the _audit_user rc.conf(5) variable. + +dcb0790bad43: + A setaudit(8) utility was added to the base system. This provides a + simple command-line wrapper for the setaudit(2) and setaudit_addr(2) + system calls. + 8e3fd450cc53, 949cff4dceff, 0e724de9ed6f, 9f49f436a9ec, e35191ccf3b3: Add support for an extension to NFSv4.2 (RFCnnnn) that supports handling of POSIX draft ACLs via getfacl(1)/setfacl(1).