Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'iommu-fixes-v4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:
"The patches contain:

- fix multiple ARM IOMMU drivers to behave well when the hardware is
not present

- mark MSM driver as broken

- fix build errors with the new ARM generic io-page-table code"

* tag 'iommu-fixes-v4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu/io-pgtable-arm: Add built time dependency
iommu/msm: Mark driver BROKEN
iommu/rockchip: Play nice in multi-platform builds
iommu/omap: Play nice in multi-platform builds
iommu/exynos: Play nice in multi-platform builds
iommu/io-pgtable-arm: Fix self-test WARNs on i386

+26 -2
+2
drivers/iommu/Kconfig
··· 23 23 config IOMMU_IO_PGTABLE_LPAE 24 24 bool "ARMv7/v8 Long Descriptor Format" 25 25 select IOMMU_IO_PGTABLE 26 + depends on ARM || ARM64 || COMPILE_TEST 26 27 help 27 28 Enable support for the ARM long descriptor pagetable format. 28 29 This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page ··· 64 63 bool "MSM IOMMU Support" 65 64 depends on ARM 66 65 depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST 66 + depends on BROKEN 67 67 select IOMMU_API 68 68 help 69 69 Support for the IOMMUs found on certain Qualcomm SOCs.
+7
drivers/iommu/exynos-iommu.c
··· 1186 1186 1187 1187 static int __init exynos_iommu_init(void) 1188 1188 { 1189 + struct device_node *np; 1189 1190 int ret; 1191 + 1192 + np = of_find_matching_node(NULL, sysmmu_of_match); 1193 + if (!np) 1194 + return 0; 1195 + 1196 + of_node_put(np); 1190 1197 1191 1198 lv2table_kmem_cache = kmem_cache_create("exynos-iommu-lv2table", 1192 1199 LV2TABLE_SIZE, LV2TABLE_SIZE, 0, NULL);
+3 -2
drivers/iommu/io-pgtable-arm.c
··· 56 56 ((((d)->levels - ((l) - ARM_LPAE_START_LVL(d) + 1)) \ 57 57 * (d)->bits_per_level) + (d)->pg_shift) 58 58 59 - #define ARM_LPAE_PAGES_PER_PGD(d) ((d)->pgd_size >> (d)->pg_shift) 59 + #define ARM_LPAE_PAGES_PER_PGD(d) \ 60 + DIV_ROUND_UP((d)->pgd_size, 1UL << (d)->pg_shift) 60 61 61 62 /* 62 63 * Calculate the index at level l used to map virtual address a using the ··· 67 66 ((l) == ARM_LPAE_START_LVL(d) ? ilog2(ARM_LPAE_PAGES_PER_PGD(d)) : 0) 68 67 69 68 #define ARM_LPAE_LVL_IDX(a,l,d) \ 70 - (((a) >> ARM_LPAE_LVL_SHIFT(l,d)) & \ 69 + (((u64)(a) >> ARM_LPAE_LVL_SHIFT(l,d)) & \ 71 70 ((1 << ((d)->bits_per_level + ARM_LPAE_PGD_IDX(l,d))) - 1)) 72 71 73 72 /* Calculate the block/page mapping size at level l for pagetable in d. */
+7
drivers/iommu/omap-iommu.c
··· 1376 1376 struct kmem_cache *p; 1377 1377 const unsigned long flags = SLAB_HWCACHE_ALIGN; 1378 1378 size_t align = 1 << 10; /* L2 pagetable alignement */ 1379 + struct device_node *np; 1380 + 1381 + np = of_find_matching_node(NULL, omap_iommu_of_match); 1382 + if (!np) 1383 + return 0; 1384 + 1385 + of_node_put(np); 1379 1386 1380 1387 p = kmem_cache_create("iopte_cache", IOPTE_TABLE_SIZE, align, flags, 1381 1388 iopte_cachep_ctor);
+7
drivers/iommu/rockchip-iommu.c
··· 1015 1015 1016 1016 static int __init rk_iommu_init(void) 1017 1017 { 1018 + struct device_node *np; 1018 1019 int ret; 1020 + 1021 + np = of_find_matching_node(NULL, rk_iommu_dt_ids); 1022 + if (!np) 1023 + return 0; 1024 + 1025 + of_node_put(np); 1019 1026 1020 1027 ret = bus_set_iommu(&platform_bus_type, &rk_iommu_ops); 1021 1028 if (ret)