1. 10 11月, 2011 5 次提交
    • O
      iommu/amd: announce supported page sizes · aa3de9c0
      Ohad Ben-Cohen 提交于
      Let the IOMMU core know we support arbitrary page sizes (as long as
      they're an order of 4KiB).
      
      This way the IOMMU core will retain the existing behavior we're used to;
      it will let us map regions that:
      - their size is an order of 4KiB
      - they are naturally aligned
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Cc: Joerg Roedel <Joerg.Roedel@amd.com>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      aa3de9c0
    • O
      iommu/msm: announce supported page sizes · 83427275
      Ohad Ben-Cohen 提交于
      Let the IOMMU core know we support 4KiB, 64KiB, 1MiB and 16MiB page sizes.
      
      This way the IOMMU core can split any arbitrary-sized physically
      contiguous regions (that it needs to map) as needed.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Acked-by: NDavid Brown <davidb@codeaurora.org>
      Cc: Stepan Moskovchenko <stepanm@codeaurora.org>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      83427275
    • O
      iommu/omap: announce supported page sizes · 66bc8cf3
      Ohad Ben-Cohen 提交于
      Let the IOMMU core know we support 4KiB, 64KiB, 1MiB and 16MiB page sizes.
      
      This way the IOMMU core can split any arbitrary-sized physically
      contiguous regions (that it needs to map) as needed.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Cc: Hiroshi DOYU <hdoyu@nvidia.com>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      66bc8cf3
    • O
      iommu/core: split mapping to page sizes as supported by the hardware · 7d3002cc
      Ohad Ben-Cohen 提交于
      When mapping a memory region, split it to page sizes as supported
      by the iommu hardware. Always prefer bigger pages, when possible,
      in order to reduce the TLB pressure.
      
      The logic to do that is now added to the IOMMU core, so neither the iommu
      drivers themselves nor users of the IOMMU API have to duplicate it.
      
      This allows a more lenient granularity of mappings; traditionally the
      IOMMU API took 'order' (of a page) as a mapping size, and directly let
      the low level iommu drivers handle the mapping, but now that the IOMMU
      core can split arbitrary memory regions into pages, we can remove this
      limitation, so users don't have to split those regions by themselves.
      
      Currently the supported page sizes are advertised once and they then
      remain static. That works well for OMAP and MSM but it would probably
      not fly well with intel's hardware, where the page size capabilities
      seem to have the potential to be different between several DMA
      remapping devices.
      
      register_iommu() currently sets a default pgsize behavior, so we can convert
      the IOMMU drivers in subsequent patches. After all the drivers
      are converted, the temporary default settings will be removed.
      
      Mainline users of the IOMMU API (kvm and omap-iovmm) are adopted
      to deal with bytes instead of page order.
      
      Many thanks to Joerg Roedel <Joerg.Roedel@amd.com> for significant review!
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Joerg Roedel <Joerg.Roedel@amd.com>
      Cc: Stepan Moskovchenko <stepanm@codeaurora.org>
      Cc: KyongHo Cho <pullip.cho@samsung.com>
      Cc: Hiroshi DOYU <hdoyu@nvidia.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: kvm@vger.kernel.org
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      7d3002cc
    • O
      iommu/core: stop converting bytes to page order back and forth · 5009065d
      Ohad Ben-Cohen 提交于
      Express sizes in bytes rather than in page order, to eliminate the
      size->order->size conversions we have whenever the IOMMU API is calling
      the low level drivers' map/unmap methods.
      
      Adopt all existing drivers.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Joerg Roedel <Joerg.Roedel@amd.com>
      Cc: Stepan Moskovchenko <stepanm@codeaurora.org>
      Cc: KyongHo Cho <pullip.cho@samsung.com>
      Cc: Hiroshi DOYU <hdoyu@nvidia.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      5009065d
  2. 08 11月, 2011 28 次提交
  3. 07 11月, 2011 7 次提交