#ifndef _XE_LMTT_TYPES_H_
#define _XE_LMTT_TYPES_H_
#include <linux/types.h>
struct xe_bo;
struct xe_lmtt;
struct xe_lmtt_pt;
struct xe_lmtt_ops;
#define LMTT_PTE_INVALID ULL(0)
struct xe_lmtt {
struct xe_lmtt_pt *pd;
const struct xe_lmtt_ops *ops;
};
struct xe_lmtt_pt {
unsigned int level;
struct xe_bo *bo;
struct xe_lmtt_pt *entries[];
};
struct xe_lmtt_ops {
unsigned int (*lmtt_root_pd_level)(void);
unsigned int (*lmtt_pte_num)(unsigned int level);
unsigned int (*lmtt_pte_size)(unsigned int level);
unsigned int (*lmtt_pte_shift)(unsigned int level);
unsigned int (*lmtt_pte_index)(u64 addr, unsigned int level);
u64 (*lmtt_pte_encode)(unsigned long offset, unsigned int level);
};
extern const struct xe_lmtt_ops lmtt_2l_ops;
extern const struct xe_lmtt_ops lmtt_ml_ops;
#endif