Linux 5.7.6
[linux/fpc-iii.git] / arch / x86 / include / asm / clocksource.h
blobdc9dc7b3911a3ba5c21f8c4916cc8a314a77d8c0
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* x86-specific clocksource additions */
4 #ifndef _ASM_X86_CLOCKSOURCE_H
5 #define _ASM_X86_CLOCKSOURCE_H
7 #include <asm/vdso/clocksource.h>
9 extern unsigned int vclocks_used;
11 static inline bool vclock_was_used(int vclock)
13 return READ_ONCE(vclocks_used) & (1U << vclock);
16 static inline void vclocks_set_used(unsigned int which)
18 WRITE_ONCE(vclocks_used, READ_ONCE(vclocks_used) | (1 << which));
21 #endif /* _ASM_X86_CLOCKSOURCE_H */