diff options
| author | Thomas Gleixner <[email protected]> | 2018-09-17 14:45:34 +0200 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2018-10-04 23:00:24 +0200 |
| commit | d67f34c19a679436dd2963b588015e119279e7a8 (patch) | |
| tree | 273a0a7201cce3643febbbf5296b86b56f8cde76 /kernel/time | |
| parent | 02e425668f5c9deb42787d10001a3b605993ad15 (diff) | |
clocksource: Provide clocksource_arch_init()
Architectures have extra archdata in the clocksource, e.g. for VDSO
support. There are no sanity checks or general initializations for this
available. Add support for that.
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Andy Lutomirski <[email protected]>
Acked-by: John Stultz <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Matt Rickard <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Florian Weimer <[email protected]>
Cc: "K. Y. Srinivasan" <[email protected]>
Cc: Vitaly Kuznetsov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Paolo Bonzini <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Juergen Gross <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'kernel/time')
| -rw-r--r-- | kernel/time/Kconfig | 4 | ||||
| -rw-r--r-- | kernel/time/clocksource.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index 78eabc41eaa6..58b981f4bb5d 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig @@ -12,6 +12,10 @@ config CLOCKSOURCE_WATCHDOG config ARCH_CLOCKSOURCE_DATA bool +# Architecture has extra clocksource init called from registration +config ARCH_CLOCKSOURCE_INIT + bool + # Clocksources require validation of the clocksource against the last # cycle update - x86/TSC misfeature config CLOCKSOURCE_VALIDATE_LAST_CYCLE diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 0e6e97a01942..ffe081623aec 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -937,6 +937,8 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) { unsigned long flags; + clocksource_arch_init(cs); + /* Initialize mult/shift and max_idle_ns */ __clocksource_update_freq_scale(cs, scale, freq); |