Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 791d853a authored by Swathi Sridhar's avatar Swathi Sridhar
Browse files

iommu: arm-smmu: Merge for msm-kona kernel upgrade



Merge all iommu/smmu changes from msm-4.14 to msm-kona
as of:
'commit 681d7197c96a ("iommu/arm-smmu: ignore target
specific initialization")'

Change-Id: I4452531c17fe653a282e8923851eba3deae0e9b0
Signed-off-by: default avatarSwathi Sridhar <swatsrid@codeaurora.org>
parent 353326b0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
@@ -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);
+7 −2
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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
+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>
@@ -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