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

Commit e0a01314 authored by Lynus Vaz's avatar Lynus Vaz
Browse files

msm: kgsl: Look for freed entries with the pagetable name



The list of freed entries stores the pagetable name which is usually
the process id. Search through this list using the process id and not
the thread id so that we see the entry we're interested in.

Change-Id: I4b19d8f47be0973b4f1ecf7dc2641b1824c6ca56
Signed-off-by: default avatarLynus Vaz <lvaz@codeaurora.org>
parent ce8cdfee
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -792,7 +792,7 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
	struct kgsl_iommu_context *ctx;
	u64 ptbase;
	u32 contextidr;
	pid_t tid = 0;
	pid_t pid = 0;
	pid_t ptname;
	struct _mem_entry prev, next;
	int write;
@@ -847,7 +847,7 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
	if (context != NULL) {
		/* save pagefault timestamp for GFT */
		set_bit(KGSL_CONTEXT_PRIV_PAGEFAULT, &context->priv);
		tid = context->tid;
		pid = context->proc_priv->pid;
	}

	ctx->fault = 1;
@@ -868,7 +868,7 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
	contextidr = KGSL_IOMMU_GET_CTX_REG(ctx, CONTEXTIDR);

	ptname = MMU_FEATURE(mmu, KGSL_MMU_GLOBAL_PAGETABLE) ?
		KGSL_MMU_GLOBAL_PT : tid;
		KGSL_MMU_GLOBAL_PT : pid;
	/*
	 * Trace needs to be logged before searching the faulting
	 * address in free list as it takes quite long time in