1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21965aae3SH. Peter Anvin #ifndef _ASM_X86_VGTOD_H 31965aae3SH. Peter Anvin #define _ASM_X86_VGTOD_H 4bb898558SAl Viro 57c03156fSStefani Seibold #include <linux/compiler.h> 67ac87074SVincenzo Frascino #include <asm/clocksource.h> 77ac87074SVincenzo Frascino #include <vdso/datapage.h> 87ac87074SVincenzo Frascino #include <vdso/helpers.h> 9bb898558SAl Viro 1049116f20SThomas Gleixner #include <uapi/linux/time.h> 1149116f20SThomas Gleixner 127c03156fSStefani Seibold #ifdef BUILD_VDSO32_64 137c03156fSStefani Seibold typedef u64 gtod_long_t; 147c03156fSStefani Seibold #else 157c03156fSStefani Seibold typedef unsigned long gtod_long_t; 167c03156fSStefani Seibold #endif 1749116f20SThomas Gleixner 18bd902c53SAndy Lutomirski extern int vclocks_used; 19bd902c53SAndy Lutomirski static inline bool vclock_was_used(int vclock) 20bd902c53SAndy Lutomirski { 21bd902c53SAndy Lutomirski return READ_ONCE(vclocks_used) & (1 << vclock); 22bd902c53SAndy Lutomirski } 23bd902c53SAndy Lutomirski 241965aae3SH. Peter Anvin #endif /* _ASM_X86_VGTOD_H */ 25