#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/workqueue.h>
#include <linux/fs.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/device.h>
#include <linux/idr.h>
#include <linux/iommu.h>
#include <uapi/linux/idxd.h>
#include <linux/dmaengine.h>
#include "../dmaengine.h"
#include "registers.h"
#include "idxd.h"
#include "perfmon.h"
MODULE_VERSION(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_IMPORT_NS(…);
static bool sva = …;
module_param(sva, bool, 0644);
MODULE_PARM_DESC(…) …;
bool tc_override;
module_param(tc_override, bool, 0644);
MODULE_PARM_DESC(…) …;
#define DRV_NAME …
bool support_enqcmd;
DEFINE_IDA(…);
static struct idxd_driver_data idxd_driver_data[] = …;
static struct pci_device_id idxd_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, idxd_pci_tbl);
static int idxd_setup_interrupts(struct idxd_device *idxd)
{ … }
static void idxd_cleanup_interrupts(struct idxd_device *idxd)
{ … }
static int idxd_setup_wqs(struct idxd_device *idxd)
{ … }
static int idxd_setup_engines(struct idxd_device *idxd)
{ … }
static int idxd_setup_groups(struct idxd_device *idxd)
{ … }
static void idxd_cleanup_internals(struct idxd_device *idxd)
{ … }
static int idxd_init_evl(struct idxd_device *idxd)
{ … }
static int idxd_setup_internals(struct idxd_device *idxd)
{ … }
static void idxd_read_table_offsets(struct idxd_device *idxd)
{ … }
void multi_u64_to_bmap(unsigned long *bmap, u64 *val, int count)
{ … }
static void idxd_read_caps(struct idxd_device *idxd)
{ … }
static struct idxd_device *idxd_alloc(struct pci_dev *pdev, struct idxd_driver_data *data)
{ … }
static int idxd_enable_system_pasid(struct idxd_device *idxd)
{ … }
static void idxd_disable_system_pasid(struct idxd_device *idxd)
{ … }
static int idxd_enable_sva(struct pci_dev *pdev)
{ … }
static void idxd_disable_sva(struct pci_dev *pdev)
{ … }
static int idxd_probe(struct idxd_device *idxd)
{ … }
static void idxd_cleanup(struct idxd_device *idxd)
{ … }
static int idxd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{ … }
void idxd_wqs_quiesce(struct idxd_device *idxd)
{ … }
static void idxd_shutdown(struct pci_dev *pdev)
{ … }
static void idxd_remove(struct pci_dev *pdev)
{ … }
static struct pci_driver idxd_pci_driver = …;
static int __init idxd_init_module(void)
{ … }
module_init(…) …;
static void __exit idxd_exit_module(void)
{ … }
module_exit(idxd_exit_module);