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.
Showing the changes to kernel/time (2 of 3 files). Show all
Unified · Split
| @@ -12,6 +12,10 @@ config CLOCKSOURCE_WATCHDOG · 11 unmodified lines | ||
| 12 | 12 | config ARCH_CLOCKSOURCE_DATA |
| 13 | 13 | bool |
| 14 | 14 | |
| 15 | +# Architecture has extra clocksource init called from registration | |
| 16 | +config ARCH_CLOCKSOURCE_INIT | |
| 17 | + bool | |
| 18 | + | |
| 15 | 19 | # Clocksources require validation of the clocksource against the last |
| 16 | 20 | # cycle update - x86/TSC misfeature |
| 17 | 21 | config CLOCKSOURCE_VALIDATE_LAST_CYCLE |
| @@ -937,6 +937,8 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) · 936 unmodified lines | ||
| 937 | 937 | { |
| 938 | 938 | unsigned long flags; |
| 939 | 939 | |
| 940 | + clocksource_arch_init(cs); | |
| 941 | + | |
| 940 | 942 | /* Initialize mult/shift and max_idle_ns */ |
| 941 | 943 | __clocksource_update_freq_scale(cs, scale, freq); |
| 942 | 944 | |