mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
msm: kgsl: Initialize cb_num for secure context
Currently we are not initializing cb_num for secure context. This is causing problems in the kgsl fault handler path when there is a pagefault for secure context. Hence initialize cb_num for secure context. Change-Id: I35a37193f512f315f443e9f0d92fdae11411bbd2 Signed-off-by: Harshitha Sai Neelati <hsaineel@codeaurora.org>
This commit is contained in:
parent
d915a46562
commit
ded39f3537
1 changed files with 12 additions and 0 deletions
|
|
@ -1230,6 +1230,7 @@ static int _init_secure_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
|
|||
struct kgsl_iommu_context *ctx = &iommu->secure_context;
|
||||
int secure_vmid = VMID_CP_PIXEL;
|
||||
struct kgsl_global_memdesc *md;
|
||||
int cb_num;
|
||||
|
||||
if (!mmu->secured)
|
||||
return -EPERM;
|
||||
|
|
@ -1259,6 +1260,17 @@ static int _init_secure_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
|
|||
iommu_set_fault_handler(iommu_pt->domain,
|
||||
kgsl_iommu_fault_handler, pt);
|
||||
|
||||
ret = iommu_domain_get_attr(iommu_pt->domain,
|
||||
DOMAIN_ATTR_CONTEXT_BANK, &cb_num);
|
||||
if (ret) {
|
||||
dev_err(device->dev, "get DOMAIN_ATTR_CONTEXT_BANK failed: %d\n",
|
||||
ret);
|
||||
_free_pt(ctx, pt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ctx->cb_num = cb_num;
|
||||
|
||||
/* Map any pending secure global buffers */
|
||||
list_for_each_entry(md, &device->globals, node) {
|
||||
if (md->memdesc.flags & KGSL_MEMFLAGS_SECURE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue