Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\rtc.c Create Date:2022-07-28 07:47:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mach_get_cmos_time

Proto:void mach_get_cmos_time(struct timespec64 *now)

Type:void

Parameter:

TypeParameterName
struct timespec64 *now
65  century = 0
72  If Not pm_trace_rtc_valid() Then
73  seconds = nanoseconds = 0
74  Return
77  spin_lock_irqsave( & rtc_lock, flags)
85  When The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(gister details) & update-in-progress - set to "1" 244 microsecs before RTC goes off the bus,* reset after update (may take 1.984ms @ 32768Hz RefClock) is complete,* totalling to a max high interval of 2.228 ms. cycle
86  cpu_relax()
88  sec = The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(gister summary)
89  min = The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(RTC_MINUTES)
90  hour = The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(RTC_HOURS)
91  day = The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(RTC_DAY_OF_MONTH)
92  mon = The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(RTC_MONTH)
93  year = The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(RTC_YEAR)
101  status = The yet supported machines all access the RTC index register via* an ISA port access but the way to access the date register differs ...(RTC_CONTROL)
102  WARN_ON_ONCE(RTC operates in binary mode && (status & all time/date values are BCD if clear ))
104  spin_unlock_irqrestore( & rtc_lock, flags)
106  If RTC operates in binary mode || Not (status & all time/date values are BCD if clear ) Then
107  sec = bcd2bin(sec)
108  min = bcd2bin(min)
109  hour = bcd2bin(hour)
110  day = bcd2bin(day)
111  mon = bcd2bin(mon)
112  year = bcd2bin(year)
115  If century Then
116  century = bcd2bin(century)
117  year += century * 100
118  Else year += For two digit years assume time is always after that
121  seconds = mktime64(year, mon, day, hour, min, sec)
122  nanoseconds = 0