linux/drivers/dma/idxd/device.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/dmaengine.h>
#include <linux/irq.h>
#include <uapi/linux/idxd.h>
#include "../dmaengine.h"
#include "idxd.h"
#include "registers.h"

static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
			  u32 *status);
static void idxd_device_wqs_clear_state(struct idxd_device *idxd);
static void idxd_wq_disable_cleanup(struct idxd_wq *wq);

/* Interrupt control bits */
void idxd_unmask_error_interrupts(struct idxd_device *idxd)
{}

void idxd_mask_error_interrupts(struct idxd_device *idxd)
{}

static void free_hw_descs(struct idxd_wq *wq)
{}

static int alloc_hw_descs(struct idxd_wq *wq, int num)
{}

static void free_descs(struct idxd_wq *wq)
{}

static int alloc_descs(struct idxd_wq *wq, int num)
{}

/* WQ control bits */
int idxd_wq_alloc_resources(struct idxd_wq *wq)
{}
EXPORT_SYMBOL_NS_GPL();

void idxd_wq_free_resources(struct idxd_wq *wq)
{}
EXPORT_SYMBOL_NS_GPL();

int idxd_wq_enable(struct idxd_wq *wq)
{}

int idxd_wq_disable(struct idxd_wq *wq, bool reset_config)
{}

void idxd_wq_drain(struct idxd_wq *wq)
{}

void idxd_wq_reset(struct idxd_wq *wq)
{}

int idxd_wq_map_portal(struct idxd_wq *wq)
{}

void idxd_wq_unmap_portal(struct idxd_wq *wq)
{}

void idxd_wqs_unmap_portal(struct idxd_device *idxd)
{}

static void __idxd_wq_set_pasid_locked(struct idxd_wq *wq, int pasid)
{}

int idxd_wq_set_pasid(struct idxd_wq *wq, int pasid)
{}

int idxd_wq_disable_pasid(struct idxd_wq *wq)
{}

static void idxd_wq_disable_cleanup(struct idxd_wq *wq)
{}

static void idxd_wq_device_reset_cleanup(struct idxd_wq *wq)
{}

static void idxd_wq_ref_release(struct percpu_ref *ref)
{}

int idxd_wq_init_percpu_ref(struct idxd_wq *wq)
{}
EXPORT_SYMBOL_NS_GPL();

void __idxd_wq_quiesce(struct idxd_wq *wq)
{}
EXPORT_SYMBOL_NS_GPL();

void idxd_wq_quiesce(struct idxd_wq *wq)
{}
EXPORT_SYMBOL_NS_GPL();

/* Device control bits */
static inline bool idxd_is_enabled(struct idxd_device *idxd)
{}

static inline bool idxd_device_is_halted(struct idxd_device *idxd)
{}

/*
 * This is function is only used for reset during probe and will
 * poll for completion. Once the device is setup with interrupts,
 * all commands will be done via interrupt completion.
 */
int idxd_device_init_reset(struct idxd_device *idxd)
{}

static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
			  u32 *status)
{}

int idxd_device_enable(struct idxd_device *idxd)
{}

int idxd_device_disable(struct idxd_device *idxd)
{}

void idxd_device_reset(struct idxd_device *idxd)
{}

void idxd_device_drain_pasid(struct idxd_device *idxd, int pasid)
{}

int idxd_device_request_int_handle(struct idxd_device *idxd, int idx, int *handle,
				   enum idxd_interrupt_type irq_type)
{}

int idxd_device_release_int_handle(struct idxd_device *idxd, int handle,
				   enum idxd_interrupt_type irq_type)
{}

/* Device configuration bits */
static void idxd_engines_clear_state(struct idxd_device *idxd)
{}

static void idxd_groups_clear_state(struct idxd_device *idxd)
{}

static void idxd_device_wqs_clear_state(struct idxd_device *idxd)
{}

void idxd_device_clear_state(struct idxd_device *idxd)
{}

static int idxd_device_evl_setup(struct idxd_device *idxd)
{}

static void idxd_device_evl_free(struct idxd_device *idxd)
{}

static void idxd_group_config_write(struct idxd_group *group)
{}

static int idxd_groups_config_write(struct idxd_device *idxd)

{}

static bool idxd_device_pasid_priv_enabled(struct idxd_device *idxd)
{}

static int idxd_wq_config_write(struct idxd_wq *wq)
{}

static int idxd_wqs_config_write(struct idxd_device *idxd)
{}

static void idxd_group_flags_setup(struct idxd_device *idxd)
{}

static int idxd_engines_setup(struct idxd_device *idxd)
{}

static int idxd_wqs_setup(struct idxd_device *idxd)
{}

int idxd_device_config(struct idxd_device *idxd)
{}

static int idxd_wq_load_config(struct idxd_wq *wq)
{}

static void idxd_group_load_config(struct idxd_group *group)
{}

int idxd_device_load_config(struct idxd_device *idxd)
{}

static void idxd_flush_pending_descs(struct idxd_irq_entry *ie)
{}

static void idxd_device_set_perm_entry(struct idxd_device *idxd,
				       struct idxd_irq_entry *ie)
{}

static void idxd_device_clear_perm_entry(struct idxd_device *idxd,
					 struct idxd_irq_entry *ie)
{}

void idxd_wq_free_irq(struct idxd_wq *wq)
{}

int idxd_wq_request_irq(struct idxd_wq *wq)
{}

int idxd_drv_enable_wq(struct idxd_wq *wq)
{}
EXPORT_SYMBOL_NS_GPL();

void idxd_drv_disable_wq(struct idxd_wq *wq)
{}
EXPORT_SYMBOL_NS_GPL();

int idxd_device_drv_probe(struct idxd_dev *idxd_dev)
{}

void idxd_device_drv_remove(struct idxd_dev *idxd_dev)
{}

static enum idxd_dev_type dev_types[] =;

struct idxd_device_driver idxd_drv =;
EXPORT_SYMBOL_GPL();