#include <linux/slab.h>
#include <linux/hashtable.h>
#include "ptp_private.h"
#define PTP_VCLOCK_CC_SHIFT …
#define PTP_VCLOCK_CC_MULT …
#define PTP_VCLOCK_FADJ_SHIFT …
#define PTP_VCLOCK_FADJ_DENOMINATOR …
#define PTP_VCLOCK_REFRESH_INTERVAL …
static DEFINE_SPINLOCK(vclock_hash_lock);
static DEFINE_READ_MOSTLY_HASHTABLE(vclock_hash, 8);
static void ptp_vclock_hash_add(struct ptp_vclock *vclock)
{ … }
static void ptp_vclock_hash_del(struct ptp_vclock *vclock)
{ … }
static int ptp_vclock_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
{ … }
static int ptp_vclock_adjtime(struct ptp_clock_info *ptp, s64 delta)
{ … }
static int ptp_vclock_gettime(struct ptp_clock_info *ptp,
struct timespec64 *ts)
{ … }
static int ptp_vclock_gettimex(struct ptp_clock_info *ptp,
struct timespec64 *ts,
struct ptp_system_timestamp *sts)
{ … }
static int ptp_vclock_settime(struct ptp_clock_info *ptp,
const struct timespec64 *ts)
{ … }
static int ptp_vclock_getcrosststamp(struct ptp_clock_info *ptp,
struct system_device_crosststamp *xtstamp)
{ … }
static long ptp_vclock_refresh(struct ptp_clock_info *ptp)
{ … }
static const struct ptp_clock_info ptp_vclock_info = …;
static u64 ptp_vclock_read(const struct cyclecounter *cc)
{ … }
static const struct cyclecounter ptp_vclock_cc = …;
struct ptp_vclock *ptp_vclock_register(struct ptp_clock *pclock)
{ … }
void ptp_vclock_unregister(struct ptp_vclock *vclock)
{ … }
#if IS_BUILTIN(CONFIG_PTP_1588_CLOCK)
int ptp_get_vclocks_index(int pclock_index, int **vclock_index)
{ … }
EXPORT_SYMBOL(…);
ktime_t ptp_convert_timestamp(const ktime_t *hwtstamp, int vclock_index)
{ … }
EXPORT_SYMBOL(…);
#endif