linux/drivers/dma/idxd/sysfs.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/device.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <uapi/linux/idxd.h>
#include "registers.h"
#include "idxd.h"

static char *idxd_wq_type_names[] =;

/* IDXD engine attributes */
static ssize_t engine_group_id_show(struct device *dev,
				    struct device_attribute *attr, char *buf)
{}

static ssize_t engine_group_id_store(struct device *dev,
				     struct device_attribute *attr,
				     const char *buf, size_t count)
{}

static struct device_attribute dev_attr_engine_group =;

static struct attribute *idxd_engine_attributes[] =;

static const struct attribute_group idxd_engine_attribute_group =;

static const struct attribute_group *idxd_engine_attribute_groups[] =;

static void idxd_conf_engine_release(struct device *dev)
{}

const struct device_type idxd_engine_device_type =;

/* Group attributes */

static void idxd_set_free_rdbufs(struct idxd_device *idxd)
{}

static ssize_t group_read_buffers_reserved_show(struct device *dev,
						struct device_attribute *attr,
						char *buf)
{}

static ssize_t group_tokens_reserved_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}

static ssize_t group_read_buffers_reserved_store(struct device *dev,
						 struct device_attribute *attr,
						 const char *buf, size_t count)
{}

static ssize_t group_tokens_reserved_store(struct device *dev,
					   struct device_attribute *attr,
					   const char *buf, size_t count)
{}

static struct device_attribute dev_attr_group_tokens_reserved =;

static struct device_attribute dev_attr_group_read_buffers_reserved =;

static ssize_t group_read_buffers_allowed_show(struct device *dev,
					       struct device_attribute *attr,
					       char *buf)
{}

static ssize_t group_tokens_allowed_show(struct device *dev,
					 struct device_attribute *attr,
					 char *buf)
{}

static ssize_t group_read_buffers_allowed_store(struct device *dev,
						struct device_attribute *attr,
						const char *buf, size_t count)
{}

static ssize_t group_tokens_allowed_store(struct device *dev,
					  struct device_attribute *attr,
					  const char *buf, size_t count)
{}

static struct device_attribute dev_attr_group_tokens_allowed =;

static struct device_attribute dev_attr_group_read_buffers_allowed =;

static ssize_t group_use_read_buffer_limit_show(struct device *dev,
						struct device_attribute *attr,
						char *buf)
{}

static ssize_t group_use_token_limit_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}

static ssize_t group_use_read_buffer_limit_store(struct device *dev,
						 struct device_attribute *attr,
						 const char *buf, size_t count)
{}

static ssize_t group_use_token_limit_store(struct device *dev,
					   struct device_attribute *attr,
					   const char *buf, size_t count)
{}

static struct device_attribute dev_attr_group_use_token_limit =;

static struct device_attribute dev_attr_group_use_read_buffer_limit =;

static ssize_t group_engines_show(struct device *dev,
				  struct device_attribute *attr, char *buf)
{}

static struct device_attribute dev_attr_group_engines =;

static ssize_t group_work_queues_show(struct device *dev,
				      struct device_attribute *attr, char *buf)
{}

static struct device_attribute dev_attr_group_work_queues =;

static ssize_t group_traffic_class_a_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}

static ssize_t group_traffic_class_a_store(struct device *dev,
					   struct device_attribute *attr,
					   const char *buf, size_t count)
{}

static struct device_attribute dev_attr_group_traffic_class_a =;

static ssize_t group_traffic_class_b_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}

static ssize_t group_traffic_class_b_store(struct device *dev,
					   struct device_attribute *attr,
					   const char *buf, size_t count)
{}

static struct device_attribute dev_attr_group_traffic_class_b =;

static ssize_t group_desc_progress_limit_show(struct device *dev,
					      struct device_attribute *attr,
					      char *buf)
{}

static ssize_t group_desc_progress_limit_store(struct device *dev,
					       struct device_attribute *attr,
					       const char *buf, size_t count)
{}

static struct device_attribute dev_attr_group_desc_progress_limit =;

static ssize_t group_batch_progress_limit_show(struct device *dev,
					       struct device_attribute *attr,
					       char *buf)
{}

static ssize_t group_batch_progress_limit_store(struct device *dev,
						struct device_attribute *attr,
						const char *buf, size_t count)
{}

static struct device_attribute dev_attr_group_batch_progress_limit =;
static struct attribute *idxd_group_attributes[] =;

static bool idxd_group_attr_progress_limit_invisible(struct attribute *attr,
						     struct idxd_device *idxd)
{}

static bool idxd_group_attr_read_buffers_invisible(struct attribute *attr,
						   struct idxd_device *idxd)
{}

static umode_t idxd_group_attr_visible(struct kobject *kobj,
				       struct attribute *attr, int n)
{}

static const struct attribute_group idxd_group_attribute_group =;

static const struct attribute_group *idxd_group_attribute_groups[] =;

static void idxd_conf_group_release(struct device *dev)
{}

const struct device_type idxd_group_device_type =;

/* IDXD work queue attribs */
static ssize_t wq_clients_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}

static struct device_attribute dev_attr_wq_clients =;

static ssize_t wq_state_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}

static struct device_attribute dev_attr_wq_state =;

static ssize_t wq_group_id_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t wq_group_id_store(struct device *dev,
				 struct device_attribute *attr,
				 const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_group_id =;

static ssize_t wq_mode_show(struct device *dev, struct device_attribute *attr,
			    char *buf)
{}

static ssize_t wq_mode_store(struct device *dev,
			     struct device_attribute *attr, const char *buf,
			     size_t count)
{}

static struct device_attribute dev_attr_wq_mode =;

static ssize_t wq_size_show(struct device *dev, struct device_attribute *attr,
			    char *buf)
{}

static int total_claimed_wq_size(struct idxd_device *idxd)
{}

static ssize_t wq_size_store(struct device *dev,
			     struct device_attribute *attr, const char *buf,
			     size_t count)
{}

static struct device_attribute dev_attr_wq_size =;

static ssize_t wq_priority_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t wq_priority_store(struct device *dev,
				 struct device_attribute *attr,
				 const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_priority =;

static ssize_t wq_block_on_fault_show(struct device *dev,
				      struct device_attribute *attr, char *buf)
{}

static ssize_t wq_block_on_fault_store(struct device *dev,
				       struct device_attribute *attr,
				       const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_block_on_fault =;

static ssize_t wq_threshold_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static ssize_t wq_threshold_store(struct device *dev,
				  struct device_attribute *attr,
				  const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_threshold =;

static ssize_t wq_type_show(struct device *dev,
			    struct device_attribute *attr, char *buf)
{}

static ssize_t wq_type_store(struct device *dev,
			     struct device_attribute *attr, const char *buf,
			     size_t count)
{}

static struct device_attribute dev_attr_wq_type =;

static ssize_t wq_name_show(struct device *dev,
			    struct device_attribute *attr, char *buf)
{}

static ssize_t wq_name_store(struct device *dev,
			     struct device_attribute *attr, const char *buf,
			     size_t count)
{}

static struct device_attribute dev_attr_wq_name =;

static ssize_t wq_cdev_minor_show(struct device *dev,
				  struct device_attribute *attr, char *buf)
{}

static struct device_attribute dev_attr_wq_cdev_minor =;

static int __get_sysfs_u64(const char *buf, u64 *val)
{}

static ssize_t wq_max_transfer_size_show(struct device *dev, struct device_attribute *attr,
					 char *buf)
{}

static ssize_t wq_max_transfer_size_store(struct device *dev, struct device_attribute *attr,
					  const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_max_transfer_size =;

static ssize_t wq_max_batch_size_show(struct device *dev, struct device_attribute *attr, char *buf)
{}

static ssize_t wq_max_batch_size_store(struct device *dev, struct device_attribute *attr,
				       const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_max_batch_size =;

static ssize_t wq_ats_disable_show(struct device *dev, struct device_attribute *attr, char *buf)
{}

static ssize_t wq_ats_disable_store(struct device *dev, struct device_attribute *attr,
				    const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_ats_disable =;

static ssize_t wq_prs_disable_show(struct device *dev, struct device_attribute *attr, char *buf)
{}

static ssize_t wq_prs_disable_store(struct device *dev, struct device_attribute *attr,
				    const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_prs_disable =;

static ssize_t wq_occupancy_show(struct device *dev, struct device_attribute *attr, char *buf)
{}

static struct device_attribute dev_attr_wq_occupancy =;

static ssize_t wq_enqcmds_retries_show(struct device *dev,
				       struct device_attribute *attr, char *buf)
{}

static ssize_t wq_enqcmds_retries_store(struct device *dev, struct device_attribute *attr,
					const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_enqcmds_retries =;

static ssize_t op_cap_show_common(struct device *dev, char *buf, unsigned long *opcap_bmap)
{}

static ssize_t wq_op_config_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static int idxd_verify_supported_opcap(struct idxd_device *idxd, unsigned long *opmask)
{}

static ssize_t wq_op_config_store(struct device *dev, struct device_attribute *attr,
				  const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_op_config =;

static ssize_t wq_driver_name_show(struct device *dev, struct device_attribute *attr, char *buf)
{}

static ssize_t wq_driver_name_store(struct device *dev, struct device_attribute *attr,
				    const char *buf, size_t count)
{}

static struct device_attribute dev_attr_wq_driver_name =;

static struct attribute *idxd_wq_attributes[] =;

/*  A WQ attr is invisible if the feature is not supported in WQCAP. */
#define idxd_wq_attr_invisible(name, cap_field, a, idxd)

static bool idxd_wq_attr_max_batch_size_invisible(struct attribute *attr,
						  struct idxd_device *idxd)
{}

static umode_t idxd_wq_attr_visible(struct kobject *kobj,
				    struct attribute *attr, int n)
{}

static const struct attribute_group idxd_wq_attribute_group =;

static const struct attribute_group *idxd_wq_attribute_groups[] =;

static void idxd_conf_wq_release(struct device *dev)
{}

const struct device_type idxd_wq_device_type =;

/* IDXD device attribs */
static ssize_t version_show(struct device *dev, struct device_attribute *attr,
			    char *buf)
{}
static DEVICE_ATTR_RO(version);

static ssize_t max_work_queues_size_show(struct device *dev,
					 struct device_attribute *attr,
					 char *buf)
{}
static DEVICE_ATTR_RO(max_work_queues_size);

static ssize_t max_groups_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(max_groups);

static ssize_t max_work_queues_show(struct device *dev,
				    struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(max_work_queues);

static ssize_t max_engines_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(max_engines);

static ssize_t numa_node_show(struct device *dev,
			      struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(numa_node);

static ssize_t max_batch_size_show(struct device *dev,
				   struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(max_batch_size);

static ssize_t max_transfer_size_show(struct device *dev,
				      struct device_attribute *attr,
				      char *buf)
{}
static DEVICE_ATTR_RO(max_transfer_size);

static ssize_t op_cap_show(struct device *dev,
			   struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(op_cap);

static ssize_t gen_cap_show(struct device *dev,
			    struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(gen_cap);

static ssize_t configurable_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(configurable);

static ssize_t clients_show(struct device *dev,
			    struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(clients);

static ssize_t pasid_enabled_show(struct device *dev,
				  struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(pasid_enabled);

static ssize_t state_show(struct device *dev,
			  struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(state);

static ssize_t errors_show(struct device *dev,
			   struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(errors);

static ssize_t max_read_buffers_show(struct device *dev,
				     struct device_attribute *attr, char *buf)
{}

static ssize_t max_tokens_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(max_tokens);	/* deprecated */
static DEVICE_ATTR_RO(max_read_buffers);

static ssize_t read_buffer_limit_show(struct device *dev,
				      struct device_attribute *attr, char *buf)
{}

static ssize_t token_limit_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t read_buffer_limit_store(struct device *dev,
				       struct device_attribute *attr,
				       const char *buf, size_t count)
{}

static ssize_t token_limit_store(struct device *dev,
				 struct device_attribute *attr,
				 const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(token_limit);	/* deprecated */
static DEVICE_ATTR_RW(read_buffer_limit);

static ssize_t cdev_major_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(cdev_major);

static ssize_t cmd_status_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}

static ssize_t cmd_status_store(struct device *dev, struct device_attribute *attr,
				const char *buf, size_t count)
{}
static DEVICE_ATTR_RW(cmd_status);

static ssize_t iaa_cap_show(struct device *dev,
			    struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(iaa_cap);

static ssize_t event_log_size_show(struct device *dev,
				   struct device_attribute *attr, char *buf)
{}

static ssize_t event_log_size_store(struct device *dev,
				    struct device_attribute *attr,
				    const char *buf, size_t count)
{}
static DEVICE_ATTR_RW(event_log_size);

static bool idxd_device_attr_max_batch_size_invisible(struct attribute *attr,
						      struct idxd_device *idxd)
{}

static bool idxd_device_attr_read_buffers_invisible(struct attribute *attr,
						    struct idxd_device *idxd)
{}

static bool idxd_device_attr_iaa_cap_invisible(struct attribute *attr,
					       struct idxd_device *idxd)
{}

static bool idxd_device_attr_event_log_size_invisible(struct attribute *attr,
						      struct idxd_device *idxd)
{}

static umode_t idxd_device_attr_visible(struct kobject *kobj,
					struct attribute *attr, int n)
{}

static struct attribute *idxd_device_attributes[] =;

static const struct attribute_group idxd_device_attribute_group =;

static const struct attribute_group *idxd_attribute_groups[] =;

static void idxd_conf_device_release(struct device *dev)
{}

const struct device_type dsa_device_type =;

const struct device_type iax_device_type =;

static int idxd_register_engine_devices(struct idxd_device *idxd)
{}

static int idxd_register_group_devices(struct idxd_device *idxd)
{}

static int idxd_register_wq_devices(struct idxd_device *idxd)
{}

int idxd_register_devices(struct idxd_device *idxd)
{}

void idxd_unregister_devices(struct idxd_device *idxd)
{}

int idxd_register_bus_type(void)
{}

void idxd_unregister_bus_type(void)
{}