From nobody Tue Feb 10 00:46:44 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 4f92v90GsBz6R502 for ; Tue, 10 Feb 2026 00:46: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 4f92v84zVjz4FyG for ; Tue, 10 Feb 2026 00:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770684404; h=from:from:reply-to:subject: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=FlwB4m480o8BiRPkowvHORZ64EopBtq99XSLg7Wr3Fg=; b=O/8sWWhvOuEmEkjXsUAtnnV35AVvMCJE2eZbEXWzJlRuj3WU3SNfm03B7p/XZmVnXwN5VQ WOVgfRwqiJwL1tdx72TY3YK9Ar1E5wdHXfqSEdRgsilEhFGIOgVWx3pFMlJXL8/+tLgVCj hIRbVSMjeXXkcs4c8aeQFsBeLfijENDvxF/f4NkesZ8NBeKGEMOn9JOpoqWawvPW1WuMW2 pD9SXWcCHHyGQEeHV72DoEzfme2wqnZu7WPZbKTUwEKygKzv4hh1A1ZUCsjOohQlsHw+7p GGbx957qZKpTxsPSqYqyjiBsJj0aml3VU/K/ZAv8dBosOzHwCn8rx9Kx14hbZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770684404; a=rsa-sha256; cv=none; b=lZiSU9PwrRDSY86Cg/a2C+WAVLxqmJnhPECdUKDvPEShefwgI+L1Vj1BKL7mpo/NjMJ51U RhmI1Fc3zzzvaPXjIPVCGpPmO4SJiWAImJETHiAPGm7TcrYpoRjSsvuwzFRxTCDB+wUYPY I6kYlXQFoyIgpqa9HxJfCK6jdLCg3cavd1VZKLS0bQ7dfu+zhMIfR80yvVfxZuobYP/Q5Q JS3cfp4449KRUx62zOC5Aw0auml2e+Cc8N9dO8Q6SDoeaLS0etGH76nQbBwWtwTNPbZksr dWeep+E40Fp4aaYZc8Juypg5A3YwRkZGJCFWYIZqTqxewBhxsUdbOrqWcm0icQ== 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=1770684404; h=from:from:reply-to:subject: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=FlwB4m480o8BiRPkowvHORZ64EopBtq99XSLg7Wr3Fg=; b=vLsC/oKywaEd1zJ7PUghwHg7I29gFxqQsZBv14MnW2XcK39uTVflLp8iE2VucKsl6ZD897 BU1Dwu5jePZJr0tegdVm+7GIx9Ko91pEsGgoYAJaoV71l9cT9h66EgFH0Y8lcpjwcr59pd JInyGenOvfMAMBXbH0F5oMzlxVntFzOn5p9UueYnZ+JEcyrYtUCQCPh7JLvvWz8S68ncR3 Fg6fzi8CAvWNRWanNNE7YdtxE0sbkYXbYjhkXk+R/gfhVcLGw+HuHsfclBITAK40MIXRsC vkLPccozwGY2OJp1ek7TrVdJyhH7vVmu3VZ8xYogIko8zJmXfi8ek3gB66fwhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f92v84QrJzwHg for ; Tue, 10 Feb 2026 00:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30542 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 10 Feb 2026 00:46:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 1f4fbcf342f4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 1f4fbcf342f41fecc8dff4e0d9a1f9bdb1cdf784 Auto-Submitted: auto-generated Date: Tue, 10 Feb 2026 00:46:44 +0000 Message-Id: <698a7ff4.30542.6ed368c9@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1f4fbcf342f41fecc8dff4e0d9a1f9bdb1cdf784 commit 1f4fbcf342f41fecc8dff4e0d9a1f9bdb1cdf784 Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 20:31:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-09 21:49:44 +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 MFC after: 3 days Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D54900 --- 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 c337be67f5a4..ccbd425de5da 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))