1. 11 2月, 2014 1 次提交
    • B
      powerpc/powernv: Add iommu DMA bypass support for IODA2 · cd15b048
      Benjamin Herrenschmidt 提交于
      This patch adds the support for to create a direct iommu "bypass"
      window on IODA2 bridges (such as Power8) allowing to bypass iommu
      page translation completely for 64-bit DMA capable devices, thus
      significantly improving DMA performances.
      
      Additionally, this adds a hook to the struct iommu_table so that
      the IOMMU API / VFIO can disable the bypass when external ownership
      is requested, since in that case, the device will be used by an
      environment such as userspace or a KVM guest which must not be
      allowed to bypass translations.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cd15b048
  2. 30 12月, 2013 1 次提交
  3. 05 12月, 2013 1 次提交
    • G
      powerpc/powernv: Move PHB-diag dump functions around · 93aef2a7
      Gavin Shan 提交于
      Prior to the completion of PCI enumeration, we actively detects
      EEH errors on PCI config cycles and dump PHB diag-data if necessary.
      The EEH backend also dumps PHB diag-data in case of frozen PE or
      fenced PHB. However, we are using different functions to dump the
      PHB diag-data for those 2 cases.
      
      The patch merges the functions for dumping PHB diag-data to one so
      that we can avoid duplicate code. Also, we never dump PHB3 diag-data
      during PCI config cycles with frozen PE. The patch fixes it as well.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      93aef2a7
  4. 06 11月, 2013 1 次提交
    • G
      powerpc/powernv: Reserve the correct PE number · 36954dc7
      Gavin Shan 提交于
      We're assigning PE numbers after the completion of PCI probe. During
      the PCI probe, we had PE#0 as the super container to encompass all
      PCI devices. However, that's inappropriate since PELTM has ascending
      order of priority on search on P7IOC. So we need PE#127 takes the
      role that PE#0 has previously. For PHB3, we still have PE#0 as the
      reserved PE.
      
      The patch supposes that the underly firmware has built the RID to
      PE# mapping after resetting IODA tables: all PELTM entries except
      last one has invalid mapping on P7IOC, but all RTEs have binding
      to PE#0. The reserved PE# is being exported by firmware by device
      tree.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      36954dc7
  5. 11 10月, 2013 3 次提交
  6. 01 7月, 2013 2 次提交
  7. 21 6月, 2013 1 次提交
  8. 20 6月, 2013 2 次提交
  9. 10 5月, 2013 1 次提交
  10. 26 4月, 2013 3 次提交
  11. 18 4月, 2013 1 次提交
  12. 17 9月, 2012 2 次提交
  13. 07 12月, 2011 1 次提交
  14. 25 11月, 2011 1 次提交
    • B
      powerpc/powernv: PCI support for p7IOC under OPAL v2 · 184cd4a3
      Benjamin Herrenschmidt 提交于
      This adds support for p7IOC (and possibly other IODA v1 IO Hubs)
      using OPAL v2 interfaces.
      
      We completely take over resource assignment and assign them using an
      algorithm that hands out device BARs in a way that makes them fit in
      individual segments of the M32 window of the bridge, which enables us
      to assign individual PEs to devices and functions.
      
      The current implementation gives out a PE per functions on PCIe, and a
      PE for the entire bridge for PCIe to PCI-X bridges.
      
      This can be adjusted / fine tuned later.
      
      We also setup DMA resources (32-bit only for now) and MSIs (both 32-bit
      and 64-bit MSI are supported).
      
      The DMA allocation tries to divide the available 256M segments of the
      32-bit DMA address space "fairly" among PEs. This is done using a
      "weight" heuristic which assigns less value to things like OHCI USB
      controllers than, for example SCSI RAID controllers. This algorithm
      will probably want some fine tuning for specific devices or device
      types.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      184cd4a3
  15. 20 9月, 2011 2 次提交