1. 15 1月, 2014 1 次提交
    • A
      PCI: Add pci_try_reset_function(), pci_try_reset_slot(), pci_try_reset_bus() · 61cf16d8
      Alex Williamson 提交于
      When doing a function/slot/bus reset PCI grabs the device_lock for each
      device to block things like suspend and driver probes, but call paths exist
      where this lock may already be held.  This creates an opportunity for
      deadlock.  For instance, vfio allows userspace to issue resets so long as
      it owns the device(s).  If a driver unbind .remove callback races with
      userspace issuing a reset, we have a deadlock as userspace gets stuck
      waiting on device_lock while another thread has device_lock and waits for
      .remove to complete.  To resolve this, we can make a version of the reset
      interfaces which use trylock.  With this, we can safely attempt a reset and
      return error to userspace if there is contention.
      
      [bhelgaas: the deadlock happens when A (userspace) has a file descriptor for
      the device, and B waits in this path:
      
        driver_detach
          device_lock                     # take device_lock
          __device_release_driver
            pci_device_remove             # pci_bus_type.remove
              vfio_pci_remove             # pci_driver .remove
                vfio_del_group_dev
                  wait_event(vfio.release_q, !vfio_dev_present)   # wait (holding device_lock)
      
      Now B is stuck until A gives up the file descriptor.  If A tries to acquire
      device_lock for any reason, we deadlock because A is waiting for B to release
      the lock, and B is waiting for A to release the file descriptor.]
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      61cf16d8
  2. 14 1月, 2014 12 次提交
  3. 11 1月, 2014 5 次提交
    • S
      PCI: Remove unused ID-Based Ordering support · 7c2dd2d7
      Stephen Hemminger 提交于
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts b48d4425 ("PCI: add ID-based ordering enable/disable
      support"), removing these interfaces:
      
          pci_enable_ido()
          pci_disable_ido()
      
      [bhelgaas: split to separate patch, also remove prototypes from pci.h]
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      7c2dd2d7
    • S
      PCI: Remove unused Optimized Buffer Flush/Fill support · ecc86356
      Stephen Hemminger 提交于
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts 48a92a81 ("PCI: add OBFF enable/disable support"),
      removing these interfaces:
      
          pci_enable_obff()
          pci_disable_obff()
      
      [bhelgaas: split to separate patch, also remove prototypes from pci.h]
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      ecc86356
    • S
      PCI: Remove unused Latency Tolerance Reporting support · 3ea8197e
      Stephen Hemminger 提交于
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts 51c2e0a7 ("PCI: add latency tolerance reporting
      enable/disable support"), removing these interfaces:
      
          pci_enable_ltr()
          pci_disable_ltr()
          pci_set_ltr()
      
      [bhelgaas: split to separate patch, also remove prototypes from pci.h]
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      3ea8197e
    • B
      Merge branch 'pci/resource' into next · 96702be5
      Bjorn Helgaas 提交于
      * pci/resource:
        PCI: Allocate 64-bit BARs above 4G when possible
        PCI: Enforce bus address limits in resource allocation
        PCI: Split out bridge window override of minimum allocation address
        agp/ati: Use PCI_COMMAND instead of hard-coded 4
        agp/intel: Use CPU physical address, not bus address, for ioremap()
        agp/intel: Use pci_bus_address() to get GTTADR bus address
        agp/intel: Use pci_bus_address() to get MMADR bus address
        agp/intel: Support 64-bit GMADR
        agp/intel: Rename gtt_bus_addr to gtt_phys_addr
        drm/i915: Rename gtt_bus_addr to gtt_phys_addr
        agp: Use pci_resource_start() to get CPU physical address for BAR
        agp: Support 64-bit APBASE
        PCI: Add pci_bus_address() to get bus address of a BAR
        PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
        PCI: Change pci_bus_region addresses to dma_addr_t
      96702be5
    • S
      PCI: Removed unused parts of Page Request Interface support · b340cacc
      Stephen Hemminger 提交于
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts parts of c320b976 ("PCI: Add implementation for PRI
      capability"), removing these interfaces:
      
          pci_pri_enabled()
          pci_pri_stopped()
          pci_pri_status()
      
      [bhelgaas: split to separate patch]
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Joerg Roedel <joro@8bytes.org>
      b340cacc
  4. 08 1月, 2014 16 次提交
  5. 07 1月, 2014 1 次提交
  6. 04 1月, 2014 5 次提交