From nobody Fri Feb 27 02:29:48 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 4fMXNF0fSCz6T7nc for ; Fri, 27 Feb 2026 02:29: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXND5JXRz417L for ; Fri, 27 Feb 2026 02:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+D1jRdmNWyucFSmLEil4kwVb6sO56E8mOnCgydRB9w=; b=ADsZAhc1nCuEyul/3qW1GRVSiOu2RHhJp1s9mKAPip7WO8BChSadSs2iqlX7eHSSbkxhbz o7Q9qhT4ee0g5mFKhndHyWzHz7/hleH8FBlYrqExC917bMhyA9kibVhvm6SCoKsyP5Xmul KbiShKjvWSCv00LBV/Bc1T7/alpmiphTeoxVS+oGWtEPVte09P7fXvvA6kO5BGMNomIvvT PIrLsRb5cwv26LmjZc8/EB1jdWspjR6xjuaCbIf99m6HH6F3kMHOjKma39cVzS8XSztuAt qdX1/9UUtCP4/G0P+Gj4atq5FO3Yc9y+YWRbT7yoR/BCtzZ77SNf8oJdswNAcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159388; a=rsa-sha256; cv=none; b=RE6mpxmzaH/c0iMA+Y4vjv1x2Jyhk20AsnMXYEed0vSnEX6FCw+hQXpp7jSnT9WoQuJ7Z3 QebKJI+3Kts/zfR0L8vtsi+wBDh9Lv0shBAHPvTYnkn9UUsgQG4Ueu/yUiKJbOO2QWZvGx /LdGzvd6vVgqXMX1JVkRqpbxSWqxMe7u2gRve7mv5QDrb0siPzIRn70Ht9c8FLpIV/l6nx o8lW2+C47KVaOC6LHhPEXlpWB3lD+Wz994yphffLd9TrOKSWFjIvzrLgNBo0dmyp1hrDvy 5e23G+5tSDEy94xGCXwiAR/gyvsA5+Zkc3TetDsMhRgQ+82lL9fYpKGsd6Hbcw== 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=1772159388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+D1jRdmNWyucFSmLEil4kwVb6sO56E8mOnCgydRB9w=; b=hMsWgKVIictIzv+UF/6uXT6qxUmMGE1i6FP+pnQf1ln/Sw7Fib9p2zVuEKAYL5b8er+7/V 96a7Y1/V2NnAl0GeKcl8L+6bv2Oxf106vAM4Zs2RQ5BSjYMT0TWn/oHLSYYhutiCBHybh5 45gSFPe3iWWfdTb89HKzl5pPurvoHtWvYIJkkiwmmHxjgG3ZTjw1V7/WcciA0DoCOxCDMD X+AsHQcqPS9qEY4ksfsMeSTa88gxUywxmBPK84vumSBH4TKxKeQE/AXEK3sleHabfjiykI HOB3QwCsB9TPtoaxhUdC4w8kPWcTk0pHTb6I9/qM2GiMIhmWxeUwnKCB2ySKDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXND4qdFzyHw for ; Fri, 27 Feb 2026 02:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 219b9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 7949253aeb32 - stable/15 - LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7949253aeb324560dc0a0d5b574e305aad8ec79f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:48 +0000 Message-Id: <69a1019c.219b9.4043f5aa@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7949253aeb324560dc0a0d5b574e305aad8ec79f commit 7949253aeb324560dc0a0d5b574e305aad8ec79f Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 20:31:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:02:50 +0000 LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h Move the MODULE_DEVICE_TABLE macro to module.h where it belongs in preparation for different bus (e.g., USB, SDIO) support. The various struct _device_id, if not elsewhere, should be defined in mod_devicetable.h. This is the next step after 2f5666c1727c. No functional changes. Sponsored by: The FreeBSD Foundation Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D54900 (cherry picked from commit 1f4fbcf342f41fecc8dff4e0d9a1f9bdb1cdf784) --- sys/compat/linuxkpi/common/include/linux/module.h | 18 ++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/pci.h | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/module.h b/sys/compat/linuxkpi/common/include/linux/module.h index 079dacf8df6c..fbe57cbbed82 100644 --- a/sys/compat/linuxkpi/common/include/linux/module.h +++ b/sys/compat/linuxkpi/common/include/linux/module.h @@ -53,6 +53,24 @@ #define MODULE_SUPPORTED_DEVICE(name) #define MODULE_IMPORT_NS(_name) +/* Linux has an empty element at the end of the ID table -> nitems() - 1. */ +#define MODULE_DEVICE_TABLE(_bus, _table) \ + \ +static device_method_t _ ## _bus ## _ ## _table ## _methods[] = { \ + DEVMETHOD_END \ +}; \ + \ +static driver_t _ ## _bus ## _ ## _table ## _driver = { \ + "lkpi_" #_bus #_table, \ + _ ## _bus ## _ ## _table ## _methods, \ + 0 \ +}; \ + \ +DRIVER_MODULE(lkpi_ ## _table, _bus, _ ## _bus ## _ ## _table ## _driver,\ + 0, 0); \ + \ +MODULE_DEVICE_TABLE_BUS_ ## _bus(_bus, _table) + /* * THIS_MODULE is used to differentiate modules on Linux. We currently * completely stub out any Linux struct module usage, but THIS_MODULE is still diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index cda1cf7dfb5e..9b7699a5ca59 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -76,24 +76,6 @@ struct pci_device_id { MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ _bus, lkpi_ ## _table, _table, nitems(_table) - 1) -/* Linux has an empty element at the end of the ID table -> nitems() - 1. */ -#define MODULE_DEVICE_TABLE(_bus, _table) \ - \ -static device_method_t _ ## _bus ## _ ## _table ## _methods[] = { \ - DEVMETHOD_END \ -}; \ - \ -static driver_t _ ## _bus ## _ ## _table ## _driver = { \ - "lkpi_" #_bus #_table, \ - _ ## _bus ## _ ## _table ## _methods, \ - 0 \ -}; \ - \ -DRIVER_MODULE(lkpi_ ## _table, _bus, _ ## _bus ## _ ## _table ## _driver,\ - 0, 0); \ - \ -MODULE_DEVICE_TABLE_BUS_ ## _bus(_bus, _table) - #define PCI_ANY_ID -1U #define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))