linux/drivers/ptp/ptp_kvm_common.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Virtual PTP 1588 clock for use with KVM guests
 *
 * Copyright (C) 2017 Red Hat Inc.
 */
#include <linux/device.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/ptp_kvm.h>
#include <uapi/linux/kvm_para.h>
#include <asm/kvm_para.h>
#include <uapi/asm/kvm_para.h>

#include <linux/ptp_clock_kernel.h>

struct kvm_ptp_clock {};

static DEFINE_SPINLOCK(kvm_ptp_lock);

static int ptp_kvm_get_time_fn(ktime_t *device_time,
			       struct system_counterval_t *system_counter,
			       void *ctx)
{}

static int ptp_kvm_getcrosststamp(struct ptp_clock_info *ptp,
				  struct system_device_crosststamp *xtstamp)
{}

/*
 * PTP clock operations
 */

static int ptp_kvm_adjfine(struct ptp_clock_info *ptp, long delta)
{}

static int ptp_kvm_adjtime(struct ptp_clock_info *ptp, s64 delta)
{}

static int ptp_kvm_settime(struct ptp_clock_info *ptp,
			   const struct timespec64 *ts)
{}

static int ptp_kvm_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
{}

static int ptp_kvm_enable(struct ptp_clock_info *ptp,
			  struct ptp_clock_request *rq, int on)
{}

static const struct ptp_clock_info ptp_kvm_caps =;

/* module operations */

static struct kvm_ptp_clock kvm_ptp_clock;

static void __exit ptp_kvm_exit(void)
{}

static int __init ptp_kvm_init(void)
{}

module_init();
module_exit(ptp_kvm_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();