1. 04 7月, 2014 6 次提交
  2. 20 6月, 2014 2 次提交
  3. 05 6月, 2014 1 次提交
    • A
      intel-iommu: integrate DMA CMA · 36746436
      Akinobu Mita 提交于
      This adds support for the DMA Contiguous Memory Allocator for
      intel-iommu.  This change enables dma_alloc_coherent() to allocate big
      contiguous memory.
      
      It is achieved in the same way as nommu_dma_ops currently does, i.e.
      trying to allocate memory by dma_alloc_from_contiguous() and
      alloc_pages() is used as a fallback.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Don Dutile <ddutile@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      36746436
  4. 31 5月, 2014 2 次提交
  5. 28 5月, 2014 1 次提交
  6. 27 5月, 2014 1 次提交
  7. 26 5月, 2014 21 次提交
  8. 16 5月, 2014 3 次提交
  9. 14 5月, 2014 3 次提交
    • B
      iommu/exynos: Remove unnecessary "&" from function pointers · ba5fa6f6
      Bjorn Helgaas 提交于
      Remove unnecessary "&" from function pointers in exynos_iommu_ops.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      ba5fa6f6
    • C
      iommu/exynos: Apply workaround of caching fault page table entries · 66a7ed84
      Cho KyongHo 提交于
      This patch contains 2 workaround for the System MMU v3.x.
      
      System MMU v3.2 and v3.3 has FLPD cache that caches first level page
      table entries to reduce page table walking latency. However, the
      FLPD cache is filled with a first level page table entry even though
      it is not accessed by a master H/W because System MMU v3.3
      speculatively prefetches page table entries that may be accessed
      in the near future by the master H/W.
      The prefetched FLPD cache entries are not invalidated by iommu_unmap()
      because iommu_unmap() only unmaps and invalidates the page table
      entries that is mapped.
      
      Because exynos-iommu driver discards a second level page table when
      it needs to be replaced with another second level page table or
      a first level page table entry with 1MB mapping, It is required to
      invalidate FLPD cache that may contain the first level page table
      entry that points to the second level page table.
      
      Another workaround of System MMU v3.3 is initializing the first level
      page table entries with the second level page table which is filled
      with all zeros. This prevents System MMU prefetches 'fault' first
      level page table entry which may lead page fault on access to 16MiB
      wide.
      
      System MMU 3.x fetches consecutive page table entries by a page
      table walking to maximize bus utilization and to minimize TLB miss
      panelty.
      Unfortunately, functional problem is raised with the fetching behavior
      because it fetches 'fault' page table entries that specifies no
      translation information and that a valid translation information will
      be written to in the near future. The logic in the System MMU generates
      page fault with the cached fault entries that is no longer coherent
      with the page table which is updated.
      
      There is another workaround that must be implemented by I/O virtual
      memory manager: any two consecutive I/O virtual memory area must have
      a hole between the two that is larger than or equal to 128KiB.
      Also, next I/O virtual memory area must be started from the next
      128KiB boundary.
      
      0            128K           256K               384K             512K
      |-------------|---------------|-----------------|----------------|
      |area1---------------->|.........hole...........|<--- area2 -----
      
      The constraint is depicted above.
      The size is selected by the calculation followed:
       - System MMU can fetch consecutive 64 page table entries at once
         64 * 4KiB = 256KiB. This is the size between 128K ~ 384K of the
         above picture. This style of fetching is 'block fetch'. It fetches
         the page table entries predefined consecutive page table entries
         including the entry that is the reason of the page table walking.
       - System MMU can prefetch upto consecutive 32 page table entries.
         This is the size between 256K ~ 384K.
      Signed-off-by: NCho KyongHo <pullip.cho@samsung.com>
      Signed-off-by: NShaik Ameer Basha <shaik.ameer@samsung.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      66a7ed84
    • C
      iommu/exynos: Turn on useful configuration options · eeb5184b
      Cho KyongHo 提交于
      This turns on FLPD_CACHE, ACGEN and SYSSEL.
      
      FLPD_CACHE is a cache of 1st level page table entries that contains
      the address of a 2nd level page table to reduce latency of page table
      walking.
      
      ACGEN is architectural clock gating that gates clocks by System MMU
      itself if it is not active. Note that ACGEN is different from clock
      gating by the CPU. ACGEN just gates clocks to the internal logic of
      System MMU while clock gating by the CPU gates clocks to the System
      MMU.
      
      SYSSEL selects System MMU version in some Exynos SoCs. Some Exynos
      SoCs have an option to select System MMU versions exclusively because
      the SoCs adopts new System MMU version experimentally.
      
      This also always selects LRU as TLB replacement policy. Selecting TLB
      replacement policy is deprecated from System MMU 3.2. TLB in System
      MMU 3.3 has single TLB replacement policy, LRU. The bit of MMU_CFG
      selecting TLB replacement policy is remained as reserved.
      
      QoS value of page table walking is set to 15 (highst value). System
      MMU 3.3 can inherit QoS value of page table walking from its master
      H/W's transaction. This new feature is enabled by default and QoS
      value written to MMU_CFG is ignored.
      
      This patch also adds simplifies the sysmmu version checking by
      introducing some macros.
      Signed-off-by: NCho KyongHo <pullip.cho@samsung.com>
      Signed-off-by: NShaik Ameer Basha <shaik.ameer@samsung.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      eeb5184b