#include "../habanalabs.h"
#include "../../include/hw_ip/mmu/mmu_general.h"
#include <linux/slab.h>
#define MMU_V1_MAX_HOPS …
static inline u64 get_hop_pte_addr(struct hl_ctx *ctx, struct hl_mmu_properties *mmu_prop,
u64 *hop_addr_arr, u64 virt_addr, enum mmu_hop_num hop_idx)
{ … }
static int dram_default_mapping_init(struct hl_ctx *ctx)
{ … }
static void dram_default_mapping_fini(struct hl_ctx *ctx)
{ … }
static int hl_mmu_v1_ctx_init(struct hl_ctx *ctx)
{ … }
static void hl_mmu_v1_ctx_fini(struct hl_ctx *ctx)
{ … }
static int hl_mmu_v1_unmap(struct hl_ctx *ctx,
u64 virt_addr, bool is_dram_addr)
{ … }
static int hl_mmu_v1_map(struct hl_ctx *ctx, u64 virt_addr, u64 phys_addr,
u32 page_size, bool is_dram_addr)
{ … }
static void hl_mmu_v1_swap_out(struct hl_ctx *ctx)
{ … }
static void hl_mmu_v1_swap_in(struct hl_ctx *ctx)
{ … }
static int hl_mmu_v1_get_tlb_info(struct hl_ctx *ctx, u64 virt_addr,
struct hl_mmu_hop_info *hops)
{ … }
void hl_mmu_v1_set_funcs(struct hl_device *hdev, struct hl_mmu_funcs *mmu)
{ … }