diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-02-07 13:38:55 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-02-17 14:40:23 +0100 |
commit | 5d51bee725cc1497352d6b0b604e42a90c680540 (patch) | |
tree | 739d7486c2bd860a038c8b8ef2d05a75cfd14ede /include/linux | |
parent | eec399dd862762b9594df3659f15839a4e12f17a (diff) | |
download | linux-stable-5d51bee725cc1497352d6b0b604e42a90c680540.tar.gz linux-stable-5d51bee725cc1497352d6b0b604e42a90c680540.tar.bz2 linux-stable-5d51bee725cc1497352d6b0b604e42a90c680540.zip |
clocksource: Add common vdso clock mode storage
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.
Provide generic storage for it. The new Kconfig symbol is intermediate and
will be removed once all architectures are converted over.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lkml.kernel.org/r/20200207124403.028046322@linutronix.de
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clocksource.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 2c4574b517d2..6d5ed1b4d24d 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -23,10 +23,19 @@ struct clocksource; struct module; -#ifdef CONFIG_ARCH_CLOCKSOURCE_DATA +#if defined(CONFIG_ARCH_CLOCKSOURCE_DATA) || \ + defined(CONFIG_GENERIC_VDSO_CLOCK_MODE) #include <asm/clocksource.h> #endif +enum vdso_clock_mode { + VDSO_CLOCKMODE_NONE, +#ifdef CONFIG_GENERIC_VDSO_CLOCK_MODE + VDSO_ARCH_CLOCKMODES, +#endif + VDSO_CLOCKMODE_MAX, +}; + /** * struct clocksource - hardware abstraction for a free running counter * Provides mostly state-free accessors to the underlying hardware. @@ -97,6 +106,7 @@ struct clocksource { const char *name; struct list_head list; int rating; + enum vdso_clock_mode vdso_clock_mode; unsigned long flags; int (*enable)(struct clocksource *cs); |