1. 15 8月, 2017 3 次提交
  2. 04 8月, 2017 1 次提交
  3. 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
  4. 17 5月, 2017 3 次提交
  5. 31 3月, 2017 1 次提交
  6. 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
  7. 16 9月, 2016 1 次提交
  8. 13 7月, 2016 1 次提交
  9. 21 6月, 2016 3 次提交
  10. 09 5月, 2016 1 次提交
  11. 07 4月, 2016 1 次提交
  12. 01 3月, 2016 1 次提交
  13. 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
  14. 25 2月, 2016 3 次提交
  15. 17 2月, 2016 1 次提交
  16. 14 12月, 2015 1 次提交
  17. 15 10月, 2015 5 次提交
  18. 06 10月, 2015 2 次提交
  19. 04 10月, 2015 2 次提交
  20. 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
  21. 13 8月, 2015 1 次提交
  22. 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
  23. 28 7月, 2015 1 次提交
  24. 02 6月, 2015 1 次提交
    • G
      break kconfig dependency loop · 06b718c0
      Gerd Hoffmann 提交于
      After adding virtio-gpu I get this funky kconfig dependency loop.
      
      scripts/kconfig/conf --oldconfig Kconfig
      drivers/video/fbdev/Kconfig:5:error: recursive dependency detected!
      drivers/video/fbdev/Kconfig:5:  symbol FB is selected by DRM_KMS_FB_HELPER
      drivers/gpu/drm/Kconfig:34:     symbol DRM_KMS_FB_HELPER is selected by DRM_VIRTIO_GPU
      drivers/gpu/drm/virtio/Kconfig:1:       symbol DRM_VIRTIO_GPU depends on VIRTIO
      drivers/virtio/Kconfig:1:       symbol VIRTIO is selected by REMOTEPROC
      drivers/remoteproc/Kconfig:4:   symbol REMOTEPROC is selected by OMAP_REMOTEPROC
      drivers/remoteproc/Kconfig:12:  symbol OMAP_REMOTEPROC depends on OMAP_IOMMU
      drivers/iommu/Kconfig:141:      symbol OMAP_IOMMU is selected by VIDEO_OMAP3
      drivers/media/platform/Kconfig:96:      symbol VIDEO_OMAP3 depends on VIDEO_V4L2
      drivers/media/v4l2-core/Kconfig:6:      symbol VIDEO_V4L2 depends on I2C
      drivers/i2c/Kconfig:7:  symbol I2C is selected by FB_DDC
      drivers/video/fbdev/Kconfig:59: symbol FB_DDC is selected by FB_CYBER2000_DDC
      drivers/video/fbdev/Kconfig:374:        symbol FB_CYBER2000_DDC depends on FB_CYBER2000
      drivers/video/fbdev/Kconfig:362:        symbol FB_CYBER2000 depends on FB
      
      Making VIDEO_OMAP3 depend on OMAP_IOMMU instead of selecting it breaks the
      loop, which looks like the best way to handle it to me.  Updated OMAP_IOMMU
      help text accordingly.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Acked-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      06b718c0
  25. 29 5月, 2015 1 次提交
    • W
      iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices · 48ec83bc
      Will Deacon 提交于
      Version three of the ARM SMMU architecture introduces significant
      changes and improvements over previous versions of the specification,
      necessitating a new driver in the Linux kernel.
      
      The main change to the programming interface is that the majority of the
      configuration data has been moved from MMIO registers to in-memory data
      structures, with communication between the CPU and the SMMU being
      mediated via in-memory circular queues.
      
      This patch adds an initial driver for SMMUv3 to Linux. We currently
      support pinned stage-1 (DMA) and stage-2 (KVM VFIO) mappings using the
      generic IO-pgtable code.
      
      Cc: Robin Murphy <robin.murphy@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      48ec83bc
  26. 04 5月, 2015 1 次提交