summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/clocksource.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/clocksource.h')
-rw-r--r--arch/x86/include/asm/clocksource.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/include/asm/clocksource.h b/arch/x86/include/asm/clocksource.h
index dc4cfc888d6d..2450d6e02a5d 100644
--- a/arch/x86/include/asm/clocksource.h
+++ b/arch/x86/include/asm/clocksource.h
@@ -14,4 +14,16 @@ struct arch_clocksource_data {
int vclock_mode;
};
+extern unsigned int vclocks_used;
+
+static inline bool vclock_was_used(int vclock)
+{
+ return READ_ONCE(vclocks_used) & (1U << vclock);
+}
+
+static inline void vclocks_set_used(unsigned int which)
+{
+ WRITE_ONCE(vclocks_used, READ_ONCE(vclocks_used) | (1 << which));
+}
+
#endif /* _ASM_X86_CLOCKSOURCE_H */