[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250912230208.967129-1-briannorris@chromium.org>
Date: Fri, 12 Sep 2025 15:59:31 -0700
From: Brian Norris <briannorris@...omium.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Petr Pavlu <petr.pavlu@...e.com>,
Daniel Gomez <da.gomez@...nel.org>
Cc: linux-pci@...r.kernel.org,
David Gow <davidgow@...gle.com>,
Rae Moar <rmoar@...gle.com>,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-modules@...r.kernel.org,
Johannes Berg <johannes@...solutions.net>,
Sami Tolvanen <samitolvanen@...gle.com>,
Richard Weinberger <richard@....at>,
Wei Liu <wei.liu@...nel.org>,
Brendan Higgins <brendan.higgins@...ux.dev>,
kunit-dev@...glegroups.com,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
linux-um@...ts.infradead.org,
Brian Norris <briannorris@...omium.org>
Subject: [PATCH 0/4] PCI: Add support and tests for FIXUP quirks in modules
This series primarily adds support for DECLARE_PCI_FIXUP_*() in modules.
There are a few drivers that already use this, and so they are
presumably broken when built as modules.
While at it, I wrote some unit tests that emulate a fake PCI device, and
let the PCI framework match/not-match its vendor/device IDs. This test
can be built into the kernel or built as a module.
I also include some infrastructure changes (patch 3 and 4), so that
ARCH=um (the default for kunit.py), ARCH=arm, and ARCH=arm64 will run
these tests by default. These patches have different maintainers and are
independent, so they can probably be picked up separately. I included
them because otherwise the tests in patch 2 aren't so easy to run.
Brian Norris (4):
PCI: Support FIXUP quirks in modules
PCI: Add KUnit tests for FIXUP quirks
um: Select PCI_DOMAINS_GENERIC
kunit: qemu_configs: Add PCI to arm, arm64
arch/um/Kconfig | 1 +
drivers/pci/Kconfig | 11 ++
drivers/pci/Makefile | 1 +
drivers/pci/fixup-test.c | 197 ++++++++++++++++++++++
drivers/pci/quirks.c | 62 +++++++
include/linux/module.h | 18 ++
kernel/module/main.c | 26 +++
tools/testing/kunit/qemu_configs/arm.py | 1 +
tools/testing/kunit/qemu_configs/arm64.py | 1 +
9 files changed, 318 insertions(+)
create mode 100644 drivers/pci/fixup-test.c
--
2.51.0.384.g4c02a37b29-goog
Powered by blists - more mailing lists