Lines Matching refs:chunk
263 struct qcom_tzmem_chunk *chunk; in qcom_tzmem_pool_free() local
275 chunk = radix_tree_deref_slot_protected(slot, in qcom_tzmem_pool_free()
278 if (chunk->owner == pool) in qcom_tzmem_pool_free()
376 struct qcom_tzmem_chunk *chunk __free(kfree) = kzalloc(sizeof(*chunk), in qcom_tzmem_alloc()
378 if (!chunk) in qcom_tzmem_alloc()
390 chunk->size = size; in qcom_tzmem_alloc()
391 chunk->owner = pool; in qcom_tzmem_alloc()
394 ret = radix_tree_insert(&qcom_tzmem_chunks, vaddr, chunk); in qcom_tzmem_alloc()
400 chunk = NULL; in qcom_tzmem_alloc()
415 struct qcom_tzmem_chunk *chunk; in qcom_tzmem_free() local
418 chunk = radix_tree_delete_item(&qcom_tzmem_chunks, in qcom_tzmem_free()
421 if (!chunk) { in qcom_tzmem_free()
427 scoped_guard(spinlock_irqsave, &chunk->owner->lock) in qcom_tzmem_free()
428 gen_pool_free(chunk->owner->genpool, (unsigned long)vaddr, in qcom_tzmem_free()
429 chunk->size); in qcom_tzmem_free()
430 kfree(chunk); in qcom_tzmem_free()
446 struct qcom_tzmem_chunk *chunk; in qcom_tzmem_to_phys() local
454 chunk = radix_tree_deref_slot_protected(slot, in qcom_tzmem_to_phys()
457 ret = gen_pool_virt_to_phys(chunk->owner->genpool, in qcom_tzmem_to_phys()