• Home
  • Raw
  • Download

Lines Matching refs:clock

99 		.clock		= &dummy_clock,			\
193 struct clocksource *clock = READ_ONCE(tkr->clock); in tk_clock_read() local
195 return clock->read(clock); in tk_clock_read()
204 u64 max_cycles = tk->tkr_mono.clock->max_cycles; in timekeeping_check_update()
205 const char *name = tk->tkr_mono.clock->name; in timekeeping_check_update()
258 max = tkr->clock->max_cycles; in timekeeping_get_delta()
275 delta = tkr->clock->max_cycles; in timekeeping_get_delta()
309 static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock) in tk_setup_internals() argument
316 old_clock = tk->tkr_mono.clock; in tk_setup_internals()
317 tk->tkr_mono.clock = clock; in tk_setup_internals()
318 tk->tkr_mono.mask = clock->mask; in tk_setup_internals()
321 tk->tkr_raw.clock = clock; in tk_setup_internals()
322 tk->tkr_raw.mask = clock->mask; in tk_setup_internals()
327 tmp <<= clock->shift; in tk_setup_internals()
329 tmp += clock->mult/2; in tk_setup_internals()
330 do_div(tmp, clock->mult); in tk_setup_internals()
338 tk->xtime_interval = interval * clock->mult; in tk_setup_internals()
340 tk->raw_interval = interval * clock->mult; in tk_setup_internals()
344 int shift_change = clock->shift - old_clock->shift; in tk_setup_internals()
354 tk->tkr_mono.shift = clock->shift; in tk_setup_internals()
355 tk->tkr_raw.shift = clock->shift; in tk_setup_internals()
358 tk->ntp_error_shift = NTP_SCALE_SHIFT - clock->shift; in tk_setup_internals()
366 tk->tkr_mono.mult = clock->mult; in tk_setup_internals()
367 tk->tkr_raw.mult = clock->mult; in tk_setup_internals()
658 tkr_dummy.clock = &dummy_clock; in halt_fast_timekeeper()
664 tkr_dummy.clock = &dummy_clock; in halt_fast_timekeeper()
1072 systime_snapshot->cs_id = tk->tkr_mono.clock->id; in ktime_get_snapshot()
1248 if (tk->tkr_mono.clock != system_counterval.cs) in get_device_system_crosststamp()
1483 old = tk->tkr_mono.clock; in change_clocksource()
1509 int timekeeping_notify(struct clocksource *clock) in timekeeping_notify() argument
1513 if (tk->tkr_mono.clock == clock) in timekeeping_notify()
1515 stop_machine(change_clocksource, clock, NULL); in timekeeping_notify()
1517 return tk->tkr_mono.clock == clock ? 0 : -1; in timekeeping_notify()
1557 ret = tk->tkr_mono.clock->flags & CLOCK_SOURCE_VALID_FOR_HRES; in timekeeping_valid_for_hres()
1576 ret = tk->tkr_mono.clock->max_idle_ns; in timekeeping_max_deferment()
1645 struct clocksource *clock; in timekeeping_init() local
1670 clock = clocksource_default_clock(); in timekeeping_init()
1671 if (clock->enable) in timekeeping_init()
1672 clock->enable(clock); in timekeeping_init()
1673 tk_setup_internals(tk, clock); in timekeeping_init()
1789 struct clocksource *clock = tk->tkr_mono.clock; in timekeeping_resume() local
1816 nsec = clocksource_stop_suspend_timing(clock, cycle_now); in timekeeping_resume()
1879 curr_clock = tk->tkr_mono.clock; in timekeeping_suspend()
2038 if (unlikely(tk->tkr_mono.clock->maxadj && in timekeeping_adjust()
2039 (abs(tk->tkr_mono.mult - tk->tkr_mono.clock->mult) in timekeeping_adjust()
2040 > tk->tkr_mono.clock->maxadj))) { in timekeeping_adjust()
2043 tk->tkr_mono.clock->name, (long)tk->tkr_mono.mult, in timekeeping_adjust()
2044 (long)tk->tkr_mono.clock->mult + tk->tkr_mono.clock->maxadj); in timekeeping_adjust()
2420 struct clocksource *clock = READ_ONCE(tkr->clock); in random_get_entropy_fallback() local
2422 if (unlikely(timekeeping_suspended || !clock)) in random_get_entropy_fallback()
2424 return clock->read(clock); in random_get_entropy_fallback()