lkml.org 
[lkml]   [2015]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[Bugfix v4 0/2] Prevent binding PCI drivers to PCI devices used by non-pci drivers
Date
Hi Joerg,
I prepared this patchset yesterday but forgot to send them out.
I think it still worth sending out for review, so here we go:)

---
Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and
pcibios_free_irq()") breaks suspend/resume on some AMD platforms.
The root cause is:
1) AMD IOMMU drivers enables MSI on IOMMU PCI devices at early boot stage
2) PCI driver binding code tries to allocate/free PCI legacy IRQ when
binding other PCI drivers to IOMMU PCI devices at later boot stage,
and breaks PCI MSI allocation information.
3) System resume breaks when restoring PCI MSI state using the damaged
data.

We have tried on solution to detect that a PCI is in use by IOMMU driver
by checking pci_msi_enabled(). But that's too specific, actually we should
prevent binding PCI drivers to PCI devices used by non-PCI drivers.

Fortunately, we could prevent binding PCI drivers to PCI devices by setting
pci_dev->match_driver to false. If needed, we could implement a helper
function to manipulate pci_dev->match_driver.

Jiang Liu (2):
iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices
ACPI, PCI: Prevent binding other PCI drivers to IOAPIC PCI devices

drivers/acpi/ioapic.c | 7 +++++--
drivers/iommu/amd_iommu_init.c | 3 +++
2 files changed, 8 insertions(+), 2 deletions(-)

--
1.7.10.4



\
 
 \ /
  Last update: 2015-10-09 16:21    [W:0.147 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site