Home
last modified time | relevance | path

Searched refs:pgt_info (Results 1 – 4 of 4) sorted by relevance

/linux-6.6.21/drivers/accel/habanalabs/common/mmu/
Dmmu_v1.c17 static struct pgt_info *get_pgt_info(struct hl_ctx *ctx, u64 hop_addr) in get_pgt_info()
19 struct pgt_info *pgt_info = NULL; in get_pgt_info() local
21 hash_for_each_possible(ctx->mmu_shadow_hash, pgt_info, node, in get_pgt_info()
23 if (hop_addr == pgt_info->shadow_addr) in get_pgt_info()
26 return pgt_info; in get_pgt_info()
29 static void _free_hop(struct hl_ctx *ctx, struct pgt_info *pgt_info) in _free_hop() argument
33 gen_pool_free(hdev->mmu_priv.dr.mmu_pgt_pool, pgt_info->phys_addr, in _free_hop()
35 hash_del(&pgt_info->node); in _free_hop()
36 kfree((u64 *) (uintptr_t) pgt_info->shadow_addr); in _free_hop()
37 kfree(pgt_info); in _free_hop()
[all …]
Dmmu_v2_hr.c13 static struct pgt_info *hl_mmu_v2_hr_get_pgt_info(struct hl_ctx *ctx, u64 phys_hop_addr) in hl_mmu_v2_hr_get_pgt_info()
15 struct pgt_info *pgt_info = NULL; in hl_mmu_v2_hr_get_pgt_info() local
17 hash_for_each_possible(ctx->hr_mmu_phys_hash, pgt_info, node, in hl_mmu_v2_hr_get_pgt_info()
19 if (phys_hop_addr == pgt_info->phys_addr) in hl_mmu_v2_hr_get_pgt_info()
22 return pgt_info; in hl_mmu_v2_hr_get_pgt_info()
25 static void hl_mmu_v2_hr_add_pgt_info(struct hl_ctx *ctx, struct pgt_info *pgt_info, in hl_mmu_v2_hr_add_pgt_info() argument
28 hash_add(ctx->hr_mmu_phys_hash, &pgt_info->node, phys_addr); in hl_mmu_v2_hr_add_pgt_info()
31 static struct pgt_info *hl_mmu_v2_hr_get_hop0_pgt_info(struct hl_ctx *ctx) in hl_mmu_v2_hr_get_hop0_pgt_info()
98 struct pgt_info *pgt_info; in hl_mmu_v2_hr_ctx_fini() local
106 hash_for_each_safe(ctx->hr_mmu_phys_hash, i, tmp, pgt_info, node) { in hl_mmu_v2_hr_ctx_fini()
[all …]
Dmmu.c777 struct pgt_info *hop0_pgt; in hl_mmu_hr_pool_destroy()
822 struct pgt_info *hop0_pgt; in hl_mmu_hr_init()
839 hr_priv->mmu_asid_hop0 = kvcalloc(prop->max_asid, sizeof(struct pgt_info), GFP_KERNEL); in hl_mmu_hr_init()
926 void hl_mmu_hr_free_hop_remove_pgt(struct pgt_info *pgt_info, struct hl_mmu_hr_priv *hr_priv, in hl_mmu_hr_free_hop_remove_pgt() argument
929 gen_pool_free(hr_priv->mmu_pgt_pool, pgt_info->virt_addr, hop_table_size); in hl_mmu_hr_free_hop_remove_pgt()
930 hash_del(&pgt_info->node); in hl_mmu_hr_free_hop_remove_pgt()
931 kfree(pgt_info); in hl_mmu_hr_free_hop_remove_pgt()
946 u64 hl_mmu_hr_pte_phys_to_virt(struct hl_ctx *ctx, struct pgt_info *pgt, in hl_mmu_hr_pte_phys_to_virt()
963 void hl_mmu_hr_write_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, u64 phys_pte_addr, in hl_mmu_hr_write_pte() argument
970 u64 virt_addr = hl_mmu_hr_pte_phys_to_virt(ctx, pgt_info, phys_pte_addr, hop_table_size); in hl_mmu_hr_write_pte()
[all …]
/linux-6.6.21/drivers/accel/habanalabs/common/
Dhabanalabs.h289 struct pgt_info { struct
2736 struct pgt_info *mmu_asid_hop0;
2802 struct pgt_info *(*get_hop0_pgt_info)(struct hl_ctx *ctx);
2803 struct pgt_info *(*get_pgt_info)(struct hl_ctx *ctx, u64 phys_hop_addr);
2804 void (*add_pgt_info)(struct hl_ctx *ctx, struct pgt_info *pgt_info, dma_addr_t phys_addr);
3781 void hl_mmu_hr_free_hop_remove_pgt(struct pgt_info *pgt_info, struct hl_mmu_hr_priv *hr_priv,
3783 u64 hl_mmu_hr_pte_phys_to_virt(struct hl_ctx *ctx, struct pgt_info *pgt, u64 phys_pte_addr,
3785 void hl_mmu_hr_write_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, u64 phys_pte_addr,
3787 void hl_mmu_hr_clear_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, u64 phys_pte_addr,
3789 int hl_mmu_hr_put_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, struct hl_mmu_hr_priv *hr_priv,
[all …]