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.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:

- A comment fix for 'struct iommu_ops'

- Format string fixes for AMD IOMMU, unfortunatly I missed that during
review.

- Limit mediatek physical addresses to 32 bit for v7s to fix a warning
triggered in io-page-table code.

- Fix dma-sync in io-pgtable-arm-v7s code

* tag 'iommu-fixes-v4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu: Fix comment for iommu_ops.map_sg
iommu/amd: pr_err() strings should end with newlines
iommu/mediatek: Limit the physical address in 32bit for v7s
iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA

+8 -7
+4 -4
drivers/iommu/amd_iommu_init.c
··· 874 874 hi = readl(iommu->mmio_base + MMIO_DEV_TABLE_OFFSET + 4); 875 875 entry = (((u64) hi) << 32) + lo; 876 876 if (last_entry && last_entry != entry) { 877 - pr_err("IOMMU:%d should use the same dev table as others!/n", 877 + pr_err("IOMMU:%d should use the same dev table as others!\n", 878 878 iommu->index); 879 879 return false; 880 880 } ··· 882 882 883 883 old_devtb_size = ((entry & ~PAGE_MASK) + 1) << 12; 884 884 if (old_devtb_size != dev_table_size) { 885 - pr_err("The device table size of IOMMU:%d is not expected!/n", 885 + pr_err("The device table size of IOMMU:%d is not expected!\n", 886 886 iommu->index); 887 887 return false; 888 888 } ··· 890 890 891 891 old_devtb_phys = entry & PAGE_MASK; 892 892 if (old_devtb_phys >= 0x100000000ULL) { 893 - pr_err("The address of old device table is above 4G, not trustworthy!/n"); 893 + pr_err("The address of old device table is above 4G, not trustworthy!\n"); 894 894 return false; 895 895 } 896 896 old_devtb = memremap(old_devtb_phys, dev_table_size, MEMREMAP_WB); ··· 901 901 old_dev_tbl_cpy = (void *)__get_free_pages(gfp_flag, 902 902 get_order(dev_table_size)); 903 903 if (old_dev_tbl_cpy == NULL) { 904 - pr_err("Failed to allocate memory for copying old device table!/n"); 904 + pr_err("Failed to allocate memory for copying old device table!\n"); 905 905 return false; 906 906 } 907 907
+1 -1
drivers/iommu/io-pgtable-arm-v7s.c
··· 245 245 static void __arm_v7s_pte_sync(arm_v7s_iopte *ptep, int num_entries, 246 246 struct io_pgtable_cfg *cfg) 247 247 { 248 - if (!(cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA)) 248 + if (cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA) 249 249 return; 250 250 251 251 dma_sync_single_for_device(cfg->iommu_dev, __arm_v7s_dma_addr(ptep),
+2 -1
drivers/iommu/mtk_iommu.c
··· 371 371 int ret; 372 372 373 373 spin_lock_irqsave(&dom->pgtlock, flags); 374 - ret = dom->iop->map(dom->iop, iova, paddr, size, prot); 374 + ret = dom->iop->map(dom->iop, iova, paddr & DMA_BIT_MASK(32), 375 + size, prot); 375 376 spin_unlock_irqrestore(&dom->pgtlock, flags); 376 377 377 378 return ret;
+1 -1
include/linux/iommu.h
··· 167 167 * @map: map a physically contiguous memory region to an iommu domain 168 168 * @unmap: unmap a physically contiguous memory region from an iommu domain 169 169 * @map_sg: map a scatter-gather list of physically contiguous memory chunks 170 + * to an iommu domain 170 171 * @flush_tlb_all: Synchronously flush all hardware TLBs for this domain 171 172 * @tlb_range_add: Add a given iova range to the flush queue for this domain 172 173 * @tlb_sync: Flush all queued ranges from the hardware TLBs and empty flush 173 174 * queue 174 - * to an iommu domain 175 175 * @iova_to_phys: translate iova to physical address 176 176 * @add_device: add device to iommu grouping 177 177 * @remove_device: remove device from iommu grouping