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

Commit 9ab48181 authored by Laura Abbott's avatar Laura Abbott Committed by Gerrit - the friendly Code Review server
Browse files

msm: Update Ion and IOMMU APIs to use dma_addr_t



The current APIs for Ion and the custom IOMMU mapping assume that
many parameters are unsigned long. This type is not big enough to
hold physical addresses on LPAE systems. Update the APIs to accomodate
these types. Because we are updating the APIs, all clients need to be
updated as well, either by using the correct type or using a cast
where necessary.

Change-Id: I12e6fb6ec8a8481a7eef374cb9316e5ccbc29090
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent def6c024
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -113,10 +113,10 @@ extern int msm_iommu_map_contig_buffer(phys_addr_t phys,
				unsigned long size,
				unsigned long align,
				unsigned long cached,
				unsigned long *iova_val);
				dma_addr_t *iova_val);


extern void msm_iommu_unmap_contig_buffer(unsigned long iova,
extern void msm_iommu_unmap_contig_buffer(dma_addr_t iova,
					unsigned int domain_no,
					unsigned int partition_no,
					unsigned long size);
@@ -178,13 +178,13 @@ static inline int msm_iommu_map_contig_buffer(phys_addr_t phys,
				unsigned long size,
				unsigned long align,
				unsigned long cached,
				unsigned long *iova_val)
				dma_addr_t *iova_val)
{
	*iova_val = phys;
	return 0;
}

static inline void msm_iommu_unmap_contig_buffer(unsigned long iova,
static inline void msm_iommu_unmap_contig_buffer(dma_addr_t iova,
					unsigned int domain_no,
					unsigned int partition_no,
					unsigned long size)
+2 −2
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ int msm_iommu_map_contig_buffer(phys_addr_t phys,
				unsigned long size,
				unsigned long align,
				unsigned long cached,
				unsigned long *iova_val)
				dma_addr_t *iova_val)
{
	unsigned long iova;
	int ret;
@@ -223,7 +223,7 @@ int msm_iommu_map_contig_buffer(phys_addr_t phys,
}
EXPORT_SYMBOL(msm_iommu_map_contig_buffer);

void msm_iommu_unmap_contig_buffer(unsigned long iova,
void msm_iommu_unmap_contig_buffer(dma_addr_t iova,
					unsigned int domain_no,
					unsigned int partition_no,
					unsigned long size)
+1 −1
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ static int pil_venus_reset(struct pil_desc *pil)
	struct venus_data *drv = dev_get_drvdata(pil->dev);
	void __iomem *wrapper_base = drv->venus_wrapper_base;
	phys_addr_t pa = pil_get_entry_addr(pil);
	unsigned long iova;
	dma_addr_t iova;
	u32 ver, cpa_start_addr, cpa_end_addr, fw_start_addr, fw_end_addr;

	/* Get Venus version number */
+2 −2
Original line number Diff line number Diff line
/* arch/arm/mach-msm/qdsp5/adsp_driver.c
 *
 * Copyright (C) 2008 Google, Inc.
 * Copyright (c) 2009, 2012 The Linux Foundation. All rights reserved.
 * Copyright (c) 2009, 2012-2013 The Linux Foundation. All rights reserved.
 * Author: Iliyan Malchev <ibm@android.com>
 *
 * This software is licensed under the terms of the GNU General Public
@@ -35,7 +35,7 @@ struct adsp_ion_info {
struct adsp_ion_region {
	struct hlist_node list;
	void *vaddr;
	unsigned long paddr;
	dma_addr_t paddr;
	unsigned long kvaddr;
	unsigned long len;
	unsigned long ion_flag;
+1 −1
Original line number Diff line number Diff line
@@ -647,7 +647,7 @@ static int deregister_memory(void)
static int register_memory(void)
{
	int			result;
	unsigned long		paddr;
	dma_addr_t		paddr;
	void                    *kvptr;
	unsigned long		kvaddr;
	unsigned long		mem_len;
Loading