From nobody Sat Jan 31 17:04:40 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 4f3K485GM1z6QWlr for ; Sat, 31 Jan 2026 17:04: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 4f3K481VY4z3T6g for ; Sat, 31 Jan 2026 17:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769879080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNGHXeZx3p3NHSBq31BO418plkObvsA/S7CVJSr6nZs=; b=Zh2fTTLIwATBEENWnhDTX+lb4KGPdLI/0n2ksnXrGOIjGAL/FW2zU8kK+FQ/KvKdbqm+uK fY3ozx7g2vEWymN6aX81YfOD1xZv6wnQZMn2fXmL3w419OeMPWF2r5d3ZUbl7SDi1lXk7L U9edTJx7A2naG8+LcvPyRdymeZd3YDd+ZNCGjIA7PJIJQd6VkmNlrRR6II9IQxESxkBBpi O9NBzLVXl0XlGGF2sHF8ZGbMj9BnP8uKgeT01XSQu41ActEgDd4Wza9aJOwye8aI1eP0sA Pq1rysYcvYhiK8hRxAqDGAE4q3hlysRSOnRc9BZxmbO6NdPIt8UW+A4EQN4csQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769879080; a=rsa-sha256; cv=none; b=NFFic1x7cJxlp1fOHpxtbgr8PB2buXkkjWZa7T2LKvUgY3WBwnkAZuCw8uaY9RC5vqQ5ZE cEjXiA76JiWvsegXFN7JzYXr0KSsZlZcR3+1OVe6ICgcXYzs2jiTD4PscLwYdQe4PEJN98 5fZthCXLfhBE6+b9FD1hTC6qcHgOKjW7uPyThO9qYDU9loy8LegoTtCkD+uTUSuHXhRcZB QCXCZDu65fAbENbL63/n50XZWeV8PpIw3GYr+mZiofis/okF4FZpZnyE7y4ZWCOl/0EfHH p/OHHltv6kDfSoBf6mdzceNDsm4KOGJ/efaNsATd/RpcCu8M1YoLxGtHHSaeWQ== 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=1769879080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNGHXeZx3p3NHSBq31BO418plkObvsA/S7CVJSr6nZs=; b=ngkNscYBQchhvJPhXtFAfEbd4xmebonUtE7ITsObezQXajFoV9Zzp4pWsChGt58GArWoDB xVBi3yUSw/aAEm4qK2DvEzBwqbiyfwawieRi/kSjuYzkEitEUq1KmPQTbRDK5mvYuhXnGx g/hrwrqIGfEi7+Vl8GVw4vqb/+DAL1vonPOQhTs5MLThhECehbj5f+htYOOhr/RwqmY6QW fIzXEsuv7GwRareQnF94BFsgUbDo5djd5dO3+Zi4qDy+H4EvhzCDmFyrVIQ5CTHbzMw7Zx mdDAznazDgfp6d5MdlIGDoMMJYB7jVgj8u3RHVxlAcgz/b323uiUk+wDQ31uWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f3K4812jYz135H for ; Sat, 31 Jan 2026 17:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 185d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 31 Jan 2026 17:04:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 087e77b52399 - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: 087e77b52399b8a64bb7a12979322d6027bf550b Auto-Submitted: auto-generated Date: Sat, 31 Jan 2026 17:04:40 +0000 Message-Id: <697e3628.185d4.1ec4613f@gitrepo.freebsd.org> The branch stable/15 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=087e77b52399b8a64bb7a12979322d6027bf550b commit 087e77b52399b8a64bb7a12979322d6027bf550b Author: Zhenlei Huang AuthorDate: 2025-10-20 04:28:41 +0000 Commit: Zhenlei Huang CommitDate: 2026-01-31 17:01:09 +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) --- 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 ccc25bc919ab..8345b7e4b719 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -823,4 +823,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 f3410106bad2..777144d21bb6 100644 --- a/sys/dev/tdfx/tdfx_linux.c +++ b/sys/dev/tdfx/tdfx_linux.c @@ -42,7 +42,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