From: Bjorn Helgaas <helgaas@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: Joerg Roedel <joro@8bytes.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
linux-pci@vger.kernel.org, iommu@lists.linux.dev,
Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH 0/2] PCI: Clean up match_driver flag usage
Date: Fri, 25 Apr 2025 11:32:59 -0500 [thread overview]
Message-ID: <20250425163259.GA546441@bhelgaas> (raw)
In-Reply-To: <cover.1745572340.git.lukas@wunner.de>
On Fri, Apr 25, 2025 at 11:24:20AM +0200, Lukas Wunner wrote:
> A small puzzle piece to improve maintainability of the PCI core:
>
> The match_driver flag in struct pci_dev is used to postpone driver
> binding until all PCI devices have been enumerated.
>
> The AMD IOMMU driver fiddles with the flag to work around breakage
> introduced 10 years ago. The breaking change has since been reverted,
> so accessing the flag appears to be superfluous and is hereby dropped
> (patch [1/2]). The patch needs an ack from AMD IOMMU maintainers.
>
> This clears the way for moving the flag to struct pci_dev's priv_flags
> and thus prevent any further abuse outside the PCI core (patch [2/2]).
>
> There are already two patches queued up in this cycle which amend
> priv_flags with new definitions for bits 4, 5 and 6 (on the pci/hotplug
> and pci/bwctrl topic branches), hence the bit number used here is 7.
>
> Lukas Wunner (2):
> Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI
> devices"
> PCI: Limit visibility of match_driver flag to PCI core
>
> drivers/iommu/amd/init.c | 3 ---
> drivers/pci/bus.c | 4 +++-
> drivers/pci/pci-driver.c | 2 +-
> drivers/pci/pci.h | 11 +++++++++++
> drivers/pci/probe.c | 1 -
> include/linux/pci.h | 2 --
> 6 files changed, 15 insertions(+), 8 deletions(-)
Provisionally applied to pci/enumeration for build testing, pending
ack from AMD IOMMU folks.
prev parent reply other threads:[~2025-04-25 16:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 9:24 [PATCH 0/2] PCI: Clean up match_driver flag usage Lukas Wunner
2025-04-25 9:24 ` [PATCH 1/2] Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices" Lukas Wunner
2025-05-12 13:28 ` Lukas Wunner
2025-05-13 7:08 ` Joerg Roedel
2025-04-25 9:24 ` [PATCH 2/2] PCI: Limit visibility of match_driver flag to PCI core Lukas Wunner
2025-04-25 16:32 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250425163259.GA546441@bhelgaas \
--to=helgaas@kernel.org \
--cc=bp@alien8.de \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=suravee.suthikulpanit@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox