1. 28 Apr, 2014 3 commits
  2. 28 Feb, 2014 1 commit
    • Gavin Shan's avatar
      powerpc/powernv: Refactor PHB diag-data dump · af87d2fe
      Gavin Shan authored
      
      
      As Ben suggested, the patch prints PHB diag-data with multiple
      fields in one line and omits the line if the fields of that
      line are all zero.
      
      With the patch applied, the PHB3 diag-data dump looks like:
      
      PHB3 PHB#3 Diag-data (Version: 1)
      
        brdgCtl:     00000002
        RootSts:     0000000f 00400000 b0830008 00100147 00002000
        nFir:        0000000000000000 0030006e00000000 0000000000000000
        PhbSts:      0000001c00000000 0000000000000000
        Lem:         0000000000100000 42498e327f502eae 0000000000000000
        InAErr:      8000000000000000 8000000000000000 0402030000000000 0000000000000000
        PE[  8] A/B: 8480002b00000000 8000000000000000
      
      [ The current diag data is so big that it overflows the printk
        buffer pretty quickly in cases when we get a handful of errors
        at once which can happen. --BenH
      ]
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      af87d2fe
  3. 11 Feb, 2014 1 commit
    • Benjamin Herrenschmidt's avatar
      powerpc/powernv: Add iommu DMA bypass support for IODA2 · cd15b048
      Benjamin Herrenschmidt authored
      
      
      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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cd15b048
  4. 30 Dec, 2013 3 commits
  5. 05 Dec, 2013 2 commits
    • Gavin Shan's avatar
      powerpc/powernv: Move PHB-diag dump functions around · 93aef2a7
      Gavin Shan authored
      
      
      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: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      93aef2a7
    • Alexey Kardashevskiy's avatar
      PPC: POWERNV: move iommu_add_device earlier · d905c5df
      Alexey Kardashevskiy authored
      The current implementation of IOMMU on sPAPR does not use iommu_ops
      and therefore does not call IOMMU API's bus_set_iommu() which
      1) sets iommu_ops for a bus
      2) registers a bus notifier
      Instead, PCI devices are added to IOMMU groups from
      subsys_initcall_sync(tce_iommu_init) which does basically the same
      thing without using iommu_ops callbacks.
      
      However Freescale PAMU driver (https://lkml.org/lkml/2013/7/1/158
      
      )
      implements iommu_ops and when tce_iommu_init is called, every PCI device
      is already added to some group so there is a conflict.
      
      This patch does 2 things:
      1. removes the loop in which PCI devices were added to groups and
      adds explicit iommu_add_device() calls to add devices as soon as they get
      the iommu_table pointer assigned to them.
      2. moves a bus notifier to powernv code in order to avoid conflict with
      the notifier from Freescale driver.
      
      iommu_add_device() and iommu_del_device() are public now.
      Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d905c5df
  6. 06 Nov, 2013 1 commit
    • Gavin Shan's avatar
      powerpc/powernv: Reserve the correct PE number · 36954dc7
      Gavin Shan authored
      
      
      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: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      36954dc7
  7. 11 Oct, 2013 4 commits
  8. 01 Jul, 2013 2 commits
  9. 20 Jun, 2013 3 commits
    • Gavin Shan's avatar
      powerpc/eeh: Enable EEH check for config access · be7e7446
      Gavin Shan authored
      
      
      The patch enables EEH check and let EEH core to process the EEH
      errors for PowerNV platform while accessing config space. Originally,
      the implementation already had mechanism to check EEH errors and
      tried to recover from them. However, we never let EEH core to handle
      the EEH errors.
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      be7e7446
    • Gavin Shan's avatar
      powerpc/eeh: Sync OPAL API with firmware · 23773230
      Gavin Shan authored
      
      
      The patch synchronizes OPAL APIs between kernel and firmware. Also,
      we starts to replace opal_pci_get_phb_diag_data() with the similar
      opal_pci_get_phb_diag_data2() and the former OPAL API would return
      OPAL_UNSUPPORTED from now on.
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      23773230
    • Alexey Kardashevskiy's avatar
      powerpc/vfio: Enable on PowerNV platform · 4e13c1ac
      Alexey Kardashevskiy authored
      
      
      This initializes IOMMU groups based on the IOMMU configuration
      discovered during the PCI scan on POWERNV (POWER non virtualized)
      platform.  The IOMMU groups are to be used later by the VFIO driver,
      which is used for PCI pass through.
      
      It also implements an API for mapping/unmapping pages for
      guest PCI drivers and providing DMA window properties.
      This API is going to be used later by QEMU-VFIO to handle
      h_put_tce hypercalls from the KVM guest.
      
      The iommu_put_tce_user_mode() does only a single page mapping
      as an API for adding many mappings at once is going to be
      added later.
      
      Although this driver has been tested only on the POWERNV
      platform, it should work on any platform which supports
      TCE tables.  As h_put_tce hypercall is received by the host
      kernel and processed by the QEMU (what involves calling
      the host kernel again), performance is not the best -
      circa 220MB/s on 10Gb ethernet network.
      
      To enable VFIO on POWER, enable SPAPR_TCE_IOMMU config
      option and configure VFIO as required.
      
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4e13c1ac
  10. 24 May, 2013 2 commits
  11. 10 May, 2013 1 commit
  12. 26 Apr, 2013 3 commits
  13. 18 Apr, 2013 1 commit
  14. 03 Jan, 2013 1 commit
    • Greg Kroah-Hartman's avatar
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman authored
      
      
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  15. 10 Sep, 2012 1 commit
  16. 05 Sep, 2012 1 commit
  17. 21 Mar, 2012 1 commit
  18. 24 Feb, 2012 2 commits
  19. 14 Feb, 2012 1 commit
  20. 07 Dec, 2011 1 commit
  21. 25 Nov, 2011 3 commits
  22. 20 Sep, 2011 2 commits