1. 27 Jul, 2018 3 commits
    • Robin Murphy's avatar
      dma-mapping: Generalise dma_32bit_limit flag · f07d141f
      Robin Murphy authored
      Whilst the notion of an upstream DMA restriction is most commonly seen
      in PCI host bridges saddled with a 32-bit native interface, a more
      general version of the same issue can exist on complex SoCs where a bus
      or point-to-point interconnect link from a device's DMA master interface
      to another component along the path to memory (often an IOMMU) may carry
      fewer address bits than the interfaces at both ends nominally support.
      In order to properly deal with this, the first step is to expand the
      dma_32bit_limit flag into an arbitrary mask.
      
      To minimise the impact on existing code, we'll make sure to only
      consider this new mask valid if set. That makes sense anyway, since a
      mask of zero would represent DMA not being wired up at all, and that
      would be better handled by not providing valid ops in the first place.
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      f07d141f
    • Robin Murphy's avatar
      ACPI/IORT: Support address size limit for root complexes · 5ac65e8c
      Robin Murphy authored
      IORT revision D allows PCI root complex nodes to specify a memory
      address size limit equivalently to named components, to help describe
      straightforward integrations which don't really warrant a full-blown
      _DMA method. Now that our headers are up-to-date, plumb it in.
      
      If both _DMA and an address size limit are present, we would always
      expect the former to be a more specific subset of the latter (since it
      makes little sense for a _DMA range to involve bits which IORT says
      aren't wired up), thus we can save calculating an explicit intersection
      of the two effective masks and simply use short-circuit logic instead.
      Reviewed-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      5ac65e8c
    • Robin Murphy's avatar
      of/platform: Initialise default DMA masks · a5516219
      Robin Murphy authored
      When of_dma_configure() was first born in 591c1ee4 ("of: configure
      the platform device dma parameters"), everything DMA-related was
      factored out of of_platform_device_create_pdata() as seemed appropriate
      at the time. However, now that of_dma_configure() has grown into the
      generic handler for processing DMA-related properties from DT for all
      kinds of devices, it is no longer an appropriate place to be doing
      OF-platform-specific business. Since there are still plenty of platform
      drivers not setting their own masks and depending on the bus default,
      let's reinstate that inialisation in the OF-platform code itself, and
      restore the long-standing status quo from 0589342c ("of: set
      dma_mask to point to coherent_dma_mask")
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      a5516219
  2. 25 Jul, 2018 3 commits
  3. 22 Jul, 2018 8 commits
  4. 21 Jul, 2018 12 commits
  5. 20 Jul, 2018 14 commits