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

Commit 1b13d5f1 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: fix IOMMU symbols usage" into msm-4.8

parents 3a3b1ffa f5625348
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4557,7 +4557,7 @@ static int ipa_smmu_wlan_cb_probe(struct device *dev)
			rounddown(smmu_info.ipa_base, PAGE_SIZE),
			rounddown(smmu_info.ipa_base, PAGE_SIZE),
			roundup(smmu_info.ipa_size, PAGE_SIZE),
			IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE);
			IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO);
		if (ret) {
			IPAERR("map IPA to WLAN_CB IOMMU failed ret=%d\n",
				ret);
@@ -4746,7 +4746,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
				rounddown(smmu_info.ipa_base, PAGE_SIZE),
				rounddown(smmu_info.ipa_base, PAGE_SIZE),
				roundup(smmu_info.ipa_size, PAGE_SIZE),
				IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE);
				IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO);
		if (result) {
			IPAERR("map IPA region to AP_CB IOMMU failed ret=%d\n",
				result);
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static int ipa2_smmu_map_peer_bam(unsigned long dev)
					roundup(size + base -
					rounddown(base, PAGE_SIZE), PAGE_SIZE),
					IOMMU_READ | IOMMU_WRITE |
					IOMMU_DEVICE)) {
					IOMMU_MMIO)) {
					IPAERR("Fail to ipa_iommu_map\n");
					return -EINVAL;
				}
+1 −1
Original line number Diff line number Diff line
@@ -517,7 +517,7 @@ static int ipa_create_uc_smmu_mapping_pa(phys_addr_t pa, size_t len,

	ret = ipa_iommu_map(cb->mapping->domain, va, rounddown(pa, PAGE_SIZE),
			true_len,
			device ? (prot | IOMMU_DEVICE) : prot);
			device ? (prot | IOMMU_MMIO) : prot);
	if (ret) {
		IPAERR("iommu map failed for pa=%pa len=%zu\n", &pa, true_len);
		return -EINVAL;
+6 −7
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <linux/msm_gsi.h>
#include <linux/qcom_iommu.h>
#include <linux/time.h>
#include <linux/hashtable.h>
#include <linux/jhash.h>
@@ -5002,7 +5001,7 @@ static int ipa_smmu_wlan_cb_probe(struct device *dev)
	IPADBG("sub pdev=%p\n", dev);

	cb->dev = dev;
	cb->iommu = iommu_domain_alloc(msm_iommu_get_bus(dev));
	cb->iommu = iommu_domain_alloc(dev->bus);
	if (!cb->iommu) {
		IPAERR("could not alloc iommu domain\n");
		/* assume this failure is because iommu driver is not ready */
@@ -5073,7 +5072,7 @@ static int ipa_smmu_wlan_cb_probe(struct device *dev)
				iova_p, &pa_p, size_p);
			ipa3_iommu_map(cb->iommu,
				iova_p, pa_p, size_p,
				IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE);
				IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO);
		}
	}
	return 0;
@@ -5117,7 +5116,7 @@ static int ipa_smmu_uc_cb_probe(struct device *dev)
	IPADBG("UC CB PROBE=%p create IOMMU mapping\n", dev);

	cb->dev = dev;
	cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
	cb->mapping = arm_iommu_create_mapping(dev->bus,
			cb->va_start, cb->va_size);
	if (IS_ERR_OR_NULL(cb->mapping)) {
		IPADBG("Fail to create mapping\n");
@@ -5218,7 +5217,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
	}

	cb->dev = dev;
	cb->mapping = arm_iommu_create_mapping(msm_iommu_get_bus(dev),
	cb->mapping = arm_iommu_create_mapping(dev->bus,
					cb->va_start, cb->va_size);
	if (IS_ERR_OR_NULL(cb->mapping)) {
		IPADBG("Fail to create mapping\n");
@@ -5292,7 +5291,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
				iova_p, &pa_p, size_p);
			ipa3_iommu_map(cb->mapping->domain,
				iova_p, pa_p, size_p,
				IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE);
				IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO);
		}
	}

@@ -5312,7 +5311,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
			iova_p, &pa_p, size_p);
		ipa3_iommu_map(cb->mapping->domain,
			iova_p, pa_p, size_p,
			IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE);
			IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO);
	}


+2 −2
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ static int ipa3_smmu_map_peer_bam(unsigned long dev)
					roundup(size + base -
					rounddown(base, PAGE_SIZE), PAGE_SIZE),
					IOMMU_READ | IOMMU_WRITE |
					IOMMU_DEVICE)) {
					IOMMU_MMIO)) {
					IPAERR("Fail to ipa3_iommu_map\n");
					return -EINVAL;
				}
@@ -1082,7 +1082,7 @@ int ipa3_smmu_map_peer_reg(phys_addr_t phys_addr, bool map)

	if (map) {
		res = ipa3_iommu_map(smmu_domain, phys_addr, phys_addr,
			PAGE_SIZE, IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE);
			PAGE_SIZE, IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO);
	} else {
		res = iommu_unmap(smmu_domain, phys_addr, PAGE_SIZE);
		res = (res != PAGE_SIZE);
Loading