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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user