#include <linux/miscdevice.h>
#include <linux/bitfield.h>
#include <linux/pci-epf.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/bitops.h>
#include <linux/mutex.h>
#include <linux/delay.h>
#include <linux/pci.h>
#define DW_XDATA_DRIVER_NAME …
#define DW_XDATA_EP_MEM_OFFSET …
static DEFINE_IDA(xdata_ida);
#define STATUS_DONE …
#define CONTROL_DOORBELL …
#define CONTROL_IS_WRITE …
#define CONTROL_LENGTH(a) …
#define CONTROL_PATTERN_INC …
#define CONTROL_NO_ADDR_INC …
#define XPERF_CONTROL_ENABLE …
#define BURST_REPEAT …
#define BURST_VALUE …
#define PATTERN_VALUE …
struct dw_xdata_regs { … } __packed;
struct dw_xdata_region { … };
struct dw_xdata { … };
static inline struct dw_xdata_regs __iomem *__dw_regs(struct dw_xdata *dw)
{ … }
static void dw_xdata_stop(struct dw_xdata *dw)
{ … }
static void dw_xdata_start(struct dw_xdata *dw, bool write)
{ … }
static void dw_xdata_perf_meas(struct dw_xdata *dw, u64 *data, bool write)
{ … }
static u64 dw_xdata_perf_diff(u64 *m1, u64 *m2, u64 time)
{ … }
static void dw_xdata_perf(struct dw_xdata *dw, u64 *rate, bool write)
{ … }
static struct dw_xdata *misc_dev_to_dw(struct miscdevice *misc_dev)
{ … }
static ssize_t write_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t write_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t size)
{ … }
static DEVICE_ATTR_RW(write);
static ssize_t read_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t read_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t size)
{ … }
static DEVICE_ATTR_RW(read);
static struct attribute *xdata_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int dw_xdata_pcie_probe(struct pci_dev *pdev,
const struct pci_device_id *pid)
{ … }
static void dw_xdata_pcie_remove(struct pci_dev *pdev)
{ … }
static const struct pci_device_id dw_xdata_pcie_id_table[] = …;
MODULE_DEVICE_TABLE(pci, dw_xdata_pcie_id_table);
static struct pci_driver dw_xdata_pcie_driver = …;
module_pci_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;