1. 09 5月, 2016 1 次提交
    • R
      iommu: Allow selecting page sizes per domain · d16e0faa
      Robin Murphy 提交于
      Many IOMMUs support multiple page table formats, meaning that any given
      domain may only support a subset of the hardware page sizes presented in
      iommu_ops->pgsize_bitmap. There are also certain use-cases where the
      creator of a domain may want to control which page sizes are used, for
      example to force the use of hugepage mappings to reduce pagetable walk
      depth.
      
      To this end, add a per-domain pgsize_bitmap to represent the subset of
      page sizes actually in use, to make it possible for domains with
      different requirements to coexist.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      [rm: hijacked and rebased original patch with new commit message]
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      d16e0faa
  2. 12 4月, 2016 1 次提交
  3. 07 4月, 2016 1 次提交
  4. 25 2月, 2016 1 次提交
  5. 16 12月, 2015 1 次提交
    • D
      Revert "scatterlist: use sg_phys()" · 3e6110fd
      Dan Williams 提交于
      commit db0fa0cb "scatterlist: use sg_phys()" did replacements of
      the form:
      
          phys_addr_t phys = page_to_phys(sg_page(s));
          phys_addr_t phys = sg_phys(s) & PAGE_MASK;
      
      However, this breaks platforms where sizeof(phys_addr_t) >
      sizeof(unsigned long).  Revert for 4.3 and 4.4 to make room for a
      combined helper in 4.5.
      
      Cc: <stable@vger.kernel.org>
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Fixes: db0fa0cb ("scatterlist: use sg_phys()")
      Suggested-by: NJoerg Roedel <joro@8bytes.org>
      Reported-by: NVitaly Lavrov <vel21ripn@gmail.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      3e6110fd
  6. 22 10月, 2015 5 次提交
  7. 17 8月, 2015 1 次提交
    • D
      scatterlist: use sg_phys() · db0fa0cb
      Dan Williams 提交于
      Coccinelle cleanup to replace open coded sg to physical address
      translations.  This is in preparation for introducing scatterlists that
      reference __pfn_t.
      
      // sg_phys.cocci: convert usage page_to_phys(sg_page(sg)) to sg_phys(sg)
      // usage: make coccicheck COCCI=sg_phys.cocci MODE=patch
      
      virtual patch
      
      @@
      struct scatterlist *sg;
      @@
      
      - page_to_phys(sg_page(sg)) + sg->offset
      + sg_phys(sg)
      
      @@
      struct scatterlist *sg;
      @@
      
      - page_to_phys(sg_page(sg))
      + sg_phys(sg) & PAGE_MASK
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      db0fa0cb
  8. 30 6月, 2015 1 次提交
  9. 11 6月, 2015 2 次提交
  10. 09 6月, 2015 7 次提交
  11. 05 6月, 2015 5 次提交
  12. 29 5月, 2015 1 次提交
  13. 31 3月, 2015 4 次提交
  14. 04 2月, 2015 1 次提交
  15. 26 1月, 2015 1 次提交
  16. 19 1月, 2015 2 次提交
  17. 02 12月, 2014 2 次提交
  18. 04 11月, 2014 3 次提交
    • H
      iommu: Improve error handling when setting bus iommu · d7da6bdc
      Heiko Stübner 提交于
      When some part of bus_set_iommu fails it should undo any made changes
      and not simply leave everything as is.
      
      This includes unregistering the bus notifier in iommu_bus_init when
      add_iommu_group fails and also setting the bus->iommu_ops back to NULL.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      d7da6bdc
    • J
      iommu: Do more input validation in iommu_map_sg() · 38ec010d
      Joerg Roedel 提交于
      The IOMMU-API works on page boundarys, unlike the DMA-API
      which can work with sub-page buffers. The sg->offset
      field does not make sense on the IOMMU level, so force it to
      be 0. Do some error-path consolidation while at it.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      38ec010d
    • O
      iommu: Add iommu_map_sg() function · 315786eb
      Olav Haugan 提交于
      Mapping and unmapping are more often than not in the critical path.
      map_sg allows IOMMU driver implementations to optimize the process
      of mapping buffers into the IOMMU page tables.
      
      Instead of mapping a buffer one page at a time and requiring potentially
      expensive TLB operations for each page, this function allows the driver
      to map all pages in one go and defer TLB maintenance until after all
      pages have been mapped.
      
      Additionally, the mapping operation would be faster in general since
      clients does not have to keep calling map API over and over again for
      each physically contiguous chunk of memory that needs to be mapped to a
      virtually contiguous region.
      Signed-off-by: NOlav Haugan <ohaugan@codeaurora.org>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      315786eb