Lines Matching +full:cs +full:- +full:2

1 /* SPDX-License-Identifier: GPL-2.0 */
36 * struct clocksource - hardware abstraction for a free running counter
37 * Provides mostly state-free accessors to the underlying hardware.
49 * @archdata: Optional arch-specific data
59 * 1-99: Unfit for real use
61 * 100-199: Base level usability.
63 * 200-299: Good.
65 * 300-399: Desired.
67 * 400-499: Perfect
68 * The ideal clocksource. A must-use where
101 u64 (*read)(struct clocksource *cs);
121 int (*enable)(struct clocksource *cs);
122 void (*disable)(struct clocksource *cs);
123 void (*suspend)(struct clocksource *cs);
124 void (*resume)(struct clocksource *cs);
125 void (*mark_unstable)(struct clocksource *cs);
126 void (*tick_stable)(struct clocksource *cs);
151 #define CLOCKSOURCE_MASK(bits) GENMASK_ULL((bits) - 1, 0)
156 * mult/2^shift = ns/cyc in clocksource_freq2mult()
157 * mult = ns/cyc * 2^shift in clocksource_freq2mult()
158 * mult = from/freq * 2^shift in clocksource_freq2mult()
159 * mult = from * 2^shift / freq in clocksource_freq2mult()
164 tmp += freq/2; /* round for do_div */ in clocksource_freq2mult()
171 * clocksource_khz2mult - calculates mult from khz and shift
184 * clocksource_hz2mult - calculates mult from hz and shift
198 * clocksource_cyc2ns - converts clocksource cycles to nanoseconds
208 * XXX - This could use some mult_lxl_ll() asm optimization
218 extern void clocksource_change_rating(struct clocksource *cs, int rating);
222 extern void clocksource_mark_unstable(struct clocksource *cs);
224 clocksource_start_suspend_timing(struct clocksource *cs, u64 start_cycles);
225 extern u64 clocksource_stop_suspend_timing(struct clocksource *cs, u64 now);
237 __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq);
239 __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq);
245 static inline int __clocksource_register(struct clocksource *cs) in __clocksource_register() argument
247 return __clocksource_register_scale(cs, 1, 0); in __clocksource_register()
250 static inline int clocksource_register_hz(struct clocksource *cs, u32 hz) in clocksource_register_hz() argument
252 return __clocksource_register_scale(cs, 1, hz); in clocksource_register_hz()
255 static inline int clocksource_register_khz(struct clocksource *cs, u32 khz) in clocksource_register_khz() argument
257 return __clocksource_register_scale(cs, 1000, khz); in clocksource_register_khz()
260 static inline void __clocksource_update_freq_hz(struct clocksource *cs, u32 hz) in __clocksource_update_freq_hz() argument
262 __clocksource_update_freq_scale(cs, 1, hz); in __clocksource_update_freq_hz()
265 static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz) in __clocksource_update_freq_khz() argument
267 __clocksource_update_freq_scale(cs, 1000, khz); in __clocksource_update_freq_khz()
271 extern void clocksource_arch_init(struct clocksource *cs);
273 static inline void clocksource_arch_init(struct clocksource *cs) { } in clocksource_arch_init() argument
310 return (ilog2(num_online_cpus()) / 2) + 1; in clocksource_get_max_watchdog_retry()
313 void clocksource_verify_percpu(struct clocksource *cs);
316 * struct clocksource_base - hardware abstraction for clock on which a clocksource