From nobody Mon Feb 2 17:24:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4f4YQC3W9mz6Qm3T for ; Mon, 02 Feb 2026 17: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 4f4YQC2Jvkz3Z9Y for ; Mon, 02 Feb 2026 17: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=1770053075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tIkevx5fZ8dKFrTy8VMyhSB0Vkq8ro45iVFWweklDk=; b=TKIKKPpBZtb5peGdv7E+mYMJEqK8N+F596Qofrm/EJqvEYGIwe9C+dhWPS2VLMXFL46Xdc Oco5YFO1BzzgcqmEp4wL17Mwk31WoFF7+KYpDyaIp7TTxd9u8XsrvTfo8XYCsNCa4feREv lo8IUW7kpvIFKklJW+Cv4HV31kMLQmFsQWOkkxEvol1ofLLArdX0i63c7akN01GfRQgyjO zSwLJ3jOvviLFXK8b918rQI2WVW5nu7h+4+Bm09qEyMcHuD7Fms7j2OKZDOTR64KYUUjww Wi2XVVkMNZf7Iyjo6TpcF/qUtdvjIUapldmVpLupQPj6TbT0S8k5WGsGT7Gb0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770053075; a=rsa-sha256; cv=none; b=OJp+92icHcZRvEA+cARW9HetAHm5SHqGx1LU4D7MVKtMWf16KR5u7fMk2uo8bbaufNZZa2 33YwdqyGR8ev88VPmsmSJQ4V5d7vh8fWP6QwxZpUuYyxwhQ9pxvVkpsxYiNcBU9HBcTIJ+ 0ot1Xnr1gCdVkF++FdObmcUit77XBBZ7wQP8/7HRRNTVEGNbMQUPYH5w1Fe/gjKFNgh+JG e2JtwWSSpPmy21WQULOP+CDIkDzOPHii9T/GL62dN9SIFsv2QFqhQd3hdq2w7gM6BpAP5y gtlo/gG07LFvNlEtb3orOv1E9ZI81ndW5t/kVo3rFaRzzSySFrezZSRY9NB3Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770053075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tIkevx5fZ8dKFrTy8VMyhSB0Vkq8ro45iVFWweklDk=; b=tz/JzAgNuccwoGBMvNFqtmFpcu3l65gvEOzKLAD3pVaOpI0nMuMU9fjEq4C7CfzPO6oZAL ewwyLa+XdPn2BmawPUnlSKj+aEbE7OF3yVhdtjTCyZJh3CC4osdEUKwZa+RHUYOifD0JNY vi9xOLF9bPYn4D5g3KA6bqmEo0v+Bgl1GD45PrLsEiTip6/pyW3OGYJ/BuOeCanfMMusJf +1/T1o0P3tc3hPsMVHAP99rOWYpSTh/KHWbHJeMFrIQINcw8cRUnKtNJzTIcWzb90DFaXE qSZLgmBSue67RkTvz2qHayboBNXUW47aAHva8oX5VAnKMxuPh8pw2ivNUAlvkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f4YQC1v62zcQF for ; Mon, 02 Feb 2026 17:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22196 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 02 Feb 2026 17:24:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5004b384a657 - stable/14 - linux: Make the macro LINUX_IOCTL_SET public List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5004b384a6571c7abbcd0bc64bbc60a08ac72557 Auto-Submitted: auto-generated Date: Mon, 02 Feb 2026 17:24:35 +0000 Message-Id: <6980ddd3.22196.3ef13501@gitrepo.freebsd.org> The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5004b384a6571c7abbcd0bc64bbc60a08ac72557 commit 5004b384a6571c7abbcd0bc64bbc60a08ac72557 Author: Zhenlei Huang AuthorDate: 2025-10-20 04:28:41 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-02 17:19:15 +0000 linux: Make the macro LINUX_IOCTL_SET public There're some other drivers want to register and unregister linux ioctl handler. Move the macro LINUX_IOCTL_SET from tdfx_linux.h to linux_ioctl.h so that they can also benefit it. While here, rename the declaration of linux ioctl function to be consistent with the name of the handler. Meanwhile, drop a comment about the macro, since its function is obvious. Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53158 (cherry picked from commit 790c27317ec1a997a4e5c2bdee9e4acc610c8e3c) (cherry picked from commit 087e77b52399b8a64bb7a12979322d6027bf550b) --- sys/compat/linux/linux_ioctl.h | 12 ++++++++++++ sys/dev/tdfx/tdfx_linux.c | 2 +- sys/dev/tdfx/tdfx_linux.h | 12 ------------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index 8a56e35d10c6..1972d02b6e7e 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -808,4 +808,16 @@ int linux32_ioctl_register_handler(struct linux_ioctl_handler *h); int linux32_ioctl_unregister_handler(struct linux_ioctl_handler *h); #endif +#define LINUX_IOCTL_SET(n, low, high) \ +static linux_ioctl_function_t n##_linux_ioctl; \ +static struct linux_ioctl_handler n##_linux_handler = { \ + n##_linux_ioctl, \ + low, \ + high \ +}; \ +SYSINIT(n##_ioctl_register, SI_SUB_KLD, SI_ORDER_MIDDLE, \ + linux_ioctl_register_handler, &n##_linux_handler); \ +SYSUNINIT(n##_ioctl_unregister, SI_SUB_KLD, SI_ORDER_MIDDLE, \ + linux_ioctl_unregister_handler, &n##_linux_handler) + #endif /* !_LINUX_IOCTL_H_ */ diff --git a/sys/dev/tdfx/tdfx_linux.c b/sys/dev/tdfx/tdfx_linux.c index 2a51ab6d1cc6..197da1856686 100644 --- a/sys/dev/tdfx/tdfx_linux.c +++ b/sys/dev/tdfx/tdfx_linux.c @@ -43,7 +43,7 @@ LINUX_IOCTL_SET(tdfx, LINUX_IOCTL_TDFX_MIN, LINUX_IOCTL_TDFX_MAX); * Linux emulation IOCTL for /dev/tdfx */ static int -linux_ioctl_tdfx(struct thread *td, struct linux_ioctl_args* args) +tdfx_linux_ioctl(struct thread *td, struct linux_ioctl_args* args) { cap_rights_t rights; int error = 0; diff --git a/sys/dev/tdfx/tdfx_linux.h b/sys/dev/tdfx/tdfx_linux.h index b87cb41f38fe..9d012c12274b 100644 --- a/sys/dev/tdfx/tdfx_linux.h +++ b/sys/dev/tdfx/tdfx_linux.h @@ -35,18 +35,6 @@ #include #include -/* - * This code was donated by Vladimir N. Silynaev to allow for defining - * ioctls within modules - */ -#define LINUX_IOCTL_SET(n,low,high) \ -static linux_ioctl_function_t linux_ioctl_##n; \ -static struct linux_ioctl_handler n##_handler = {linux_ioctl_##n, low, high}; \ -SYSINIT(n##register, SI_SUB_KLD, SI_ORDER_MIDDLE,\ -linux_ioctl_register_handler, &n##_handler); \ -SYSUNINIT(n##unregister, SI_SUB_KLD, SI_ORDER_MIDDLE,\ -linux_ioctl_unregister_handler, &n##_handler); - /* Values for /dev/3dfx */ /* Query IOCTLs */ #define LINUX_IOCTL_TDFX_QUERY_BOARDS 0x3302