mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 20:53:53 +08:00
b95a8a27c3
Switch to the generic VDSO clock mode storage. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> (VDSO parts) Acked-by: Juergen Gross <jgross@suse.com> (Xen parts) Acked-by: Paolo Bonzini <pbonzini@redhat.com> (KVM parts) Link: https://lkml.kernel.org/r/20200207124403.152039903@linutronix.de
25 lines
551 B
C
25 lines
551 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* x86-specific clocksource additions */
|
|
|
|
#ifndef _ASM_X86_CLOCKSOURCE_H
|
|
#define _ASM_X86_CLOCKSOURCE_H
|
|
|
|
#define VDSO_ARCH_CLOCKMODES \
|
|
VDSO_CLOCKMODE_TSC, \
|
|
VDSO_CLOCKMODE_PVCLOCK, \
|
|
VDSO_CLOCKMODE_HVCLOCK
|
|
|
|
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 */
|