mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge "ion: Ensure correct heap type set during heap drain"
This commit is contained in:
commit
7bf6f1543f
@ -160,7 +160,8 @@ size_t ion_system_secure_heap_page_pool_total(struct ion_heap *heap,
|
||||
return total << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static void process_one_shrink(struct ion_heap *sys_heap,
|
||||
static void process_one_shrink(struct ion_system_secure_heap *secure_heap,
|
||||
struct ion_heap *sys_heap,
|
||||
struct prefetch_info *info)
|
||||
{
|
||||
struct ion_buffer buffer;
|
||||
@ -168,7 +169,7 @@ static void process_one_shrink(struct ion_heap *sys_heap,
|
||||
int ret;
|
||||
|
||||
memset(&buffer, 0, sizeof(struct ion_buffer));
|
||||
buffer.heap = sys_heap;
|
||||
buffer.heap = &secure_heap->heap;
|
||||
buffer.flags = info->vmid;
|
||||
|
||||
pool_size = ion_system_secure_heap_page_pool_total(sys_heap,
|
||||
@ -182,6 +183,7 @@ static void process_one_shrink(struct ion_heap *sys_heap,
|
||||
}
|
||||
|
||||
buffer.private_flags = ION_PRIV_FLAG_SHRINKER_FREE;
|
||||
buffer.heap = sys_heap;
|
||||
sys_heap->ops->free(&buffer);
|
||||
}
|
||||
|
||||
@ -201,7 +203,7 @@ static void ion_system_secure_heap_prefetch_work(struct work_struct *work)
|
||||
spin_unlock_irqrestore(&secure_heap->work_lock, flags);
|
||||
|
||||
if (info->shrink)
|
||||
process_one_shrink(sys_heap, info);
|
||||
process_one_shrink(secure_heap, sys_heap, info);
|
||||
else
|
||||
process_one_prefetch(sys_heap, info);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user