Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\timekeeping.c Create Date:2022-07-28 10:42:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mekeeping_resume - Resumes the generic timekeeping subsystem.

Proto:void timekeeping_resume(void)

Type:void

Parameter:Nothing

1678  tk = timekeeper
1679  clock = clock
1683  bool inject_sleeptime = false
1685  ad_persistent_clock64 - Return time from the persistent clock.* Weak dummy function for arches that do not yet support it.* Reads the time from the battery backed persistent clock.* Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.
1687  clockevents_resume()
1688  clocksource_resume()
1690  raw_spin_lock_irqsave( & timekeeper_lock, flags)
1691  write_seqcount_begin( & seq)
1705  cycle_now = k_clock_read - atomic clocksource read() helper* This helper is necessary to use in the read paths because, while the* seqlock ensures we don't return a bad value while structures are updated,* it doesn't protect from potential crashes
1706  nsec = locksource_stop_suspend_timing - Stop measuring the suspend timing*@cs: current clocksource from timekeeping*@cycle_now: current cycles from timekeeping* This function will calculate the suspend time from suspend timer.
1707  If nsec > 0 Then
1708  ts_delta = s_to_timespec64 - Convert nanoseconds to timespec64*@nsec: the nanoseconds value to be converted* Returns the timespec64 representation of the nsec parameter.
1709  inject_sleeptime = true
1710  Else if lhs < rhs: return <0* lhs == rhs: return 0* lhs > rhs: return >0 > 0 Then
1711  ts_delta = sub = lhs - rhs, in normalized form
1712  inject_sleeptime = true
1715  If inject_sleeptime Then
1716  Flag reflecting whether timekeeping_resume() has injected sleeptime = false
1717  __timekeeping_inject_sleeptime - Internal function to add sleep interval*@delta: pointer to a timespec delta value* Takes a timespec offset measuring a suspend interval and properly* adds the sleep offset to the timekeeping variables.
1721  cycle_last = cycle_now
1722  cycle_last = cycle_now
1724  Difference between accumulated time and NTP time in ntp* shifted nano seconds. = 0
1725  lag for if timekeeping is suspended = 0
1726  must hold timekeeper_lock
1727  write_seqcount_end( & seq)
1728  raw_spin_unlock_irqrestore( & timekeeper_lock, flags)
1730  touch_softlockup_watchdog()
1732  tick_resume()
1733  During resume we might have to reprogram the high resolution timer* interrupt on all online CPUs. However, all other CPUs will be* stopped with IRQs interrupts disabled so the clock_was_set() call* must be deferred.