1. 18 8月, 2015 1 次提交
    • A
      powerpc/powernv: move dma_get_required_mask from pnv_phb to pci_controller_ops · 53522982
      Andrew Donnellan 提交于
      Simplify the dma_get_required_mask call chain by moving it from pnv_phb to
      pci_controller_ops, similar to commit 763d2d8d ("powerpc/powernv:
      Move dma_set_mask from pnv_phb to pci_controller_ops").
      
      Previous call chain:
      
        0) call dma_get_required_mask() (kernel/dma.c)
        1) call ppc_md.dma_get_required_mask, if it exists. On powernv, that
           points to pnv_dma_get_required_mask() (platforms/powernv/setup.c)
        2) device is PCI, therefore call pnv_pci_dma_get_required_mask()
           (platforms/powernv/pci.c)
        3) call phb->dma_get_required_mask if it exists
        4) it only exists in the ioda case, where it points to
             pnv_pci_ioda_dma_get_required_mask() (platforms/powernv/pci-ioda.c)
      
      New call chain:
      
        0) call dma_get_required_mask() (kernel/dma.c)
        1) device is PCI, therefore call pci_controller_ops.dma_get_required_mask
           if it exists
        2) in the ioda case, that points to pnv_pci_ioda_dma_get_required_mask()
           (platforms/powernv/pci-ioda.c)
      
      In the p5ioc2 case, the call chain remains the same -
      dma_get_required_mask() does not find either a ppc_md call or
      pci_controller_ops call, so it calls __dma_get_required_mask().
      Signed-off-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Reviewed-by: NDaniel Axtens <dja@axtens.net>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      53522982
  2. 14 8月, 2015 1 次提交
  3. 06 8月, 2015 4 次提交
  4. 23 7月, 2015 1 次提交
    • P
      powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* · 01c9348c
      Paul Mackerras 提交于
      The hardware RNG on POWER8 and POWER7+ can be relatively slow, since
      it can only supply one 64-bit value per microsecond.  Currently we
      read it in arch_get_random_long(), but that slows down reading from
      /dev/urandom since the code in random.c calls arch_get_random_long()
      for every longword read from /dev/urandom.
      
      Since the hardware RNG supplies high-quality entropy on every read, it
      matches the semantics of arch_get_random_seed_long() better than those
      of arch_get_random_long().  Therefore this commit makes the code use
      the POWER8/7+ hardware RNG only for arch_get_random_seed_{long,int}
      and not for arch_get_random_{long,int}.
      
      This won't affect any other PowerPC-based platforms because none of
      them currently support a hardware RNG.  To make it clear that the
      ppc_md function pointer is used for arch_get_random_seed_*, we rename
      it from get_random_long to get_random_seed.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      01c9348c
  5. 21 7月, 2015 2 次提交
  6. 16 7月, 2015 1 次提交
  7. 13 7月, 2015 7 次提交
  8. 06 7月, 2015 2 次提交
  9. 19 6月, 2015 1 次提交
    • A
      powerpc/powernv: Fix wrong IOMMU table in pnv_ioda_setup_bus_dma() · 5c89a87d
      Alexey Kardashevskiy 提交于
      When pnv_pci_ioda_fixup() is called during PHB fixup time, each PE in
      the sorted list of PEs (phb::pe_dma_list) is iterated to setup the PE's
      DMA32 space by pnv_ioda_setup_bus_dma() if the PE's DMA32 weight is bigger
      than zero. The function also assigns all the subordinate PCI devices of
      the PE's primary bus with the PE's DMA32 IOMMU table. It causes the PCI
      devicess in the child PEs, which don't have DMA weight, receives wrong
      IOMMU table and then IOMMU group.
      
      The patch fixes above issue by more check on the PE's coverage and don't
      assign IOMMU table to those PCI devices, which belong to the child PEs.
      The problem was found on Firestone platform initially.
      Suggested-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5c89a87d
  10. 18 6月, 2015 3 次提交
  11. 15 6月, 2015 1 次提交
  12. 11 6月, 2015 16 次提交