linux/drivers/cxl/mem.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/pci.h>

#include "cxlmem.h"
#include "cxlpci.h"

/**
 * DOC: cxl mem
 *
 * CXL memory endpoint devices and switches are CXL capable devices that are
 * participating in CXL.mem protocol. Their functionality builds on top of the
 * CXL.io protocol that allows enumerating and configuring components via
 * standard PCI mechanisms.
 *
 * The cxl_mem driver owns kicking off the enumeration of this CXL.mem
 * capability. With the detection of a CXL capable endpoint, the driver will
 * walk up to find the platform specific port it is connected to, and determine
 * if there are intervening switches in the path. If there are switches, a
 * secondary action is to enumerate those (implemented in cxl_core). Finally the
 * cxl_mem driver adds the device it is bound to as a CXL endpoint-port for use
 * in higher level operations.
 */

static void enable_suspend(void *data)
{}

static void remove_debugfs(void *dentry)
{}

static int cxl_mem_dpa_show(struct seq_file *file, void *data)
{}

static int devm_cxl_add_endpoint(struct device *host, struct cxl_memdev *cxlmd,
				 struct cxl_dport *parent_dport)
{}

static int cxl_debugfs_poison_inject(void *data, u64 dpa)
{}

DEFINE_DEBUGFS_ATTRIBUTE();

static int cxl_debugfs_poison_clear(void *data, u64 dpa)
{}

DEFINE_DEBUGFS_ATTRIBUTE();

static int cxl_mem_probe(struct device *dev)
{}

static ssize_t trigger_poison_list_store(struct device *dev,
					 struct device_attribute *attr,
					 const char *buf, size_t len)
{}
static DEVICE_ATTR_WO(trigger_poison_list);

static umode_t cxl_mem_visible(struct kobject *kobj, struct attribute *a, int n)
{}

static struct attribute *cxl_mem_attrs[] =;

static struct attribute_group cxl_mem_group =;

__ATTRIBUTE_GROUPS();

static struct cxl_driver cxl_mem_driver =;

module_cxl_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_IMPORT_NS();
MODULE_ALIAS_CXL();
/*
 * create_endpoint() wants to validate port driver attach immediately after
 * endpoint registration.
 */
MODULE_SOFTDEP();