1. 20 6月, 2013 1 次提交
    • A
      iommu: Split iommu_unmaps · bd13969b
      Alex Williamson 提交于
      iommu_map splits requests into pages that the iommu driver reports
      that it can handle.  The iommu_unmap path does not do the same.  This
      can cause problems not only from callers that might expect the same
      behavior as the map path, but even from the failure path of iommu_map,
      should it fail at a point where it has mapped and needs to unwind a
      set of pages that the iommu driver cannot handle directly.  amd_iommu,
      for example, will BUG_ON if asked to unmap a non power of 2 size.
      
      Fix this by extracting and generalizing the sizing code from the
      iommu_map path and use it for both map and unmap.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      bd13969b
  2. 02 5月, 2013 1 次提交
    • V
      iommu/tegra: Fix printk formats for dma_addr_t · 72ca55db
      Varun Sethi 提交于
      Fix printk formats for dma_addr_t:
      
         drivers/iommu/tegra-smmu.c: In function 'smmu_iommu_iova_to_phys':
      >> drivers/iommu/tegra-smmu.c:774:2: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat]
      --
         drivers/iommu/tegra-gart.c: In function 'gart_iommu_iova_to_phys':
      >> drivers/iommu/tegra-gart.c:298:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat]
      Signed-off-by: NVarun Sethi <Varun.Sethi@freescale.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      72ca55db
  3. 25 4月, 2013 2 次提交
  4. 24 4月, 2013 1 次提交
  5. 23 4月, 2013 4 次提交
    • V
      iommu: Move swap_pci_ref function to drivers/iommu/pci.h. · 61e015ac
      Varun Sethi 提交于
      The swap_pci_ref function is used by the IOMMU API code for
      swapping pci device pointers, while determining the iommu
      group for the device.
      Currently this function was being implemented for different
      IOMMU drivers.  This patch moves the function to a new file,
      drivers/iommu/pci.h so that the implementation can be
      shared across various IOMMU drivers.
      Signed-off-by: NVarun Sethi <Varun.Sethi@freescale.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      61e015ac
    • T
      iommu/vt-d: Disable translation if already enabled · 3a93c841
      Takao Indoh 提交于
      This patch disables translation(dma-remapping) before its initialization
      if it is already enabled.
      
      This is needed for kexec/kdump boot. If dma-remapping is enabled in the
      first kernel, it need to be disabled before initializing its page table
      during second kernel boot. Wei Hu also reported that this is needed
      when second kernel boots with intel_iommu=off.
      
      Basically iommu->gcmd is used to know whether translation is enabled or
      disabled, but it is always zero at boot time even when translation is
      enabled since iommu->gcmd is initialized without considering such a
      case. Therefor this patch synchronizes iommu->gcmd value with global
      command register when iommu structure is allocated.
      Signed-off-by: NTakao Indoh <indou.takao@jp.fujitsu.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      3a93c841
    • W
      iommu/amd: fix error return code in early_amd_iommu_init() · 83ed9c13
      Wei Yongjun 提交于
      Fix to return -ENOMEM int the memory alloc error handling
      case instead of 0, as done elsewhere in this function.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      83ed9c13
    • S
      iommu/AMD: Per-thread IOMMU Interrupt Handling · 3f398bc7
      Suravee Suthikulpanit 提交于
      In the current interrupt handling scheme, there are as many threads as
      the number of IOMMUs. Each thread is created and assigned to an IOMMU at
      the time of registering interrupt handlers (request_threaded_irq).
      When an IOMMU HW generates an interrupt, the irq handler (top half) wakes up
      the corresponding thread to process event and PPR logs of all IOMMUs
      starting from the 1st IOMMU.
      
      In the system with multiple IOMMU,this handling scheme complicates the
      synchronization of the IOMMU data structures and status registers as
      there could be multiple threads competing for the same IOMMU while
      the other IOMMU could be left unhandled.
      
      To simplify, this patch is proposing a different interrupt handling scheme
      by having each thread only managing interrupts of the corresponding IOMMU.
      This can be achieved by passing the struct amd_iommu when registering the
      interrupt handlers. This structure is unique for each IOMMU and can be used
      by the bottom half thread to identify the IOMMU to be handled instead
      of calling for_each_iommu.  Besides this also eliminate the needs to lock
      the IOMMU for processing event and PPR logs.
      Signed-off-by: NSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      3f398bc7
  6. 20 4月, 2013 6 次提交
  7. 18 4月, 2013 4 次提交
  8. 03 4月, 2013 2 次提交
  9. 02 4月, 2013 1 次提交
  10. 27 3月, 2013 4 次提交
  11. 26 3月, 2013 1 次提交
  12. 10 3月, 2013 2 次提交
  13. 06 3月, 2013 1 次提交
  14. 26 2月, 2013 1 次提交
  15. 23 2月, 2013 1 次提交
  16. 20 2月, 2013 1 次提交
  17. 19 2月, 2013 2 次提交
  18. 13 2月, 2013 1 次提交
  19. 08 2月, 2013 4 次提交