0001
0002
0003
0004
0005
0006
0007
0008 #include <linux/arm-smccc.h>
0009 #include <linux/ptp_kvm.h>
0010
0011 #include <asm/arch_timer.h>
0012 #include <asm/hypervisor.h>
0013
0014 int kvm_arch_ptp_init(void)
0015 {
0016 int ret;
0017
0018 ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP);
0019 if (ret <= 0)
0020 return -EOPNOTSUPP;
0021
0022 return 0;
0023 }
0024
0025 int kvm_arch_ptp_get_clock(struct timespec64 *ts)
0026 {
0027 return kvm_arch_ptp_get_crosststamp(NULL, ts, NULL);
0028 }