Home
last modified time | relevance | path

Searched refs:mmu_prop (Results 1 – 5 of 5) sorted by relevance

/linux-6.6.21/drivers/accel/habanalabs/common/mmu/
Dmmu_v2_hr.c122 struct hl_mmu_properties *mmu_prop; in _hl_mmu_v2_hr_unmap() local
129 mmu_prop = is_dram_addr ? &prop->dmmu : &prop->pmmu; in _hl_mmu_v2_hr_unmap()
130 hop_last = mmu_prop->num_hops - 1; in _hl_mmu_v2_hr_unmap()
135 for (i = 0 ; i < mmu_prop->num_hops ; i++) { in _hl_mmu_v2_hr_unmap()
145 hop_pte_phys_addr[i] = hl_mmu_get_hop_pte_phys_addr(ctx, mmu_prop, i, in _hl_mmu_v2_hr_unmap()
155 if ((i < hop_last) && (curr_pte & mmu_prop->last_mask)) { in _hl_mmu_v2_hr_unmap()
190 static int hl_mmu_v2_get_last_hop(struct hl_mmu_properties *mmu_prop, u32 page_size) in hl_mmu_v2_get_last_hop() argument
194 for (hop = (mmu_prop->num_hops - 1); hop; hop--) { in hl_mmu_v2_get_last_hop()
195 if (mmu_prop->hop_shifts[hop] == 0) in hl_mmu_v2_get_last_hop()
198 if (page_size <= (1 << mmu_prop->hop_shifts[hop])) in hl_mmu_v2_get_last_hop()
[all …]
Dmmu.c174 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()
[all …]
Dmmu_v1.c175 static inline u64 get_hop_pte_addr(struct hl_ctx *ctx, struct hl_mmu_properties *mmu_prop, in get_hop_pte_addr() argument
180 mask = mmu_prop->hop_masks[hop_idx]; in get_hop_pte_addr()
181 shift = mmu_prop->hop_shifts[hop_idx]; in get_hop_pte_addr()
489 struct hl_mmu_properties *mmu_prop; in hl_mmu_v1_unmap() local
494 mmu_prop = is_dram_addr ? &prop->dmmu : &prop->pmmu; in hl_mmu_v1_unmap()
506 get_hop_pte_addr(ctx, mmu_prop, hop_addr, virt_addr, hop_idx); in hl_mmu_v1_unmap()
511 is_huge = curr_pte & mmu_prop->last_mask; in hl_mmu_v1_unmap()
525 get_hop_pte_addr(ctx, mmu_prop, hop_addr, virt_addr, hop_idx); in hl_mmu_v1_unmap()
532 HOP_PHYS_ADDR_MASK) | mmu_prop->last_mask | in hl_mmu_v1_unmap()
593 struct hl_mmu_properties *mmu_prop; in hl_mmu_v1_map() local
[all …]
/linux-6.6.21/drivers/accel/habanalabs/common/
Dhabanalabs.h1701 int (*mmu_get_real_page_size)(struct hl_device *hdev, struct hl_mmu_properties *mmu_prop,
2805 int (*get_tlb_mapping_params)(struct hl_device *hdev, struct hl_mmu_properties **mmu_prop,
3763 int hl_mmu_get_real_page_size(struct hl_device *hdev, struct hl_mmu_properties *mmu_prop,
3775 u64 hl_mmu_get_hop_pte_phys_addr(struct hl_ctx *ctx, struct hl_mmu_properties *mmu_prop,
3797 struct hl_mmu_properties *mmu_prop);
3801 struct hl_mmu_properties *mmu_prop,
/linux-6.6.21/drivers/accel/habanalabs/gaudi2/
Dgaudi2.c11098 static int gaudi2_mmu_get_real_page_size(struct hl_device *hdev, struct hl_mmu_properties *mmu_prop, in gaudi2_mmu_get_real_page_size() argument
11105 if (page_size % mmu_prop->page_size) in gaudi2_mmu_get_real_page_size()
11108 *real_page_size = mmu_prop->page_size; in gaudi2_mmu_get_real_page_size()
11112 if ((page_size % prop->dram_page_size) || (prop->dram_page_size > mmu_prop->page_size)) in gaudi2_mmu_get_real_page_size()
11129 page_size, mmu_prop->page_size >> 10); in gaudi2_mmu_get_real_page_size()