Lines Matching refs:tk_core
56 static struct tk_data tk_core; variable
120 raw_spin_lock_irqsave(&tk_core.lock, flags); in timekeeper_lock_irqsave()
126 raw_spin_unlock_irqrestore(&tk_core.lock, flags); in timekeeper_unlock_irqrestore()
490 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_boot_fast_ns()
507 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_tai_fast_ns()
576 struct timekeeper *tk = &tk_core.timekeeper; in pvclock_gtod_register_notifier()
579 guard(raw_spinlock_irqsave)(&tk_core.lock); in pvclock_gtod_register_notifier()
594 guard(raw_spinlock_irqsave)(&tk_core.lock); in pvclock_gtod_unregister_notifier()
666 struct timekeeper *tk = &tk_core.shadow_timekeeper; in timekeeping_update_from_shadow()
747 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_real_ts64()
754 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_real_ts64()
759 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_real_ts64()
768 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get()
776 seq = read_seqcount_begin(&tk_core.seq); in ktime_get()
780 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get()
788 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_resolution_ns()
795 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_resolution_ns()
797 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_resolution_ns()
804 [TK_OFFS_REAL] = &tk_core.timekeeper.offs_real,
805 [TK_OFFS_BOOT] = &tk_core.timekeeper.offs_boot,
806 [TK_OFFS_TAI] = &tk_core.timekeeper.offs_tai,
811 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_with_offset()
819 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_with_offset()
823 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_with_offset()
832 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_coarse_with_offset()
840 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_coarse_with_offset()
844 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_coarse_with_offset()
870 seq = read_seqcount_begin(&tk_core.seq); in ktime_mono_to_any()
872 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_mono_to_any()
883 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_raw()
889 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_raw()
893 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_raw()
909 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_ts64()
917 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_ts64()
922 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_ts64()
941 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_seconds()
960 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_real_seconds()
968 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_real_seconds()
971 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_real_seconds()
984 struct timekeeper *tk = &tk_core.timekeeper; in __ktime_get_real_seconds()
995 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_snapshot()
1007 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_snapshot()
1013 tk_core.timekeeper.offs_real); in ktime_get_snapshot()
1015 tk_core.timekeeper.offs_boot); in ktime_get_snapshot()
1019 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_snapshot()
1068 struct timekeeper *tk = &tk_core.timekeeper; in adjust_historical_crosststamp()
1152 struct clocksource *cs = tk_core.timekeeper.tkr_mono.clock; in convert_base_to_cs()
1180 struct clocksource *cs = tk_core.timekeeper.tkr_mono.clock; in convert_cs_to_base()
1199 struct tk_read_base *tkr = &tk_core.timekeeper.tkr_mono; in convert_ns_to_cs()
1220 struct timekeeper *tk = &tk_core.timekeeper; in ktime_real_to_base_clock()
1225 seq = read_seqcount_begin(&tk_core.seq); in ktime_real_to_base_clock()
1234 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_real_to_base_clock()
1260 struct timekeeper *tk = &tk_core.timekeeper; in get_device_system_crosststamp()
1271 seq = read_seqcount_begin(&tk_core.seq); in get_device_system_crosststamp()
1306 tk_core.timekeeper.offs_real); in get_device_system_crosststamp()
1311 } while (read_seqcount_retry(&tk_core.seq, seq)); in get_device_system_crosststamp()
1369 struct clocksource_base *base = READ_ONCE(tk_core.timekeeper.tkr_mono.clock->base); in timekeeping_clocksource_has_base()
1388 scoped_guard (raw_spinlock_irqsave, &tk_core.lock) { in do_settimeofday64()
1389 struct timekeeper *tks = &tk_core.shadow_timekeeper; in do_settimeofday64()
1397 timekeeping_restore_shadow(&tk_core); in do_settimeofday64()
1403 timekeeping_update_from_shadow(&tk_core, TK_UPDATE_ALL); in do_settimeofday64()
1426 scoped_guard (raw_spinlock_irqsave, &tk_core.lock) { in timekeeping_inject_offset()
1427 struct timekeeper *tks = &tk_core.shadow_timekeeper; in timekeeping_inject_offset()
1436 timekeeping_restore_shadow(&tk_core); in timekeeping_inject_offset()
1442 timekeeping_update_from_shadow(&tk_core, TK_UPDATE_ALL); in timekeeping_inject_offset()
1516 scoped_guard (raw_spinlock_irqsave, &tk_core.lock) { in change_clocksource()
1517 struct timekeeper *tks = &tk_core.shadow_timekeeper; in change_clocksource()
1522 timekeeping_update_from_shadow(&tk_core, TK_UPDATE_ALL); in change_clocksource()
1543 struct timekeeper *tk = &tk_core.timekeeper; in timekeeping_notify()
1560 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_raw_ts64()
1565 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_raw_ts64()
1569 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_raw_ts64()
1582 struct timekeeper *tk = &tk_core.timekeeper; in timekeeping_valid_for_hres()
1587 seq = read_seqcount_begin(&tk_core.seq); in timekeeping_valid_for_hres()
1591 } while (read_seqcount_retry(&tk_core.seq, seq)); in timekeeping_valid_for_hres()
1601 struct timekeeper *tk = &tk_core.timekeeper; in timekeeping_max_deferment()
1606 seq = read_seqcount_begin(&tk_core.seq); in timekeeping_max_deferment()
1610 } while (read_seqcount_retry(&tk_core.seq, seq)); in timekeeping_max_deferment()
1682 struct timekeeper *tks = &tk_core.shadow_timekeeper; in timekeeping_init()
1685 tkd_basic_setup(&tk_core); in timekeeping_init()
1705 guard(raw_spinlock_irqsave)(&tk_core.lock); in timekeeping_init()
1719 timekeeping_update_from_shadow(&tk_core, TK_CLOCK_WAS_SET); in timekeeping_init()
1797 scoped_guard(raw_spinlock_irqsave, &tk_core.lock) { in timekeeping_inject_sleeptime64()
1798 struct timekeeper *tks = &tk_core.shadow_timekeeper; in timekeeping_inject_sleeptime64()
1803 timekeeping_update_from_shadow(&tk_core, TK_UPDATE_ALL); in timekeeping_inject_sleeptime64()
1816 struct timekeeper *tks = &tk_core.shadow_timekeeper; in timekeeping_resume()
1828 raw_spin_lock_irqsave(&tk_core.lock, flags); in timekeeping_resume()
1863 timekeeping_update_from_shadow(&tk_core, TK_CLOCK_WAS_SET); in timekeeping_resume()
1864 raw_spin_unlock_irqrestore(&tk_core.lock, flags); in timekeeping_resume()
1876 struct timekeeper *tks = &tk_core.shadow_timekeeper; in timekeeping_suspend()
1895 raw_spin_lock_irqsave(&tk_core.lock, flags); in timekeeping_suspend()
1930 timekeeping_update_from_shadow(&tk_core, 0); in timekeeping_suspend()
1932 raw_spin_unlock_irqrestore(&tk_core.lock, flags); in timekeeping_suspend()
2186 struct timekeeper *tk = &tk_core.shadow_timekeeper; in timekeeping_advance()
2187 struct timekeeper *real_tk = &tk_core.timekeeper; in timekeeping_advance()
2192 guard(raw_spinlock_irqsave)(&tk_core.lock); in timekeeping_advance()
2242 timekeeping_update_from_shadow(&tk_core, clock_set); in timekeeping_advance()
2270 struct timekeeper *tk = &tk_core.timekeeper; in getboottime64()
2279 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_coarse_real_ts64()
2283 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_coarse_real_ts64()
2286 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_coarse_real_ts64()
2301 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_coarse_real_ts64_mg()
2307 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_coarse_real_ts64_mg()
2309 offset = tk_core.timekeeper.offs_real; in ktime_get_coarse_real_ts64_mg()
2310 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_coarse_real_ts64_mg()
2339 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_real_ts64_mg()
2346 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_real_ts64_mg()
2351 offset = tk_core.timekeeper.offs_real; in ktime_get_real_ts64_mg()
2352 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_real_ts64_mg()
2380 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_coarse_ts64()
2385 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_coarse_ts64()
2389 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_coarse_ts64()
2421 struct timekeeper *tk = &tk_core.timekeeper; in ktime_get_update_offsets_now()
2427 seq = read_seqcount_begin(&tk_core.seq); in ktime_get_update_offsets_now()
2444 } while (read_seqcount_retry(&tk_core.seq, seq)); in ktime_get_update_offsets_now()
2520 struct tk_read_base *tkr = &tk_core.timekeeper.tkr_mono; in random_get_entropy_fallback()
2567 scoped_guard (raw_spinlock_irqsave, &tk_core.lock) { in do_adjtimex()
2568 struct timekeeper *tks = &tk_core.shadow_timekeeper; in do_adjtimex()
2576 timekeeping_update_from_shadow(&tk_core, TK_CLOCK_WAS_SET); in do_adjtimex()
2579 tk_update_leap_state_all(&tk_core); in do_adjtimex()
2605 guard(raw_spinlock_irqsave)(&tk_core.lock); in hardpps()