1. 02 6月, 2015 1 次提交
  2. 31 3月, 2015 2 次提交
    • W
      powerpc/powernv: Shift VF resource with an offset · 781a868f
      Wei Yang 提交于
      On PowerNV platform, resource position in M64 BAR implies the PE# the
      resource belongs to. In some cases, adjustment of a resource is necessary
      to locate it to a correct position in M64 BAR .
      
      This patch adds pnv_pci_vf_resource_shift() to shift the 'real' PF IOV BAR
      address according to an offset.
      
      Note:
      
          After doing so, there would be a "hole" in the /proc/iomem when offset
          is a positive value. It looks like the device return some mmio back to
          the system, which actually no one could use it.
      
      [bhelgaas: rework loops, rework overlap check, index resource[]
      conventionally, remove pci_regs.h include, squashed with next patch]
      Signed-off-by: NWei Yang <weiyang@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      781a868f
    • W
      powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically · 9e8d4a19
      Wei Yang 提交于
      Previously the iommu_table had the same lifetime as a struct pnv_ioda_pe
      and was embedded in it. The pnv_ioda_pe was assigned to a PE on the bootup
      stage. Since PEs are based on the hardware layout which is static in the
      system, they will never get released. This means the iommu_table in the
      pnv_ioda_pe will never get released either.
      
      This no longer works for VF PE. VF PEs are created and released dynamically
      when VFs are created and released. So we need to assign pnv_ioda_pe to VF
      PEs respectively when VFs are enabled and clean up those resources for VF
      PE when VFs are disabled. And iommu_table is one of the resources we need
      to handle dynamically.
      
      Current iommu_table is a static field in pnv_ioda_pe, which will face a
      problem when freeing it. During the disabling of a VF,
      pnv_pci_ioda2_release_dma_pe will call iommu_free_table to release the
      iommu_table for this PE. A static iommu_table will fail in
      iommu_free_table.
      
      According to these requirement, this patch allocates iommu_table
      dynamically.
      Signed-off-by: NWei Yang <weiyang@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9e8d4a19
  3. 24 3月, 2015 1 次提交
  4. 17 3月, 2015 9 次提交
  5. 14 11月, 2014 1 次提交
  6. 30 9月, 2014 2 次提交
  7. 05 8月, 2014 2 次提交
    • G
      powerpc/powernv: Handle compound PE · 49dec922
      Gavin Shan 提交于
      The patch introduces 3 PHB callbacks: compound PE state retrieval,
      force freezing and unfreezing compound PE. The PCI config accessors
      and PowerNV EEH backend can use them in subsequent patches.
      
      We don't export the capability of compound PE to EEH core, which
      helps avoiding more complexity to EEH core.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      49dec922
    • G
      powerpc/powernv: Enable M64 aperatus for PHB3 · 262af557
      Guo Chao 提交于
      This patch enables M64 aperatus for PHB3.
      
      We already had platform hook (ppc_md.pcibios_window_alignment) to affect
      the PCI resource assignment done in PCI core so that each PE's M32 resource
      was built on basis of M32 segment size. Similarly, we're using that for
      M64 assignment on basis of M64 segment size.
      
         * We're using last M64 BAR to cover M64 aperatus, and it's shared by all
           256 PEs.
         * We don't support P7IOC yet. However, some function callbacks are added
           to (struct pnv_phb) so that we can reuse them on P7IOC in future.
         * PE, corresponding to PCI bus with large M64 BAR device attached, might
           span multiple M64 segments. We introduce "compound" PE to cover the case.
           The compound PE is a list of PEs and the master PE is used as before.
           The slave PEs are just for MMIO isolation.
      Signed-off-by: NGuo Chao <yan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      262af557
  8. 11 7月, 2014 1 次提交
  9. 28 4月, 2014 5 次提交
  10. 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
  11. 30 12月, 2013 1 次提交
  12. 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
  13. 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
  14. 11 10月, 2013 3 次提交
  15. 01 7月, 2013 2 次提交
  16. 21 6月, 2013 1 次提交
  17. 20 6月, 2013 2 次提交
  18. 10 5月, 2013 1 次提交
  19. 26 4月, 2013 3 次提交