linux/drivers/vfio/platform/vfio_platform_private.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2013 - Virtual Open Systems
 * Author: Antonios Motakis <[email protected]>
 */

#ifndef VFIO_PLATFORM_PRIVATE_H
#define VFIO_PLATFORM_PRIVATE_H

#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/vfio.h>

#define VFIO_PLATFORM_OFFSET_SHIFT
#define VFIO_PLATFORM_OFFSET_MASK

#define VFIO_PLATFORM_OFFSET_TO_INDEX(off)

#define VFIO_PLATFORM_INDEX_TO_OFFSET(index)

struct vfio_platform_irq {};

struct vfio_platform_region {};

struct vfio_platform_device {};

vfio_platform_reset_fn_t;

struct vfio_platform_reset_node {};

int vfio_platform_init_common(struct vfio_platform_device *vdev);
void vfio_platform_release_common(struct vfio_platform_device *vdev);

int vfio_platform_open_device(struct vfio_device *core_vdev);
void vfio_platform_close_device(struct vfio_device *core_vdev);
long vfio_platform_ioctl(struct vfio_device *core_vdev,
			 unsigned int cmd, unsigned long arg);
ssize_t vfio_platform_read(struct vfio_device *core_vdev,
			   char __user *buf, size_t count,
			   loff_t *ppos);
ssize_t vfio_platform_write(struct vfio_device *core_vdev,
			    const char __user *buf,
			    size_t count, loff_t *ppos);
int vfio_platform_mmap(struct vfio_device *core_vdev,
		       struct vm_area_struct *vma);

int vfio_platform_irq_init(struct vfio_platform_device *vdev);
void vfio_platform_irq_cleanup(struct vfio_platform_device *vdev);

int vfio_platform_set_irqs_ioctl(struct vfio_platform_device *vdev,
				 uint32_t flags, unsigned index,
				 unsigned start, unsigned count, void *data);

void __vfio_platform_register_reset(struct vfio_platform_reset_node *n);
void vfio_platform_unregister_reset(const char *compat,
				    vfio_platform_reset_fn_t fn);
#define vfio_platform_register_reset(__compat, __reset)

#define module_vfio_reset_handler(compat, reset)

#endif /* VFIO_PLATFORM_PRIVATE_H */