xref: /linux/arch/arm64/kvm/hyp/include/nvhe/clock.h (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ARM64_KVM_HYP_NVHE_CLOCK_H
3 #define __ARM64_KVM_HYP_NVHE_CLOCK_H
4 #include <linux/types.h>
5 
6 #include <asm/kvm_hyp.h>
7 
8 #ifdef CONFIG_NVHE_EL2_TRACING
9 void trace_clock_update(u32 mult, u32 shift, u64 epoch_ns, u64 epoch_cyc);
10 u64 trace_clock(void);
11 #else
12 static inline void
13 trace_clock_update(u32 mult, u32 shift, u64 epoch_ns, u64 epoch_cyc) { }
14 static inline u64 trace_clock(void) { return 0; }
15 #endif
16 #endif
17