2020-01-22 07:43:59 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
|
|
|
|
#ifndef _IDXD_H_
|
|
|
|
#define _IDXD_H_
|
|
|
|
|
|
|
|
#include <linux/sbitmap.h>
|
2020-01-22 07:44:23 +08:00
|
|
|
#include <linux/dmaengine.h>
|
2020-01-22 07:43:59 +08:00
|
|
|
#include <linux/percpu-rwsem.h>
|
|
|
|
#include <linux/wait.h>
|
2020-01-22 07:44:29 +08:00
|
|
|
#include <linux/cdev.h>
|
2021-04-16 07:37:33 +08:00
|
|
|
#include <linux/idr.h>
|
2020-01-22 07:43:59 +08:00
|
|
|
#include "registers.h"
|
|
|
|
|
|
|
|
#define IDXD_DRIVER_VERSION "1.00"
|
|
|
|
|
|
|
|
extern struct kmem_cache *idxd_desc_pool;
|
|
|
|
|
2021-04-16 07:37:10 +08:00
|
|
|
struct idxd_device;
|
|
|
|
struct idxd_wq;
|
|
|
|
|
2020-01-22 07:43:59 +08:00
|
|
|
#define IDXD_REG_TIMEOUT 50
|
|
|
|
#define IDXD_DRAIN_TIMEOUT 5000
|
|
|
|
|
|
|
|
enum idxd_type {
|
|
|
|
IDXD_TYPE_UNKNOWN = -1,
|
|
|
|
IDXD_TYPE_DSA = 0,
|
2020-11-18 04:39:14 +08:00
|
|
|
IDXD_TYPE_IAX,
|
|
|
|
IDXD_TYPE_MAX,
|
2020-01-22 07:43:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#define IDXD_NAME_SIZE 128
|
|
|
|
|
|
|
|
struct idxd_device_driver {
|
|
|
|
struct device_driver drv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct idxd_irq_entry {
|
|
|
|
struct idxd_device *idxd;
|
|
|
|
int id;
|
2021-04-16 07:37:15 +08:00
|
|
|
int vector;
|
2020-01-22 07:43:59 +08:00
|
|
|
struct llist_head pending_llist;
|
|
|
|
struct list_head work_list;
|
2020-10-28 01:34:40 +08:00
|
|
|
/*
|
|
|
|
* Lock to protect access between irq thread process descriptor
|
|
|
|
* and irq thread processing error descriptor.
|
|
|
|
*/
|
|
|
|
spinlock_t list_lock;
|
2020-01-22 07:43:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct idxd_group {
|
|
|
|
struct device conf_dev;
|
|
|
|
struct idxd_device *idxd;
|
|
|
|
struct grpcfg grpcfg;
|
|
|
|
int id;
|
|
|
|
int num_engines;
|
|
|
|
int num_wqs;
|
|
|
|
bool use_token_limit;
|
|
|
|
u8 tokens_allowed;
|
|
|
|
u8 tokens_reserved;
|
|
|
|
int tc_a;
|
|
|
|
int tc_b;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define IDXD_MAX_PRIORITY 0xf
|
|
|
|
|
|
|
|
enum idxd_wq_state {
|
|
|
|
IDXD_WQ_DISABLED = 0,
|
|
|
|
IDXD_WQ_ENABLED,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum idxd_wq_flag {
|
|
|
|
WQ_FLAG_DEDICATED = 0,
|
2020-10-28 01:34:35 +08:00
|
|
|
WQ_FLAG_BLOCK_ON_FAULT,
|
2020-01-22 07:43:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum idxd_wq_type {
|
|
|
|
IDXD_WQT_NONE = 0,
|
|
|
|
IDXD_WQT_KERNEL,
|
2020-01-22 07:44:29 +08:00
|
|
|
IDXD_WQT_USER,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct idxd_cdev {
|
2021-04-16 07:37:57 +08:00
|
|
|
struct idxd_wq *wq;
|
2020-01-22 07:44:29 +08:00
|
|
|
struct cdev cdev;
|
2021-04-16 07:37:57 +08:00
|
|
|
struct device dev;
|
2020-01-22 07:44:29 +08:00
|
|
|
int minor;
|
2020-01-22 07:43:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#define IDXD_ALLOCATED_BATCH_SIZE 128U
|
|
|
|
#define WQ_NAME_SIZE 1024
|
|
|
|
#define WQ_TYPE_SIZE 10
|
|
|
|
|
2020-01-22 07:44:17 +08:00
|
|
|
enum idxd_op_type {
|
|
|
|
IDXD_OP_BLOCK = 0,
|
|
|
|
IDXD_OP_NONBLOCK = 1,
|
|
|
|
};
|
|
|
|
|
2020-01-22 07:44:23 +08:00
|
|
|
enum idxd_complete_type {
|
|
|
|
IDXD_COMPLETE_NORMAL = 0,
|
|
|
|
IDXD_COMPLETE_ABORT,
|
2020-10-28 01:34:35 +08:00
|
|
|
IDXD_COMPLETE_DEV_FAIL,
|
2020-01-22 07:44:23 +08:00
|
|
|
};
|
|
|
|
|
2021-04-16 07:37:10 +08:00
|
|
|
struct idxd_dma_chan {
|
|
|
|
struct dma_chan chan;
|
|
|
|
struct idxd_wq *wq;
|
|
|
|
};
|
|
|
|
|
2020-01-22 07:43:59 +08:00
|
|
|
struct idxd_wq {
|
2020-10-28 01:34:35 +08:00
|
|
|
void __iomem *portal;
|
2020-01-22 07:43:59 +08:00
|
|
|
struct device conf_dev;
|
2021-04-16 07:37:57 +08:00
|
|
|
struct idxd_cdev *idxd_cdev;
|
|
|
|
struct wait_queue_head err_queue;
|
2020-01-22 07:43:59 +08:00
|
|
|
struct idxd_device *idxd;
|
|
|
|
int id;
|
|
|
|
enum idxd_wq_type type;
|
|
|
|
struct idxd_group *group;
|
|
|
|
int client_count;
|
|
|
|
struct mutex wq_lock; /* mutex for workqueue */
|
|
|
|
u32 size;
|
|
|
|
u32 threshold;
|
|
|
|
u32 priority;
|
|
|
|
enum idxd_wq_state state;
|
|
|
|
unsigned long flags;
|
2020-10-28 05:34:09 +08:00
|
|
|
union wqcfg *wqcfg;
|
2020-01-22 07:43:59 +08:00
|
|
|
u32 vec_ptr; /* interrupt steering */
|
|
|
|
struct dsa_hw_desc **hw_descs;
|
|
|
|
int num_descs;
|
2020-11-18 04:39:14 +08:00
|
|
|
union {
|
|
|
|
struct dsa_completion_record *compls;
|
|
|
|
struct iax_completion_record *iax_compls;
|
|
|
|
};
|
|
|
|
void *compls_raw;
|
2020-01-22 07:43:59 +08:00
|
|
|
dma_addr_t compls_addr;
|
2020-11-18 04:39:14 +08:00
|
|
|
dma_addr_t compls_addr_raw;
|
2020-01-22 07:43:59 +08:00
|
|
|
int compls_size;
|
|
|
|
struct idxd_desc **descs;
|
2020-06-16 04:54:26 +08:00
|
|
|
struct sbitmap_queue sbq;
|
2021-04-16 07:37:10 +08:00
|
|
|
struct idxd_dma_chan *idxd_chan;
|
2020-01-22 07:43:59 +08:00
|
|
|
char name[WQ_NAME_SIZE + 1];
|
2020-08-29 06:12:10 +08:00
|
|
|
u64 max_xfer_bytes;
|
2020-08-29 06:12:50 +08:00
|
|
|
u32 max_batch_size;
|
2020-11-14 06:55:05 +08:00
|
|
|
bool ats_dis;
|
2020-01-22 07:43:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct idxd_engine {
|
|
|
|
struct device conf_dev;
|
|
|
|
int id;
|
|
|
|
struct idxd_group *group;
|
|
|
|
struct idxd_device *idxd;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* shadow registers */
|
|
|
|
struct idxd_hw {
|
|
|
|
u32 version;
|
|
|
|
union gen_cap_reg gen_cap;
|
|
|
|
union wq_cap_reg wq_cap;
|
|
|
|
union group_cap_reg group_cap;
|
|
|
|
union engine_cap_reg engine_cap;
|
|
|
|
struct opcap opcap;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum idxd_device_state {
|
|
|
|
IDXD_DEV_HALTED = -1,
|
|
|
|
IDXD_DEV_DISABLED = 0,
|
|
|
|
IDXD_DEV_CONF_READY,
|
|
|
|
IDXD_DEV_ENABLED,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum idxd_device_flag {
|
|
|
|
IDXD_FLAG_CONFIGURABLE = 0,
|
2020-06-27 02:11:18 +08:00
|
|
|
IDXD_FLAG_CMD_RUNNING,
|
2020-10-28 01:34:35 +08:00
|
|
|
IDXD_FLAG_PASID_ENABLED,
|
2020-01-22 07:43:59 +08:00
|
|
|
};
|
|
|
|
|
2021-04-16 07:37:10 +08:00
|
|
|
struct idxd_dma_dev {
|
|
|
|
struct idxd_device *idxd;
|
|
|
|
struct dma_device dma;
|
|
|
|
};
|
|
|
|
|
2021-04-16 07:38:09 +08:00
|
|
|
struct idxd_driver_data {
|
|
|
|
const char *name_prefix;
|
2020-01-22 07:43:59 +08:00
|
|
|
enum idxd_type type;
|
2021-04-16 07:38:09 +08:00
|
|
|
struct device_type *dev_type;
|
|
|
|
int compl_size;
|
|
|
|
int align;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct idxd_device {
|
2020-01-22 07:43:59 +08:00
|
|
|
struct device conf_dev;
|
2021-04-16 07:38:09 +08:00
|
|
|
struct idxd_driver_data *data;
|
2020-01-22 07:43:59 +08:00
|
|
|
struct list_head list;
|
|
|
|
struct idxd_hw hw;
|
|
|
|
enum idxd_device_state state;
|
|
|
|
unsigned long flags;
|
|
|
|
int id;
|
2020-01-22 07:44:29 +08:00
|
|
|
int major;
|
2020-08-29 06:13:55 +08:00
|
|
|
u8 cmd_status;
|
2020-01-22 07:43:59 +08:00
|
|
|
|
|
|
|
struct pci_dev *pdev;
|
|
|
|
void __iomem *reg_base;
|
|
|
|
|
|
|
|
spinlock_t dev_lock; /* spinlock for device */
|
2020-06-27 02:11:18 +08:00
|
|
|
struct completion *cmd_done;
|
2021-04-16 07:37:51 +08:00
|
|
|
struct idxd_group **groups;
|
2021-04-16 07:37:39 +08:00
|
|
|
struct idxd_wq **wqs;
|
2021-04-16 07:37:44 +08:00
|
|
|
struct idxd_engine **engines;
|
2020-01-22 07:43:59 +08:00
|
|
|
|
2020-10-28 01:34:35 +08:00
|
|
|
struct iommu_sva *sva;
|
|
|
|
unsigned int pasid;
|
|
|
|
|
2020-01-22 07:43:59 +08:00
|
|
|
int num_groups;
|
|
|
|
|
|
|
|
u32 msix_perm_offset;
|
|
|
|
u32 wqcfg_offset;
|
|
|
|
u32 grpcfg_offset;
|
|
|
|
u32 perfmon_offset;
|
|
|
|
|
|
|
|
u64 max_xfer_bytes;
|
|
|
|
u32 max_batch_size;
|
|
|
|
int max_groups;
|
|
|
|
int max_engines;
|
|
|
|
int max_tokens;
|
|
|
|
int max_wqs;
|
|
|
|
int max_wq_size;
|
|
|
|
int token_limit;
|
2020-01-22 07:44:05 +08:00
|
|
|
int nr_tokens; /* non-reserved tokens */
|
2020-10-28 05:34:09 +08:00
|
|
|
unsigned int wqcfg_size;
|
2020-01-22 07:43:59 +08:00
|
|
|
|
|
|
|
union sw_err_reg sw_err;
|
2020-06-27 02:11:18 +08:00
|
|
|
wait_queue_head_t cmd_waitq;
|
2020-01-22 07:43:59 +08:00
|
|
|
int num_wq_irqs;
|
|
|
|
struct idxd_irq_entry *irq_entries;
|
2020-01-22 07:44:23 +08:00
|
|
|
|
2021-04-16 07:37:10 +08:00
|
|
|
struct idxd_dma_dev *idxd_dma;
|
2020-06-27 02:11:18 +08:00
|
|
|
struct workqueue_struct *wq;
|
|
|
|
struct work_struct work;
|
2020-01-22 07:43:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* IDXD software descriptor */
|
|
|
|
struct idxd_desc {
|
2020-11-18 04:39:14 +08:00
|
|
|
union {
|
|
|
|
struct dsa_hw_desc *hw;
|
|
|
|
struct iax_hw_desc *iax_hw;
|
|
|
|
};
|
2020-01-22 07:43:59 +08:00
|
|
|
dma_addr_t desc_dma;
|
2020-11-18 04:39:14 +08:00
|
|
|
union {
|
|
|
|
struct dsa_completion_record *completion;
|
|
|
|
struct iax_completion_record *iax_completion;
|
|
|
|
};
|
2020-01-22 07:43:59 +08:00
|
|
|
dma_addr_t compl_dma;
|
2020-01-22 07:44:23 +08:00
|
|
|
struct dma_async_tx_descriptor txd;
|
2020-01-22 07:43:59 +08:00
|
|
|
struct llist_node llnode;
|
|
|
|
struct list_head list;
|
|
|
|
int id;
|
2020-06-16 04:54:26 +08:00
|
|
|
int cpu;
|
2020-01-22 07:43:59 +08:00
|
|
|
struct idxd_wq *wq;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define confdev_to_idxd(dev) container_of(dev, struct idxd_device, conf_dev)
|
|
|
|
#define confdev_to_wq(dev) container_of(dev, struct idxd_wq, conf_dev)
|
|
|
|
|
2020-01-22 07:44:29 +08:00
|
|
|
extern struct bus_type dsa_bus_type;
|
2020-11-18 04:39:14 +08:00
|
|
|
extern struct bus_type iax_bus_type;
|
2020-01-22 07:44:29 +08:00
|
|
|
|
2020-10-28 01:34:35 +08:00
|
|
|
extern bool support_enqcmd;
|
2021-04-16 07:38:03 +08:00
|
|
|
extern struct ida idxd_ida;
|
2021-04-16 07:37:33 +08:00
|
|
|
extern struct device_type dsa_device_type;
|
|
|
|
extern struct device_type iax_device_type;
|
2021-04-16 07:37:39 +08:00
|
|
|
extern struct device_type idxd_wq_device_type;
|
2021-04-16 07:37:44 +08:00
|
|
|
extern struct device_type idxd_engine_device_type;
|
2021-04-16 07:37:51 +08:00
|
|
|
extern struct device_type idxd_group_device_type;
|
2021-04-16 07:37:33 +08:00
|
|
|
|
|
|
|
static inline bool is_dsa_dev(struct device *dev)
|
|
|
|
{
|
|
|
|
return dev->type == &dsa_device_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool is_iax_dev(struct device *dev)
|
|
|
|
{
|
|
|
|
return dev->type == &iax_device_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool is_idxd_dev(struct device *dev)
|
|
|
|
{
|
|
|
|
return is_dsa_dev(dev) || is_iax_dev(dev);
|
|
|
|
}
|
2020-10-28 01:34:35 +08:00
|
|
|
|
2021-04-16 07:37:39 +08:00
|
|
|
static inline bool is_idxd_wq_dev(struct device *dev)
|
|
|
|
{
|
|
|
|
return dev->type == &idxd_wq_device_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool is_idxd_wq_dmaengine(struct idxd_wq *wq)
|
|
|
|
{
|
|
|
|
if (wq->type == IDXD_WQT_KERNEL && strcmp(wq->name, "dmaengine") == 0)
|
|
|
|
return true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool is_idxd_wq_cdev(struct idxd_wq *wq)
|
|
|
|
{
|
|
|
|
return wq->type == IDXD_WQT_USER;
|
|
|
|
}
|
|
|
|
|
2020-01-22 07:43:59 +08:00
|
|
|
static inline bool wq_dedicated(struct idxd_wq *wq)
|
|
|
|
{
|
|
|
|
return test_bit(WQ_FLAG_DEDICATED, &wq->flags);
|
|
|
|
}
|
|
|
|
|
2020-10-28 01:34:35 +08:00
|
|
|
static inline bool wq_shared(struct idxd_wq *wq)
|
|
|
|
{
|
|
|
|
return !test_bit(WQ_FLAG_DEDICATED, &wq->flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool device_pasid_enabled(struct idxd_device *idxd)
|
|
|
|
{
|
|
|
|
return test_bit(IDXD_FLAG_PASID_ENABLED, &idxd->flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool device_swq_supported(struct idxd_device *idxd)
|
|
|
|
{
|
|
|
|
return (support_enqcmd && device_pasid_enabled(idxd));
|
|
|
|
}
|
|
|
|
|
2020-01-22 07:44:29 +08:00
|
|
|
enum idxd_portal_prot {
|
|
|
|
IDXD_PORTAL_UNLIMITED = 0,
|
|
|
|
IDXD_PORTAL_LIMITED,
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline int idxd_get_wq_portal_offset(enum idxd_portal_prot prot)
|
|
|
|
{
|
|
|
|
return prot * 0x1000;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int idxd_get_wq_portal_full_offset(int wq_id,
|
|
|
|
enum idxd_portal_prot prot)
|
|
|
|
{
|
|
|
|
return ((wq_id * 4) << PAGE_SHIFT) + idxd_get_wq_portal_offset(prot);
|
|
|
|
}
|
|
|
|
|
2020-01-22 07:44:05 +08:00
|
|
|
static inline void idxd_wq_get(struct idxd_wq *wq)
|
|
|
|
{
|
|
|
|
wq->client_count++;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void idxd_wq_put(struct idxd_wq *wq)
|
|
|
|
{
|
|
|
|
wq->client_count--;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int idxd_wq_refcount(struct idxd_wq *wq)
|
|
|
|
{
|
|
|
|
return wq->client_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
int idxd_register_bus_type(void);
|
|
|
|
void idxd_unregister_bus_type(void);
|
2021-04-16 07:37:33 +08:00
|
|
|
int idxd_register_devices(struct idxd_device *idxd);
|
|
|
|
void idxd_unregister_devices(struct idxd_device *idxd);
|
2020-01-22 07:44:05 +08:00
|
|
|
int idxd_register_driver(void);
|
|
|
|
void idxd_unregister_driver(void);
|
2020-01-22 07:43:59 +08:00
|
|
|
|
|
|
|
/* device interrupt control */
|
2021-04-13 00:23:27 +08:00
|
|
|
void idxd_msix_perm_setup(struct idxd_device *idxd);
|
|
|
|
void idxd_msix_perm_clear(struct idxd_device *idxd);
|
2020-01-22 07:43:59 +08:00
|
|
|
irqreturn_t idxd_irq_handler(int vec, void *data);
|
|
|
|
irqreturn_t idxd_misc_thread(int vec, void *data);
|
|
|
|
irqreturn_t idxd_wq_thread(int irq, void *data);
|
|
|
|
void idxd_mask_error_interrupts(struct idxd_device *idxd);
|
|
|
|
void idxd_unmask_error_interrupts(struct idxd_device *idxd);
|
|
|
|
void idxd_mask_msix_vectors(struct idxd_device *idxd);
|
2020-06-27 02:12:56 +08:00
|
|
|
void idxd_mask_msix_vector(struct idxd_device *idxd, int vec_id);
|
|
|
|
void idxd_unmask_msix_vector(struct idxd_device *idxd, int vec_id);
|
2020-01-22 07:43:59 +08:00
|
|
|
|
|
|
|
/* device control */
|
2021-02-01 23:26:14 +08:00
|
|
|
int idxd_device_init_reset(struct idxd_device *idxd);
|
2020-01-22 07:43:59 +08:00
|
|
|
int idxd_device_enable(struct idxd_device *idxd);
|
|
|
|
int idxd_device_disable(struct idxd_device *idxd);
|
2020-06-27 02:11:18 +08:00
|
|
|
void idxd_device_reset(struct idxd_device *idxd);
|
2020-01-22 07:43:59 +08:00
|
|
|
void idxd_device_cleanup(struct idxd_device *idxd);
|
|
|
|
int idxd_device_config(struct idxd_device *idxd);
|
|
|
|
void idxd_device_wqs_clear_state(struct idxd_device *idxd);
|
2020-10-28 01:34:35 +08:00
|
|
|
void idxd_device_drain_pasid(struct idxd_device *idxd, int pasid);
|
2020-01-22 07:43:59 +08:00
|
|
|
|
|
|
|
/* work queue control */
|
|
|
|
int idxd_wq_alloc_resources(struct idxd_wq *wq);
|
|
|
|
void idxd_wq_free_resources(struct idxd_wq *wq);
|
|
|
|
int idxd_wq_enable(struct idxd_wq *wq);
|
|
|
|
int idxd_wq_disable(struct idxd_wq *wq);
|
2020-06-27 02:11:18 +08:00
|
|
|
void idxd_wq_drain(struct idxd_wq *wq);
|
2021-04-13 00:02:36 +08:00
|
|
|
void idxd_wq_reset(struct idxd_wq *wq);
|
2020-01-22 07:44:05 +08:00
|
|
|
int idxd_wq_map_portal(struct idxd_wq *wq);
|
|
|
|
void idxd_wq_unmap_portal(struct idxd_wq *wq);
|
2020-06-26 03:17:42 +08:00
|
|
|
void idxd_wq_disable_cleanup(struct idxd_wq *wq);
|
2020-10-28 01:34:35 +08:00
|
|
|
int idxd_wq_set_pasid(struct idxd_wq *wq, int pasid);
|
|
|
|
int idxd_wq_disable_pasid(struct idxd_wq *wq);
|
2020-01-22 07:43:59 +08:00
|
|
|
|
2020-01-22 07:44:17 +08:00
|
|
|
/* submission */
|
|
|
|
int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc);
|
|
|
|
struct idxd_desc *idxd_alloc_desc(struct idxd_wq *wq, enum idxd_op_type optype);
|
|
|
|
void idxd_free_desc(struct idxd_wq *wq, struct idxd_desc *desc);
|
|
|
|
|
2020-01-22 07:44:23 +08:00
|
|
|
/* dmaengine */
|
|
|
|
int idxd_register_dma_device(struct idxd_device *idxd);
|
|
|
|
void idxd_unregister_dma_device(struct idxd_device *idxd);
|
|
|
|
int idxd_register_dma_channel(struct idxd_wq *wq);
|
|
|
|
void idxd_unregister_dma_channel(struct idxd_wq *wq);
|
|
|
|
void idxd_parse_completion_status(u8 status, enum dmaengine_tx_result *res);
|
|
|
|
void idxd_dma_complete_txd(struct idxd_desc *desc,
|
|
|
|
enum idxd_complete_type comp_type);
|
|
|
|
|
2020-01-22 07:44:29 +08:00
|
|
|
/* cdev */
|
|
|
|
int idxd_cdev_register(void);
|
|
|
|
void idxd_cdev_remove(void);
|
|
|
|
int idxd_cdev_get_major(struct idxd_device *idxd);
|
|
|
|
int idxd_wq_add_cdev(struct idxd_wq *wq);
|
|
|
|
void idxd_wq_del_cdev(struct idxd_wq *wq);
|
|
|
|
|
2020-01-22 07:43:59 +08:00
|
|
|
#endif
|