summaryrefslogtreecommitdiff
path: root/include/linux/ptp_kvm.h
diff options
context:
space:
mode:
authorJianyong Wu <jianyong.wu@arm.com>2020-12-09 14:09:26 +0800
committerMarc Zyngier <maz@kernel.org>2021-04-07 16:33:07 +0100
commita8cf291bdac5d415eadb55e79df1fca8c3f0dfef (patch)
treebedcf33fa4a90635e0d34c3becd2a701cfb4fb00 /include/linux/ptp_kvm.h
parent923961a7ff2e94d3d824d9ea7047178a5a123245 (diff)
ptp: Reorganize ptp_kvm.c to make it arch-independent
Currently, the ptp_kvm module contains a lot of x86-specific code. Let's move this code into a new arch-specific file in the same directory, and rename the arch-independent file to ptp_kvm_common.c. Acked-by: Richard Cochran <richardcochran@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Jianyong Wu <jianyong.wu@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20201209060932.212364-4-jianyong.wu@arm.com
Diffstat (limited to 'include/linux/ptp_kvm.h')
-rw-r--r--include/linux/ptp_kvm.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/ptp_kvm.h b/include/linux/ptp_kvm.h
new file mode 100644
index 000000000000..f960a719f0d5
--- /dev/null
+++ b/include/linux/ptp_kvm.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Virtual PTP 1588 clock for use with KVM guests
+ *
+ * Copyright (C) 2017 Red Hat Inc.
+ */
+
+#ifndef _PTP_KVM_H_
+#define _PTP_KVM_H_
+
+struct timespec64;
+struct clocksource;
+
+int kvm_arch_ptp_init(void);
+int kvm_arch_ptp_get_clock(struct timespec64 *ts);
+int kvm_arch_ptp_get_crosststamp(u64 *cycle,
+ struct timespec64 *tspec, struct clocksource **cs);
+
+#endif /* _PTP_KVM_H_ */