alistair23-linux/drivers/uio
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
..
Kconfig UIO: add PRUSS UIO driver support 2011-03-07 13:10:27 -08:00
Makefile UIO: add PRUSS UIO driver support 2011-03-07 13:10:27 -08:00
uio.c uio: Support physical addresses >32 bits on 32-bit systems 2011-10-18 11:18:57 -07:00
uio_aec.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
uio_cif.c uio: Change mail address of Hans J. Koch 2010-11-10 16:57:11 -08:00
uio_netx.c uio_netx: Add support for netPLC cards 2011-04-19 16:56:02 -07:00
uio_pci_generic.c PCI: Rework config space blocking services 2012-01-06 12:10:33 -08:00
uio_pdrv.c uio: Add module.h to implicit drivers/uio users 2011-10-31 19:32:10 -04:00
uio_pdrv_genirq.c uio: Add module.h to implicit drivers/uio users 2011-10-31 19:32:10 -04:00
uio_pruss.c Fix common misspellings 2011-03-31 11:26:23 -03:00
uio_sercos3.c uio: Remove IRQF_DISABLED from uio_sercos3.c 2010-08-05 13:53:33 -07:00