1. 07 4月, 2016 2 次提交
  2. 05 4月, 2016 2 次提交
    • R
      iommu/dma: Restore scatterlist offsets correctly · 07b48ac4
      Robin Murphy 提交于
      With the change to stashing just the IOVA-page-aligned remainder of the
      CPU-page offset rather than the whole thing, the failure path in
      __invalidate_sg() also needs tweaking to account for that in the case of
      differing page sizes where the two offsets may not be equivalent.
      Similarly in __finalise_sg(), lest the architecture-specific wrappers
      later get the wrong address for cache maintenance on sync or unmap.
      
      Fixes: 164afb1d ("iommu/dma: Use correct offset in map_sg")
      Reported-by: NMagnus Damm <damm+renesas@opensource.se>
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Cc: stable@ver.kernel.org # v4.4+
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      07b48ac4
    • A
      iommu: provide of_xlate pointer unconditionally · b70bb984
      Arnd Bergmann 提交于
      iommu drivers that support the standard DT bindings use a of_xlate
      callback pointer, but that is only part of struct iommu_ops when
      CONFIG_OF_IOMMU is enabled, leading to build errors in randconfig
      builds when that is not provided:
      
      drivers/iommu/mtk_iommu.c:497:2: error: unknown field 'of_xlate' specified in initializer
        .of_xlate = mtk_iommu_of_xlate,
        ^
      drivers/iommu/mtk_iommu.c:497:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
        .of_xlate = mtk_iommu_of_xlate,
                    ^~~~~~~~~~~~~~~~~~
      drivers/iommu/mtk_iommu.c:497:14: note: (near initialization for 'mtk_iommu_ops.domain_get_attr')
      
      We can work around it by adding more #ifdefs in each driver, but
      it seems nicer to just allow setting the pointer even if it is
      unused. This makes the driver code look nicer, and it gives better
      compile-time coverage when test building on other architectures.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 0df4fabe ("iommu/mediatek: Add mt8173 IOMMU driver")
      Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      b70bb984
  3. 03 4月, 2016 9 次提交
  4. 02 4月, 2016 27 次提交