1. 10 5月, 2016 1 次提交
  2. 09 5月, 2016 4 次提交
  3. 04 5月, 2016 9 次提交
  4. 21 4月, 2016 2 次提交
  5. 11 4月, 2016 1 次提交
    • J
      iommu/amd: Fix checking of pci dma aliases · e3156048
      Joerg Roedel 提交于
      Commit 61289cba ('iommu/amd: Remove old alias handling code')
      removed the old alias handling code from the AMD IOMMU
      driver because this is now handled by the IOMMU core code.
      
      But this also removed the handling of PCI aliases, which is
      not handled by the core code. This caused issues with PCI
      devices that have hidden PCIe-to-PCI bridges that rewrite
      the request-id.
      
      Fix this bug by re-introducing some of the removed functions
      from commit 61289cba and add a alias field
      'struct iommu_dev_data'. This field carrys the return value
      of the get_alias() function and uses that instead of the
      amd_iommu_alias_table[] array in the code.
      
      Fixes: 61289cba ('iommu/amd: Remove old alias handling code')
      Cc: stable@vger.kernel.org # v4.4+
      Tested-by: NTomasz Golinski <tomaszg@math.uwb.edu.pl>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      e3156048
  6. 07 4月, 2016 3 次提交
  7. 05 4月, 2016 1 次提交
  8. 02 3月, 2016 2 次提交
    • D
      iommu/mediatek: Check for NULL instead of IS_ERR() · 3189e490
      Dan Carpenter 提交于
      of_platform_device_create() returns NULL on error, it never returns
      error pointers.
      
      Fixes: 0df4fabe ('iommu/mediatek: Add mt8173 IOMMU driver')
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      3189e490
    • R
      iommu/io-pgtable-armv7s: Fix kmem_cache_alloc() flags · 048b31ca
      Robin Murphy 提交于
      Whilst the default SLUB allocator happily just merges the original
      allocation flags from kmem_cache_create() with those passed through
      kmem_cache_alloc(), there is a code path in the SLAB allocator which
      will aggressively BUG_ON() if the cache was created with SLAB_CACHE_DMA
      but GFP_DMA is not specified for an allocation:
      
        kernel BUG at mm/slab.c:2536!
        Internal error: Oops - BUG: 0 [#1] SMP ARM
        Modules linked in:[    1.299311] Modules linked in:
      
        CPU: 1 PID: 1 Comm: swapper/0 Not tainted
        4.5.0-rc6-koelsch-05892-ge7e45ad53ab6795e #2270
        Hardware name: Generic R8A7791 (Flattened Device Tree)
        task: ef422040 ti: ef442000 task.ti: ef442000
        PC is at cache_alloc_refill+0x2a0/0x530
        LR is at _raw_spin_unlock+0x8/0xc
      ...
        [<c02c6928>] (cache_alloc_refill) from [<c02c6630>] (kmem_cache_alloc+0x7c/0xd4)
        [<c02c6630>] (kmem_cache_alloc) from [<c04444bc>]
        (__arm_v7s_alloc_table+0x5c/0x278)
        [<c04444bc>] (__arm_v7s_alloc_table) from [<c0444e1c>]
        (__arm_v7s_map.constprop.6+0x68/0x25c)
        [<c0444e1c>] (__arm_v7s_map.constprop.6) from [<c0445044>]
        (arm_v7s_map+0x34/0xa4)
        [<c0445044>] (arm_v7s_map) from [<c0c18ee4>] (arm_v7s_do_selftests+0x140/0x418)
        [<c0c18ee4>] (arm_v7s_do_selftests) from [<c0201760>]
        (do_one_initcall+0x100/0x1b4)
        [<c0201760>] (do_one_initcall) from [<c0c00d4c>]
        (kernel_init_freeable+0x120/0x1e8)
        [<c0c00d4c>] (kernel_init_freeable) from [<c067a364>] (kernel_init+0x8/0xec)
        [<c067a364>] (kernel_init) from [<c0206b68>] (ret_from_fork+0x14/0x2c)
        Code: 1a000003 e7f001f2 e3130001 0a000000 (e7f001f2)
        ---[ end trace 190f6f6b84352efd ]---
      
      Keep the peace by adding GFP_DMA when allocating a table.
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      048b31ca
  9. 01 3月, 2016 4 次提交
  10. 29 2月, 2016 4 次提交
    • A
      iommu/mediatek: Mark PM functions as __maybe_unused · fd99f796
      Arnd Bergmann 提交于
      When CONFIG_PM is unset, we get a harmless warning for this driver:
      
      drivers/iommu/mtk_iommu.c:665:12: error: 'mtk_iommu_suspend' defined but not used [-Werror=unused-function]
      drivers/iommu/mtk_iommu.c:680:12: error: 'mtk_iommu_resume' defined but not used [-Werror=unused-function]
      
      Marking the functions as __maybe_unused gits rid of the two functions
      and lets the compiler silently drop the object code, while still
      doing syntax checking on them for build-time verification.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 0df4fabe ("iommu/mediatek: Add mt8173 IOMMU driver")
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      fd99f796
    • 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
    • M
      iommu/exynos: Use proper readl/writel register interface · 84bd0428
      Marek Szyprowski 提交于
      Drivers should use generic readl/writel calls to access HW registers, so
      replace all __raw_readl/writel with generic version.
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      84bd0428
    • A
      iommu/exynos: Pointers are nto physical addresses · dbf6c6ef
      Arnd Bergmann 提交于
      The exynos iommu driver changed an incorrect cast from pointer
      to 'unsigned int' to an equally incorrect cast to a 'phys_addr_t',
      which results in an obvious compile-time error when phys_addr_t
      is wider than pointers are:
      
      drivers/iommu/exynos-iommu.c: In function 'alloc_lv2entry':
      drivers/iommu/exynos-iommu.c:918:32: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      
      The code does not actually want the physical address (which would
      involve using virt_to_phys()), but just checks the alignment,
      so we can change it to use a cast to uintptr_t instead.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 740a01ee ("iommu/exynos: Add support for v5 SYSMMU")
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      dbf6c6ef
  11. 25 2月, 2016 9 次提交