1. 21 6月, 2016 16 次提交
  2. 07 6月, 2016 1 次提交
    • B
      PCI: Add devm_request_pci_bus_resources() · 950334bc
      Bjorn Helgaas 提交于
      Several host bridge drivers iterate through the list of bridge windows to
      request resources.  Several others don't request the window resources at
      all.
      
      Add a devm_request_pci_bus_resources() interface to make it easier for
      drivers to request all the window resources.  Export to GPL modules (from
      Arnd Bergmann <arnd@arndb.de>).
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      950334bc
  3. 17 5月, 2016 2 次提交
  4. 12 5月, 2016 3 次提交
    • T
      PCI, of: Move PCI I/O space management to PCI core code · c5076cfe
      Tomasz Nowicki 提交于
      No functional changes in this patch.
      
      PCI I/O space mapping code does not depend on OF; therefore it can be moved
      to PCI core code.  This way we will be able to use it, e.g., in ACPI PCI
      code.
      Suggested-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Liviu Dudau <Liviu.Dudau@arm.com>
      c5076cfe
    • J
      PCI: generic, thunder: Use generic ECAM API · 1958e717
      Jayachandran C 提交于
      Use functions provided by drivers/pci/ecam.h for mapping the config space
      in drivers/pci/host/pci-host-common.c, and update its users to use 'struct
      pci_config_window' and 'struct pci_ecam_ops'.
      
      The changes are mostly to use 'struct pci_config_window' in place of
      'struct gen_pci'.  Some of the fields of gen_pci were only used temporarily
      and can be eliminated by using local variables or function arguments, these
      are not carried over to struct pci_config_window.
      
      pci-thunder-ecam.c and pci-thunder-pem.c are the only users of the
      pci_host_common_probe function and the gen_pci structure; these have been
      updated to use the new API as well.
      
      The patch does not introduce any functional changes other than a very minor
      one: with the new code, on 64-bit platforms, we do just a single ioremap
      for the whole config space.
      Signed-off-by: NJayachandran C <jchandra@broadcom.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      1958e717
    • J
      PCI: Provide common functions for ECAM mapping · 35ff9477
      Jayachandran C 提交于
      Add config option PCI_ECAM and file drivers/pci/ecam.c to provide generic
      functions for accessing memory-mapped PCI config space.
      
      The API is defined in drivers/pci/ecam.h and is written to replace the API
      in drivers/pci/host/pci-host-common.h.  The file defines a new 'struct
      pci_config_window' to hold the information related to a PCI config area and
      its mapping.  This structure is expected to be used as sysdata for
      controllers that have ECAM based mapping.
      
      Helper functions are provided to setup the mapping, free the mapping and to
      implement the map_bus method in 'struct pci_ops'
      Signed-off-by: NJayachandran C <jchandra@broadcom.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      35ff9477
  5. 11 5月, 2016 2 次提交
  6. 05 5月, 2016 2 次提交
    • V
      PCI: hv: Add explicit barriers to config space access · bdd74440
      Vitaly Kuznetsov 提交于
      I'm trying to pass-through Broadcom BCM5720 NIC (Dell device 1f5b) on a
      Dell R720 server.  Everything works fine when the target VM has only one
      CPU, but SMP guests reboot when the NIC driver accesses PCI config space
      with hv_pcifront_read_config()/hv_pcifront_write_config().  The reboot
      appears to be induced by the hypervisor and no crash is observed.  Windows
      event logs are not helpful at all ('Virtual machine ... has quit
      unexpectedly').  The particular access point is always different and
      putting debug between them (printk/mdelay/...) moves the issue further
      away.  The server model affects the issue as well: on Dell R420 I'm able to
      pass-through BCM5720 NIC to SMP guests without issues.
      
      While I'm obviously failing to reveal the essence of the issue I was able
      to come up with a (possible) solution: if explicit barriers are added to
      hv_pcifront_read_config()/hv_pcifront_write_config() the issue goes away.
      The essential minimum is rmb() at the end on _hv_pcifront_read_config() and
      wmb() at the end of _hv_pcifront_write_config() but I'm not confident it
      will be sufficient for all hardware.  I suggest the following barriers:
      
      1) wmb()/mb() between choosing the function and writing to its space.
      2) mb() before releasing the spinlock in both _hv_pcifront_read_config()/
         _hv_pcifront_write_config() to ensure that consecutive reads/writes to
        the space won't get re-ordered as drivers may count on that.
      
      Config space access is not supposed to be performance-critical so these
      explicit barriers should not cause any slowdown.
      
      [bhelgaas: use Linux "barriers" terminology]
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NJake Oshins <jakeo@microsoft.com>
      bdd74440
    • L
      PCI: Use cached copy of PCI_EXP_SLTCAP_HPC bit · f8415222
      Lukas Wunner 提交于
      We cache the PCI_EXP_SLTCAP_HPC bit in pci_dev->is_hotplug_bridge on device
      probe, so there's no need to read it again on allocation of port service
      devices.
      
      No functional change intended.
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      f8415222
  7. 03 5月, 2016 11 次提交
  8. 01 5月, 2016 1 次提交
  9. 29 4月, 2016 1 次提交
  10. 27 4月, 2016 1 次提交