Loading arch/arm64/kernel/arm64ksyms.c +6 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <linux/arm-smccc.h> #include <linux/kprobes.h> #include <asm/cacheflush.h> #include <asm/checksum.h> EXPORT_SYMBOL(copy_page); Loading Loading @@ -83,3 +84,8 @@ extern long long __ashrti3(long long a, int b); EXPORT_SYMBOL(__ashrti3); extern long long __lshrti3(long long a, int b); EXPORT_SYMBOL(__lshrti3); /* caching functions */ EXPORT_SYMBOL(__dma_inv_area); EXPORT_SYMBOL(__dma_clean_area); EXPORT_SYMBOL(__dma_flush_area); arch/arm64/mm/dma-mapping.c +7 −2 Original line number Diff line number Diff line Loading @@ -931,12 +931,17 @@ static int __iommu_map_sg_attrs(struct device *dev, struct scatterlist *sgl, unsigned long attrs) { bool coherent = is_dma_coherent(dev, attrs); int ret; ret = iommu_dma_map_sg(dev, sgl, nelems, dma_info_to_prot(dir, coherent, attrs)); if (!ret) return ret; if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) __iommu_sync_sg_for_device(dev, sgl, nelems, dir); return iommu_dma_map_sg(dev, sgl, nelems, dma_info_to_prot(dir, coherent, attrs)); return ret; } static void __iommu_unmap_sg_attrs(struct device *dev, Loading drivers/iommu/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ config IOMMU_IO_PGTABLE_ARMV7S_SELFTEST config IOMMU_IO_PGTABLE_FAST bool "Fast ARMv7/v8 Long Descriptor Format" select IOMMU_IO_PGTABLE depends on ARM64_DMA_USE_IOMMU || ARM_DMA_USE_IOMMU help Enable support for a subset of the ARM long descriptor pagetable format. This allocator achieves fast performance by Loading drivers/iommu/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ obj-$(CONFIG_IOMMU_IO_PGTABLE) += io-pgtable.o obj-$(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) += io-pgtable-arm-v7s.o obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o obj-$(CONFIG_IOMMU_IOVA) += iova.o obj-$(CONFIG_MSM_TZ_SMMU) += io-pgtable-msm-secure.o obj-$(CONFIG_IOMMU_IO_PGTABLE_FAST) += io-pgtable-fast.o dma-mapping-fast.o obj-$(CONFIG_OF_IOMMU) += of_iommu.o obj-$(CONFIG_IOMMU_DEBUG) += iommu-debug.o Loading drivers/iommu/arm-smmu-errata.c +2 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading Loading @@ -32,7 +32,7 @@ struct page *arm_smmu_errata_get_guard_page(int vmid) ret = hyp_assign_phys(page_to_phys(page), PAGE_ALIGN(size), &source_vm, 1, &dest_vm, &dest_perm, 1); if (ret) { if (ret && (ret != -EIO)) { __free_pages(page, get_order(size)); page = NULL; } Loading Loading
arch/arm64/kernel/arm64ksyms.c +6 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <linux/arm-smccc.h> #include <linux/kprobes.h> #include <asm/cacheflush.h> #include <asm/checksum.h> EXPORT_SYMBOL(copy_page); Loading Loading @@ -83,3 +84,8 @@ extern long long __ashrti3(long long a, int b); EXPORT_SYMBOL(__ashrti3); extern long long __lshrti3(long long a, int b); EXPORT_SYMBOL(__lshrti3); /* caching functions */ EXPORT_SYMBOL(__dma_inv_area); EXPORT_SYMBOL(__dma_clean_area); EXPORT_SYMBOL(__dma_flush_area);
arch/arm64/mm/dma-mapping.c +7 −2 Original line number Diff line number Diff line Loading @@ -931,12 +931,17 @@ static int __iommu_map_sg_attrs(struct device *dev, struct scatterlist *sgl, unsigned long attrs) { bool coherent = is_dma_coherent(dev, attrs); int ret; ret = iommu_dma_map_sg(dev, sgl, nelems, dma_info_to_prot(dir, coherent, attrs)); if (!ret) return ret; if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) __iommu_sync_sg_for_device(dev, sgl, nelems, dir); return iommu_dma_map_sg(dev, sgl, nelems, dma_info_to_prot(dir, coherent, attrs)); return ret; } static void __iommu_unmap_sg_attrs(struct device *dev, Loading
drivers/iommu/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ config IOMMU_IO_PGTABLE_ARMV7S_SELFTEST config IOMMU_IO_PGTABLE_FAST bool "Fast ARMv7/v8 Long Descriptor Format" select IOMMU_IO_PGTABLE depends on ARM64_DMA_USE_IOMMU || ARM_DMA_USE_IOMMU help Enable support for a subset of the ARM long descriptor pagetable format. This allocator achieves fast performance by Loading
drivers/iommu/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ obj-$(CONFIG_IOMMU_IO_PGTABLE) += io-pgtable.o obj-$(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) += io-pgtable-arm-v7s.o obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o obj-$(CONFIG_IOMMU_IOVA) += iova.o obj-$(CONFIG_MSM_TZ_SMMU) += io-pgtable-msm-secure.o obj-$(CONFIG_IOMMU_IO_PGTABLE_FAST) += io-pgtable-fast.o dma-mapping-fast.o obj-$(CONFIG_OF_IOMMU) += of_iommu.o obj-$(CONFIG_IOMMU_DEBUG) += iommu-debug.o Loading
drivers/iommu/arm-smmu-errata.c +2 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading Loading @@ -32,7 +32,7 @@ struct page *arm_smmu_errata_get_guard_page(int vmid) ret = hyp_assign_phys(page_to_phys(page), PAGE_ALIGN(size), &source_vm, 1, &dest_vm, &dest_perm, 1); if (ret) { if (ret && (ret != -EIO)) { __free_pages(page, get_order(size)); page = NULL; } Loading