#include <rdma/ib_umem.h>
#include <rdma/uverbs_ioctl.h>
#include "hns_roce_device.h"
#include "hns_roce_cmd.h"
#include "hns_roce_hem.h"
#include "hns_roce_common.h"
static u8 get_least_load_bankid_for_cq(struct hns_roce_bank *bank)
{ … }
static int alloc_cqn(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq)
{ … }
static inline u8 get_cq_bankid(unsigned long cqn)
{ … }
static void free_cqn(struct hns_roce_dev *hr_dev, unsigned long cqn)
{ … }
static int hns_roce_create_cqc(struct hns_roce_dev *hr_dev,
struct hns_roce_cq *hr_cq,
u64 *mtts, dma_addr_t dma_handle)
{ … }
static int alloc_cqc(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq)
{ … }
static void free_cqc(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq)
{ … }
static int alloc_cq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq,
struct ib_udata *udata, unsigned long addr)
{ … }
static void free_cq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq)
{ … }
static int alloc_cq_db(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq,
struct ib_udata *udata, unsigned long addr,
struct hns_roce_ib_create_cq_resp *resp)
{ … }
static void free_cq_db(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq,
struct ib_udata *udata)
{ … }
static int verify_cq_create_attr(struct hns_roce_dev *hr_dev,
const struct ib_cq_init_attr *attr)
{ … }
static int get_cq_ucmd(struct hns_roce_cq *hr_cq, struct ib_udata *udata,
struct hns_roce_ib_create_cq *ucmd)
{ … }
static void set_cq_param(struct hns_roce_cq *hr_cq, u32 cq_entries, int vector,
struct hns_roce_ib_create_cq *ucmd)
{ … }
static int set_cqe_size(struct hns_roce_cq *hr_cq, struct ib_udata *udata,
struct hns_roce_ib_create_cq *ucmd)
{ … }
int hns_roce_create_cq(struct ib_cq *ib_cq, const struct ib_cq_init_attr *attr,
struct uverbs_attr_bundle *attrs)
{ … }
int hns_roce_destroy_cq(struct ib_cq *ib_cq, struct ib_udata *udata)
{ … }
void hns_roce_cq_completion(struct hns_roce_dev *hr_dev, u32 cqn)
{ … }
void hns_roce_cq_event(struct hns_roce_dev *hr_dev, u32 cqn, int event_type)
{ … }
void hns_roce_init_cq_table(struct hns_roce_dev *hr_dev)
{ … }
void hns_roce_cleanup_cq_table(struct hns_roce_dev *hr_dev)
{ … }