1. 20 3月, 2018 1 次提交
  2. 19 9月, 2017 2 次提交
    • G
      iommu/qcom: Depend on HAS_DMA to fix compile error · 986a5f70
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
          warning: (IPMMU_VMSA && ARM_SMMU && ARM_SMMU_V3 && QCOM_IOMMU) selects IOMMU_IO_PGTABLE_LPAE which has unmet direct dependencies (IOMMU_SUPPORT && HAS_DMA && (ARM || ARM64 || COMPILE_TEST && !GENERIC_ATOMIC64))
      
      and
      
          drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_sync_pte':
          io-pgtable-arm.c:(.text+0x206): undefined reference to `bad_dma_ops'
          drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_free_pages':
          io-pgtable-arm.c:(.text+0x6a6): undefined reference to `bad_dma_ops'
          drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_alloc_pages':
          io-pgtable-arm.c:(.text+0x812): undefined reference to `bad_dma_ops'
          io-pgtable-arm.c:(.text+0x81c): undefined reference to `bad_dma_ops'
          io-pgtable-arm.c:(.text+0x862): undefined reference to `bad_dma_ops'
          drivers/iommu/io-pgtable-arm.o: In function `arm_lpae_run_tests':
          io-pgtable-arm.c:(.init.text+0x86): undefined reference to `alloc_io_pgtable_ops'
          io-pgtable-arm.c:(.init.text+0x47c): undefined reference to `free_io_pgtable_ops'
          drivers/iommu/qcom_iommu.o: In function `qcom_iommu_init_domain':
          qcom_iommu.c:(.text+0x1ce): undefined reference to `alloc_io_pgtable_ops'
          drivers/iommu/qcom_iommu.o: In function `qcom_iommu_domain_free':
          qcom_iommu.c:(.text+0x754): undefined reference to `free_io_pgtable_ops'
      
      QCOM_IOMMU selects IOMMU_IO_PGTABLE_LPAE, which bypasses its dependency
      on HAS_DMA.  Make QCOM_IOMMU depend on HAS_DMA to fix this.
      
      Fixes: 0ae349a0 ("iommu/qcom: Add qcom_iommu")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      986a5f70
    • G
      iommu: Add missing dependencies · a4aaeccc
      Guenter Roeck 提交于
      parisc:allmodconfig, xtensa:allmodconfig, and possibly others generate
      the following Kconfig warning.
      
      warning: (IPMMU_VMSA && ARM_SMMU && ARM_SMMU_V3 && QCOM_IOMMU) selects
      IOMMU_IO_PGTABLE_LPAE which has unmet direct dependencies (IOMMU_SUPPORT &&
      HAS_DMA && (ARM || ARM64 || COMPILE_TEST && !GENERIC_ATOMIC64))
      
      IOMMU_IO_PGTABLE_LPAE depends on (COMPILE_TEST && !GENERIC_ATOMIC64),
      so any configuration option selecting it needs to have the same dependencies.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      a4aaeccc
  3. 15 8月, 2017 3 次提交
  4. 04 8月, 2017 1 次提交
  5. 24 6月, 2017 1 次提交
    • W
      iommu/io-pgtable: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST with LPAE · c1004803
      Will Deacon 提交于
      The LPAE/ARMv8 page table format relies on the ability to read and write
      64-bit page table entries in an atomic fashion. With the move to a lockless
      implementation, we also need support for cmpxchg64 to resolve races when
      installing table entries concurrently.
      
      Unfortunately, not all architectures support cmpxchg64, so the code can
      fail to compiler when building for these architectures using COMPILE_TEST.
      Rather than disable COMPILE_TEST altogether, instead check that
      GENERIC_ATOMIC64 is not selected, which is a reasonable indication that
      the architecture has support for 64-bit cmpxchg.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      c1004803
  6. 17 5月, 2017 3 次提交
  7. 31 3月, 2017 1 次提交
  8. 06 2月, 2017 1 次提交
    • A
      iommu/mediatek: Remove bogus 'select' statements · 087a908f
      Arnd Bergmann 提交于
      The mediatek IOMMU driver enables some drivers that it does not directly
      rely on, and that causes a warning for build testing:
      
      warning: (MTK_IOMMU_V1) selects COMMON_CLK_MT2701_VDECSYS which has unmet direct dependencies (COMMON_CLK && COMMON_CLK_MT2701)
      warning: (MTK_IOMMU_V1) selects COMMON_CLK_MT2701_IMGSYS which has unmet direct dependencies (COMMON_CLK && COMMON_CLK_MT2701)
      warning: (MTK_IOMMU_V1) selects COMMON_CLK_MT2701_MMSYS which has unmet direct dependencies (COMMON_CLK && COMMON_CLK_MT2701)
      
      This removes the select statements.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      087a908f
  9. 16 9月, 2016 1 次提交
  10. 13 7月, 2016 1 次提交
  11. 21 6月, 2016 3 次提交
  12. 09 5月, 2016 1 次提交
  13. 07 4月, 2016 1 次提交
  14. 01 3月, 2016 1 次提交
  15. 29 2月, 2016 1 次提交
    • A
      iommu/mediatek: Select ARM_DMA_USE_IOMMU · 1928832f
      Arnd Bergmann 提交于
      The newly added Mediatek IOMMU driver uses the IOMMU_DMA infrastructure,
      but unlike other such drivers, it does not select 'ARM_DMA_USE_IOMMU',
      which is a prerequisite, leading to a link error:
      
      warning: (MTK_IOMMU) selects IOMMU_DMA which has unmet direct dependencies (IOMMU_SUPPORT && NEED_SG_DMA_LENGTH)
      drivers/iommu/built-in.o: In function `iommu_put_dma_cookie':
      mtk_iommu.c:(.text+0x11fe): undefined reference to `put_iova_domain'
      drivers/iommu/built-in.o: In function `iommu_dma_init_domain':
      mtk_iommu.c:(.text+0x1316): undefined reference to `init_iova_domain'
      drivers/iommu/built-in.o: In function `__iommu_dma_unmap':
      mtk_iommu.c:(.text+0x1380): undefined reference to `find_iova'
      
      This adds the same select that the other drivers have. On a related
      note, I wonder if we should just always select ARM_DMA_USE_IOMMU
      whenever any IOMMU driver is enabled. Are there any cases where
      we would enable an IOMMU but not use it?
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 0df4fabe ("iommu/mediatek: Add mt8173 IOMMU driver")
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      1928832f
  16. 25 2月, 2016 3 次提交
  17. 17 2月, 2016 1 次提交
  18. 14 12月, 2015 1 次提交
  19. 15 10月, 2015 5 次提交
  20. 06 10月, 2015 2 次提交
  21. 04 10月, 2015 2 次提交
  22. 23 9月, 2015 1 次提交
    • R
      iommu/io-pgtable-arm: Don't use dma_to_phys() · ffcb6d16
      Robin Murphy 提交于
      In checking whether DMA addresses differ from physical addresses, using
      dma_to_phys() is actually the wrong thing to do, since it may hide any
      DMA offset, which is precisely one of the things we are checking for.
      Simply casting between the two address types, whilst ugly, is in fact
      the appropriate course of action. Further care (and ugliness) is also
      necessary in the comparison to avoid truncation if phys_addr_t and
      dma_addr_t differ in size.
      
      We can also reject any device with a fixed DMA offset up-front at page
      table creation, leaving the allocation-time check for the more subtle
      cases like bounce buffering due to an incorrect DMA mask.
      
      Furthermore, we can then fix the hackish KConfig dependency so that
      architectures without a dma_to_phys() implementation may still
      COMPILE_TEST (or even use!) the code. The true dependency is on the
      DMA API, so use the appropriate symbol for that.
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      [will: folded in selftest fix from Yong Wu]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      ffcb6d16
  23. 13 8月, 2015 1 次提交
  24. 06 8月, 2015 1 次提交
    • R
      iommu/io-pgtable-arm: Allow appropriate DMA API use · f8d54961
      Robin Murphy 提交于
      Currently, users of the LPAE page table code are (ab)using dma_map_page()
      as a means to flush page table updates for non-coherent IOMMUs. Since
      from the CPU's point of view, creating IOMMU page tables *is* passing
      DMA buffers to a device (the IOMMU's page table walker), there's little
      reason not to use the DMA API correctly.
      
      Allow IOMMU drivers to opt into DMA API operations for page table
      allocation and updates by providing their appropriate device pointer.
      The expectation is that an LPAE IOMMU should have a full view of system
      memory, so use streaming mappings to avoid unnecessary pressure on
      ZONE_DMA, and treat any DMA translation as a warning sign.
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f8d54961
  25. 28 7月, 2015 1 次提交