xref: /openbmc/linux/arch/x86/include/asm/vgtod.h (revision 388f6966)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_VGTOD_H
3 #define _ASM_X86_VGTOD_H
4 
5 #include <linux/compiler.h>
6 #include <asm/clocksource.h>
7 #include <vdso/datapage.h>
8 #include <vdso/helpers.h>
9 
10 #include <uapi/linux/time.h>
11 
12 #ifdef BUILD_VDSO32_64
13 typedef u64 gtod_long_t;
14 #else
15 typedef unsigned long gtod_long_t;
16 #endif
17 
18 extern int vclocks_used;
19 static inline bool vclock_was_used(int vclock)
20 {
21 	return READ_ONCE(vclocks_used) & (1 << vclock);
22 }
23 
24 #endif /* _ASM_X86_VGTOD_H */
25