linux/drivers/nvdimm/virtio_pmem.c

// SPDX-License-Identifier: GPL-2.0
/*
 * virtio_pmem.c: Virtio pmem Driver
 *
 * Discovers persistent memory range information
 * from host and registers the virtual pmem device
 * with libnvdimm core.
 */
#include "virtio_pmem.h"
#include "nd.h"

static struct virtio_device_id id_table[] =;

 /* Initialize virt queue */
static int init_vq(struct virtio_pmem *vpmem)
{
	/* single vq */
	vpmem->req_vq = virtio_find_single_vq(vpmem->vdev,
					virtio_pmem_host_ack, "flush_queue");
	if (IS_ERR(vpmem->req_vq))
		return PTR_ERR(vpmem->req_vq);

	spin_lock_init(&vpmem->pmem_lock);
	INIT_LIST_HEAD(&vpmem->req_list);

	return 0;
};

static int virtio_pmem_validate(struct virtio_device *vdev)
{}

static int virtio_pmem_probe(struct virtio_device *vdev)
{}

static void virtio_pmem_remove(struct virtio_device *vdev)
{}

static unsigned int features[] =;

static struct virtio_driver virtio_pmem_driver =;

module_virtio_driver();
MODULE_DEVICE_TABLE(virtio, id_table);
MODULE_DESCRIPTION();
MODULE_LICENSE();