Home
last modified time | relevance | path

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

/Linux-v6.6/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.c776 struct pgt_info *hop0_pgt; in hl_mmu_hr_pool_destroy()
821 struct pgt_info *hop0_pgt; in hl_mmu_hr_init()
838 hr_priv->mmu_asid_hop0 = kvcalloc(prop->max_asid, sizeof(struct pgt_info), GFP_KERNEL); in hl_mmu_hr_init()
925 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
928 gen_pool_free(hr_priv->mmu_pgt_pool, pgt_info->virt_addr, hop_table_size); in hl_mmu_hr_free_hop_remove_pgt()
929 hash_del(&pgt_info->node); in hl_mmu_hr_free_hop_remove_pgt()
930 kfree(pgt_info); in hl_mmu_hr_free_hop_remove_pgt()
945 u64 hl_mmu_hr_pte_phys_to_virt(struct hl_ctx *ctx, struct pgt_info *pgt, in hl_mmu_hr_pte_phys_to_virt()
962 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
969 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-v6.6/drivers/accel/habanalabs/common/
Dhabanalabs.h289 struct pgt_info { struct
2734 struct pgt_info *mmu_asid_hop0;
2800 struct pgt_info *(*get_hop0_pgt_info)(struct hl_ctx *ctx);
2801 struct pgt_info *(*get_pgt_info)(struct hl_ctx *ctx, u64 phys_hop_addr);
2802 void (*add_pgt_info)(struct hl_ctx *ctx, struct pgt_info *pgt_info, dma_addr_t phys_addr);
3779 void hl_mmu_hr_free_hop_remove_pgt(struct pgt_info *pgt_info, struct hl_mmu_hr_priv *hr_priv,
3781 u64 hl_mmu_hr_pte_phys_to_virt(struct hl_ctx *ctx, struct pgt_info *pgt, u64 phys_pte_addr,
3783 void hl_mmu_hr_write_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, u64 phys_pte_addr,
3785 void hl_mmu_hr_clear_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, u64 phys_pte_addr,
3787 int hl_mmu_hr_put_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, struct hl_mmu_hr_priv *hr_priv,
[all …]