diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-02-07 13:38:54 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-02-17 14:40:22 +0100 |
commit | eec399dd862762b9594df3659f15839a4e12f17a (patch) | |
tree | 2ad42d36c099f2ec9b7eceff537281d0bad7c690 /arch/x86/include/asm/vgtod.h | |
parent | clocksource: Cleanup struct clocksource and documentation (diff) | |
download | linux-eec399dd862762b9594df3659f15839a4e12f17a.tar.xz linux-eec399dd862762b9594df3659f15839a4e12f17a.zip |
x86/vdso: Move VDSO clocksource state tracking to callback
All architectures which use the generic VDSO code have their own storage
for the VDSO clock mode. That's pointless and just requires duplicate code.
X86 abuses the function which retrieves the architecture specific clock
mode storage to mark the clocksource as used in the VDSO. That's silly
because this is invoked on every tick when the VDSO data is updated.
Move this functionality to the clocksource::enable() callback so it gets
invoked once when the clocksource is installed. This allows to make the
clock mode storage generic.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Michael Kelley <mikelley@microsoft.com> (Hyper-V parts)
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> (VDSO parts)
Acked-by: Juergen Gross <jgross@suse.com> (Xen parts)
Link: https://lkml.kernel.org/r/20200207124402.934519777@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/vgtod.h')
-rw-r--r-- | arch/x86/include/asm/vgtod.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h index a2638c6124ed..fc8e4cd342cc 100644 --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h @@ -15,10 +15,4 @@ typedef u64 gtod_long_t; typedef unsigned long gtod_long_t; #endif -extern int vclocks_used; -static inline bool vclock_was_used(int vclock) -{ - return READ_ONCE(vclocks_used) & (1 << vclock); -} - #endif /* _ASM_X86_VGTOD_H */ |