alistair23-linux/drivers/pci
Jan Kiszka fb51ccbf21 PCI: Rework config space blocking services
pci_block_user_cfg_access was designed for the use case that a single
context, the IPR driver, temporarily delays user space accesses to the
config space via sysfs. This assumption became invalid by the time
pci_dev_reset was added as locking instance. Today, if you run two loops
in parallel that reset the same device via sysfs, you end up with a
kernel BUG as pci_block_user_cfg_access detect the broken assumption.

This reworks the pci_block_user_cfg_access to a sleeping service
pci_cfg_access_lock and an atomic-compatible variant called
pci_cfg_access_trylock. The former not only blocks user space access as
before but also waits if access was already locked. The latter service
just returns false in this case, allowing the caller to resolve the
conflict instead of raising a BUG.

Adaptions of the ipr driver were originally written by Brian King.

Acked-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2012-01-06 12:10:33 -08:00
..
hotplug PCI: pciehp: Handle push button event asynchronously 2012-01-06 12:10:28 -08:00
pcie PCI: Rework ASPM disable code 2012-01-06 12:10:26 -08:00
.gitignore
access.c PCI: Rework config space blocking services 2012-01-06 12:10:33 -08:00
ats.c PCI: Fix PRI and PASID consistency 2012-01-06 12:10:26 -08:00
bus.c PCI/sysfs: move bus cpuaffinity to class dev_attrs 2011-05-21 12:17:13 -07:00
hotplug-pci.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
hotplug.c
htirq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
ioapic.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
iov.c PCI: Rework config space blocking services 2012-01-06 12:10:33 -08:00
irq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2011-11-23 14:58:46 -08:00
Makefile PCI: Move ATS implementation into own file 2011-10-14 09:05:33 -07:00
msi.c PCI: msi: Disable msi interrupts when we initialize a pci device 2012-01-06 12:10:29 -08:00
msi.h PCI: MSI: Move MSI-X entry definition to pci_regs.h 2010-12-23 12:53:07 -08:00
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c PCI/ACPI/PM: Avoid resuming devices that don't signal PME 2012-01-06 12:10:29 -08:00
pci-driver.c PCI: pci_has_legacy_pm_support add driver and device to WARN 2012-01-06 12:10:30 -08:00
pci-label.c pci-label.c: size_t misspelled as mode_t 2011-07-26 13:01:09 -04:00
pci-stub.c PCI: pci-stub: ignore zero-length id parameters 2010-12-23 12:53:52 -08:00
pci-sysfs.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
pci.c PCI: Rework config space blocking services 2012-01-06 12:10:33 -08:00
pci.h PCI: make cardbus-bridge resources optional 2011-08-01 11:50:40 -07:00
probe.c PCI: fix a brace coding style issue in probe.c 2012-01-06 12:10:31 -08:00
proc.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
quirks.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
remove.c PCI/sysfs: move bus cpuaffinity to class dev_attrs 2011-05-21 12:17:13 -07:00
rom.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
search.c PCI: use for_each_pci_dev() 2010-07-30 09:47:22 -07:00
setup-bus.c PCI: Make pci_setup_bridge() non-static for use by arch code 2011-10-14 09:05:29 -07:00
setup-irq.c PCI: Make the struct pci_dev * argument of pci_fixup_irqs const. 2011-07-22 08:26:06 -07:00
setup-res.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
slot.c pci: add module.h to files implicitly relying on its presence. 2011-10-31 19:31:23 -04:00
syscall.c
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c Merge branches 'stable/drivers-3.2', 'stable/drivers.bugfixes-3.2' and 'stable/pci.fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-10-25 09:19:36 +02:00