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

1 /* SPDX-License-Identifier: GPL-2.0 */
35 * struct clocksource - hardware abstraction for a free running counter
36 * Provides mostly state-free accessors to the underlying hardware.
48 * @archdata: Optional arch-specific data
57 * 1-99: Unfit for real use
59 * 100-199: Base level usability.
61 * 200-299: Good.
63 * 300-399: Desired.
65 * 400-499: Perfect
66 * The ideal clocksource. A must-use where
97 u64 (*read)(struct clocksource *cs);
115 int (*enable)(struct clocksource *cs);
116 void (*disable)(struct clocksource *cs);
117 void (*suspend)(struct clocksource *cs);
118 void (*resume)(struct clocksource *cs);
119 void (*mark_unstable)(struct clocksource *cs);
120 void (*tick_stable)(struct clocksource *cs);
145 #define CLOCKSOURCE_MASK(bits) GENMASK_ULL((bits) - 1, 0)
150 * mult/2^shift = ns/cyc in clocksource_freq2mult()
151 * mult = ns/cyc * 2^shift in clocksource_freq2mult()
152 * mult = from/freq * 2^shift in clocksource_freq2mult()
153 * mult = from * 2^shift / freq in clocksource_freq2mult()
158 tmp += freq/2; /* round for do_div */ in clocksource_freq2mult()
165 * clocksource_khz2mult - calculates mult from khz and shift
178 * clocksource_hz2mult - calculates mult from hz and shift
192 * clocksource_cyc2ns - converts clocksource cycles to nanoseconds
202 * XXX - This could use some mult_lxl_ll() asm optimization
212 extern void clocksource_change_rating(struct clocksource *cs, int rating);
216 extern void clocksource_mark_unstable(struct clocksource *cs);
218 clocksource_start_suspend_timing(struct clocksource *cs, u64 start_cycles);
219 extern u64 clocksource_stop_suspend_timing(struct clocksource *cs, u64 now);
231 __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq);
233 __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq);
239 static inline int __clocksource_register(struct clocksource *cs) in __clocksource_register() argument
241 return __clocksource_register_scale(cs, 1, 0); in __clocksource_register()
244 static inline int clocksource_register_hz(struct clocksource *cs, u32 hz) in clocksource_register_hz() argument
246 return __clocksource_register_scale(cs, 1, hz); in clocksource_register_hz()
249 static inline int clocksource_register_khz(struct clocksource *cs, u32 khz) in clocksource_register_khz() argument
251 return __clocksource_register_scale(cs, 1000, khz); in clocksource_register_khz()
254 static inline void __clocksource_update_freq_hz(struct clocksource *cs, u32 hz) in __clocksource_update_freq_hz() argument
256 __clocksource_update_freq_scale(cs, 1, hz); in __clocksource_update_freq_hz()
259 static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz) in __clocksource_update_freq_khz() argument
261 __clocksource_update_freq_scale(cs, 1000, khz); in __clocksource_update_freq_khz()
265 extern void clocksource_arch_init(struct clocksource *cs);
267 static inline void clocksource_arch_init(struct clocksource *cs) { } in clocksource_arch_init() argument
295 void clocksource_verify_percpu(struct clocksource *cs);