Skip to content

PCI: Clean up match_driver flag usage

Lukas Wunner linux-iommu linux-pci 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices"drivers/iommu/amd/init.c+0 -32 replies
2/2PCI: Limit visibility of match_driver flag to PCI coredrivers/pci/bus.c drivers/pci/pci-driver.c drivers/pci/pci.h +2 more+15 -50 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJoerg Roedel
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] PCI: Clean up match_driver flag usage

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(-)
Signature · 1 line
2.47.2