Lines Matching refs:mmu_prop
174 int hl_mmu_get_real_page_size(struct hl_device *hdev, struct hl_mmu_properties *mmu_prop, in hl_mmu_get_real_page_size() argument
181 if ((page_size % mmu_prop->page_size) == 0) { in hl_mmu_get_real_page_size()
182 *real_page_size = mmu_prop->page_size; in hl_mmu_get_real_page_size()
187 page_size, mmu_prop->page_size >> 10); in hl_mmu_get_real_page_size()
229 struct hl_mmu_properties *mmu_prop; in hl_mmu_unmap_page() local
240 mmu_prop = hl_mmu_get_prop(hdev, page_size, is_dram_addr); in hl_mmu_unmap_page()
242 pgt_residency = mmu_prop->host_resident ? MMU_HR_PGT : MMU_DR_PGT; in hl_mmu_unmap_page()
245 rc = hdev->asic_funcs->mmu_get_real_page_size(hdev, mmu_prop, page_size, &real_page_size, in hl_mmu_unmap_page()
297 struct hl_mmu_properties *mmu_prop; in hl_mmu_map_page() local
308 mmu_prop = hl_mmu_get_prop(hdev, page_size, is_dram_addr); in hl_mmu_map_page()
310 pgt_residency = mmu_prop->host_resident ? MMU_HR_PGT : MMU_DR_PGT; in hl_mmu_map_page()
313 rc = hdev->asic_funcs->mmu_get_real_page_size(hdev, mmu_prop, page_size, &real_page_size, in hl_mmu_map_page()
325 (mmu_prop->page_size - 1)) || in hl_mmu_map_page()
327 (mmu_prop->page_size - 1)))) || in hl_mmu_map_page()
481 struct hl_mmu_properties *mmu_prop; in hl_mmu_pa_page_with_offset() local
490 mmu_prop = &prop->pmmu_huge; in hl_mmu_pa_page_with_offset()
492 mmu_prop = &prop->pmmu; in hl_mmu_pa_page_with_offset()
494 mmu_prop = &prop->dmmu; in hl_mmu_pa_page_with_offset()
523 hop_shift = mmu_prop->hop_shifts[hops->used_hops - 1]; in hl_mmu_pa_page_with_offset()
552 struct hl_mmu_properties *mmu_prop; in hl_mmu_get_tlb_info() local
568 mmu_prop = is_dram_addr ? &prop->dmmu : &prop->pmmu; in hl_mmu_get_tlb_info()
569 pgt_residency = mmu_prop->host_resident ? MMU_HR_PGT : MMU_DR_PGT; in hl_mmu_get_tlb_info()
729 u64 hl_mmu_get_hop_pte_phys_addr(struct hl_ctx *ctx, struct hl_mmu_properties *mmu_prop, in hl_mmu_get_hop_pte_phys_addr() argument
734 if (hop_idx >= mmu_prop->num_hops) { in hl_mmu_get_hop_pte_phys_addr()
739 shift = mmu_prop->hop_shifts[hop_idx]; in hl_mmu_get_hop_pte_phys_addr()
740 mask = mmu_prop->hop_masks[hop_idx]; in hl_mmu_get_hop_pte_phys_addr()
1059 struct hl_mmu_properties *mmu_prop) in hl_mmu_hr_alloc_hop() argument
1073 mmu_prop->hop_table_size, in hl_mmu_hr_alloc_hop()
1075 mmu_prop->hop_table_size); in hl_mmu_hr_alloc_hop()
1127 struct hl_mmu_properties *mmu_prop, in hl_mmu_hr_get_alloc_next_hop() argument
1136 return hl_mmu_hr_alloc_hop(ctx, hr_priv, hr_func, mmu_prop); in hl_mmu_hr_get_alloc_next_hop()
1154 struct hl_mmu_properties *mmu_prop; in hl_mmu_hr_get_tlb_info() local
1158 rc = hr_func->get_tlb_mapping_params(hdev, &mmu_prop, hops, virt_addr, &is_huge); in hl_mmu_hr_get_tlb_info()
1162 used_hops = mmu_prop->num_hops; in hl_mmu_hr_get_tlb_info()
1182 hl_mmu_get_hop_pte_phys_addr(ctx, mmu_prop, i, in hl_mmu_hr_get_tlb_info()
1188 mmu_prop->hop_table_size); in hl_mmu_hr_get_tlb_info()
1193 if (hops->hop_info[i].hop_pte_val & mmu_prop->last_mask) in hl_mmu_hr_get_tlb_info()
1198 if (i == mmu_prop->num_hops) in hl_mmu_hr_get_tlb_info()