Home
last modified time | relevance | path

Searched full:year (Results 1 – 25 of 260) sorted by relevance

1234567891011

/linux/arch/alpha/kernel/
H A Drtc.c51 int epoch, year, ctrl; in init_rtc_epoch() local
60 year = CMOS_READ(RTC_YEAR); in init_rtc_epoch()
62 year = bcd2bin(year); in init_rtc_epoch()
64 /* PC-like is standard; used for year >= 70 */ in init_rtc_epoch()
66 if (year < 20) { in init_rtc_epoch()
68 } else if (year >= 20 && year < 48) { in init_rtc_epoch()
71 } else if (year >= 48 && year < 70) { in init_rtc_epoch()
77 printk(KERN_INFO "Using epoch %d for rtc year %d\n", epoch, year); in init_rtc_epoch()
94 int year = tm->tm_year; in alpha_rtc_read_time() local
96 if (year >= 100) in alpha_rtc_read_time()
[all …]
/linux/Documentation/RCU/
H A DRTFP.txt86 reader at a time. The following year, this same group of researchers
102 The year 2000 saw an email exchange that would likely have
106 abundance of RCU patches was presented the following year [McKenney02a],
107 and use of RCU in dcache was first described that same year [Linder02a].
137 Later that year saw a paper describing an RCU implementation
224 ,Year="1980"
244 ,year="1982"
278 ,Year="1984"
314 ,Year="1987"
339 ,year = {1988}
[all …]
/linux/drivers/rtc/
H A Dlib.c30 int rtc_month_days(unsigned int month, unsigned int year) in rtc_month_days() argument
32 return rtc_days_in_month[month] + (is_leap_year(year) && month == 1); in rtc_month_days()
39 int rtc_year_days(unsigned int day, unsigned int month, unsigned int year) in rtc_year_days() argument
41 return rtc_ydays[is_leap_year(year)][month] + day - 1; in rtc_year_days()
57 u32 u32tmp, udays, century, day_of_century, year_of_century, year, in rtc_time64_to_tm() local
68 * days after 0000-03-01 which is in the year 2939805. in rtc_time64_to_tm()
83 * (fictitious) calendar where the year starts in March, month = 2 in rtc_time64_to_tm()
85 * mathematically convenient because the day of the year does not in rtc_time64_to_tm()
86 * depend on whether the year is leap or not. For instance: in rtc_time64_to_tm()
88 * March 1st 0-th day of the year; in rtc_time64_to_tm()
[all …]
H A Drtc-wilco-ec.c43 * @year: Year value (full year % 100)
44 * @century: Century value (full year / 100)
55 u8 year; member
64 * @century: Century value (full year / 100)
65 * @year: Year value (full year % 100)
80 u8 year; member
112 tm->tm_year = rtc.year + (rtc.century * 100) - 1900; in wilco_ec_rtc_read()
128 int year = tm->tm_year + 1900; in wilco_ec_rtc_write() local
139 rtc.century = bin2bcd(year / 100); in wilco_ec_rtc_write()
140 rtc.year = bin2bcd(year % 100); in wilco_ec_rtc_write()
H A Drtc-efi.c24 * returns day of the year [0-365]
30 return rtc_year_days(eft->day, eft->month - 1, eft->year); in compute_yday()
39 int ndays = eft->year * (365 % 7) in compute_wday()
40 + (eft->year - 1) / 4 in compute_wday()
41 - (eft->year - 1) / 100 in compute_wday()
42 + (eft->year - 1) / 400 in compute_wday()
55 eft->year = wtime->tm_year + 1900; in convert_to_efi_time()
91 if (eft->year < 1900 || eft->year > 9999) in convert_from_efi_time()
93 wtime->tm_year = eft->year - 1900; in convert_from_efi_time()
95 /* day in the year [1-365]*/ in convert_from_efi_time()
[all …]
H A Dtest_rtc_lib.c9 static void advance_date(int *year, int *month, int *mday, int *yday, int *wday) in advance_date() argument
13 if (*mday != rtc_month_days(*month - 1, *year)) { in advance_date()
28 ++*year; in advance_date()
44 int year = 1900; in rtc_time64_to_tm_test_date_range() local
59 year, month, mday, yday, wday, secs + sec_offset in rtc_time64_to_tm_test_date_range()
61 KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG); in rtc_time64_to_tm_test_date_range()
70 advance_date(&year, &month, &mday, &yday, &wday); in rtc_time64_to_tm_test_date_range()
H A Drtc-rtd119x.c49 static inline int rtd119x_rtc_days_in_year(int year) in rtd119x_rtc_days_in_year() argument
51 return 365 + (is_leap_year(year) ? 1 : 0); in rtd119x_rtc_days_in_year()
87 unsigned int year; in rtd119x_rtc_read_time() local
108 year = data->base_year; in rtd119x_rtc_read_time()
109 while (day >= rtd119x_rtc_days_in_year(year)) { in rtd119x_rtc_read_time()
110 day -= rtd119x_rtc_days_in_year(year); in rtd119x_rtc_read_time()
111 year++; in rtd119x_rtc_read_time()
113 tm->tm_year = year - 1900; in rtd119x_rtc_read_time()
117 while (day >= rtc_month_days(tm->tm_mon, year)) { in rtd119x_rtc_read_time()
118 day -= rtc_month_days(tm->tm_mon, year); in rtd119x_rtc_read_time()
H A Drtc-lp8788.c138 int ret, i, year; in lp8788_rtc_set_time() local
140 year = tm->tm_year + 1900 - LP8788_BASE_YEAR; in lp8788_rtc_set_time()
141 if (year < 0) { in lp8788_rtc_set_time()
142 dev_err(lp->dev, "invalid year: %d\n", year); in lp8788_rtc_set_time()
152 data[LPTIME_YEAR] = year; in lp8788_rtc_set_time()
194 int ret, i, year; in lp8788_set_alarm() local
196 year = tm->tm_year + 1900 - LP8788_BASE_YEAR; in lp8788_set_alarm()
197 if (year < 0) { in lp8788_set_alarm()
198 dev_err(lp->dev, "invalid year: %d\n", year); in lp8788_set_alarm()
207 data[LPTIME_YEAR] = year; in lp8788_set_alarm()
H A Drtc-ac100.c61 * The year parameter passed to the driver is usually an offset relative to
62 * the year 1900. This macro is used to convert this offset to another one
63 * relative to the minimum year allowed by the hardware.
65 * The year range is 1970 - 2069. This range is selected to match Allwinner's
411 int year; in ac100_rtc_set_time() local
414 /* our RTC has a limited year range... */ in ac100_rtc_set_time()
415 year = rtc_tm->tm_year - AC100_YEAR_OFF; in ac100_rtc_set_time()
416 if (year < 0 || year > (AC100_YEAR_MAX - 1900)) { in ac100_rtc_set_time()
417 dev_err(dev, "rtc only supports year in range %d - %d\n", in ac100_rtc_set_time()
429 reg[6] = bin2bcd(year) & AC100_RTC_YEA_MASK; in ac100_rtc_set_time()
[all …]
H A Drtc-mt7622.c49 * Ranges from 0x40 to 0x78 provide RTC time setup for year, month,
59 * The offset is used in the translation for the year between in struct
66 * tm_year 100 as not a leap year and thus it is also required being excluded
72 * The most year the RTC can hold is 99 and the next to 99 in year register
155 u32 year, mon, mday, wday, hour, min, sec; in mtk_rtc_get_alarm_or_time() local
170 year = mtk_r32(hw, MTK_RTC_TREG(time_alarm, MTK_YEA)); in mtk_rtc_get_alarm_or_time()
180 /* Rebase to the absolute year which userspace queries */ in mtk_rtc_get_alarm_or_time()
181 tm->tm_year = year + MTK_RTC_TM_YR_OFFSET; in mtk_rtc_get_alarm_or_time()
187 u32 year; in mtk_rtc_set_alarm_or_time() local
189 /* Rebase to the relative year which RTC hardware requires */ in mtk_rtc_set_alarm_or_time()
[all …]
H A Drtc-aspeed.c24 unsigned int cent, year; in aspeed_rtc_read_time() local
43 year = (reg2 >> 8) & 0x7f; in aspeed_rtc_read_time()
45 tm->tm_year = year + (cent * 100) - 1900; in aspeed_rtc_read_time()
56 int year, cent; in aspeed_rtc_set_time() local
59 year = tm->tm_year % 100; in aspeed_rtc_set_time()
64 reg2 = ((cent & 0x1f) << 16) | ((year & 0x7f) << 8) | in aspeed_rtc_set_time()
H A Drtc-r7301.c151 int year; in rtc7301_get_time() local
174 year = rtc7301_read(priv, RTC7301_1000_YEAR) * 1000 + in rtc7301_get_time()
179 tm->tm_year = year - 1900; in rtc7301_get_time()
185 int year; in rtc7301_write_time() local
209 year = tm->tm_year + 1900; in rtc7301_write_time()
211 rtc7301_write(priv, year % 10, RTC7301_1_YEAR); in rtc7301_write_time()
212 rtc7301_write(priv, (year / 10) % 10, RTC7301_10_YEAR); in rtc7301_write_time()
213 rtc7301_write(priv, (year / 100) % 10, RTC7301_100_YEAR); in rtc7301_write_time()
214 rtc7301_write(priv, year / 1000, RTC7301_1000_YEAR); in rtc7301_write_time()
/linux/kernel/time/
H A Dtimeconv.c50 u64 u64tmp, udays, century, year; in time64_to_tm() local
80 * (fictitious) calendar where the year starts in March, month = 2 in time64_to_tm()
82 * mathematically convenient because the day of the year does not in time64_to_tm()
83 * depend on whether the year is leap or not. For instance: in time64_to_tm()
85 * March 1st 0-th day of the year; in time64_to_tm()
87 * April 1st 31-st day of the year; in time64_to_tm()
89 * January 1st 306-th day of the year; (Important!) in time64_to_tm()
91 * February 28th 364-th day of the year; in time64_to_tm()
92 * February 29th 365-th day of the year (if it exists). in time64_to_tm()
116 year = 100 * century + year_of_century; in time64_to_tm()
[all …]
/linux/arch/m68k/atari/
H A Dtime.c144 int hour, year; in atari_mste_hwclk() local
172 year = t->tm_year - 80; in atari_mste_hwclk()
173 val.year_ones = year % 10; in atari_mste_hwclk()
174 val.year_tens = year / 10; in atari_mste_hwclk()
178 val.year_ones = (year % 4); /* leap year register */ in atari_mste_hwclk()
203 int sec=0, min=0, hour=0, day=0, mon=0, year=0, wday=0; in atari_tt_hwclk() local
219 year = t->tm_year - atari_rtc_year_offset; in atari_tt_hwclk()
238 year = bin2bcd(year); in atari_tt_hwclk()
271 year = RTC_READ( RTC_YEAR ); in atari_tt_hwclk()
280 RTC_WRITE( RTC_YEAR, year ); in atari_tt_hwclk()
[all …]
/linux/arch/mips/sibyte/swarm/
H A Drtc_xicor1241.c49 #define X1241REG_YR 0x35 /* Year */
51 #define X1241REG_Y2K 0x37 /* Year 2K */
137 /* year is split */ in xicor_set_time()
169 unsigned int year, mon, day, hour, min, sec, y2k; in xicor_get_time() local
186 year = xicor_read(X1241REG_YR); in xicor_get_time()
195 year = bcd2bin(year); in xicor_get_time()
198 year += (y2k * 100); in xicor_get_time()
200 return mktime64(year, mon, day, hour, min, sec); in xicor_get_time()
H A Drtc_m41t81.c68 #define M41T81REG_YR 0x07 /* year */
188 unsigned int year, mon, day, hour, min, sec; in m41t81_get_time() local
204 year = m41t81_read(M41T81REG_YR); in m41t81_get_time()
212 year = bcd2bin(year); in m41t81_get_time()
214 year += 2000; in m41t81_get_time()
216 return mktime64(year, mon, day, hour, min, sec); in m41t81_get_time()
/linux/arch/mips/dec/
H A Dtime.c24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local
35 year = CMOS_READ(RTC_YEAR); in read_persistent_clock64()
37 * The PROM will reset the year to either '72 or '73. in read_persistent_clock64()
38 * Therefore we store the real year separately, in one in read_persistent_clock64()
52 year = bcd2bin(year); in read_persistent_clock64()
55 year += real_year - 72 + 2000; in read_persistent_clock64()
57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64()
/linux/net/netfilter/
H A Dxt_time.c110 unsigned int year, i, w = r->dse; in localtime_3() local
113 * In each year, a certain number of days-since-the-epoch have passed. in localtime_3()
114 * Find the year that is closest to said days. in localtime_3()
118 * year == 2009. w will then be 62. in localtime_3()
120 for (i = 0, year = DSE_FIRST; days_since_epoch[i] > w; in localtime_3()
121 ++i, --year) in localtime_3()
127 * By now we have the current year, and the day of the year. in localtime_3()
131 * number of days-since-New Year have passed, and find the closest in localtime_3()
134 * Consider w=62 (in a non-leap year). Loop will abort on in localtime_3()
141 if (is_leap(year)) { in localtime_3()
[all …]
/linux/arch/powerpc/platforms/chrp/
H A Dtime.c132 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local
140 year = chrp_cmos_clock_read(RTC_YEAR); in chrp_get_rtc_time()
149 year = bcd2bin(year); in chrp_get_rtc_time()
151 if (year < 70) in chrp_get_rtc_time()
152 year += 100; in chrp_get_rtc_time()
158 tm->tm_year = year; in chrp_get_rtc_time()
/linux/fs/isofs/
H A Dutil.c21 int year, month, day, hour, minute, second, tz; in iso_date() local
25 year = (p[0] - '0') * 1000 + in iso_date()
37 year = p[0]; in iso_date()
48 if (year < 0) { in iso_date()
51 ts.tv_sec = mktime64(year+1900, month, day, hour, minute, second); in iso_date()
/linux/drivers/platform/x86/
H A Dlg-laptop.c772 int year = 2017; in acpi_add() local
806 year = 2021; in acpi_add()
809 year = 2016; in acpi_add()
812 year = 2022; in acpi_add()
816 year = 2016; in acpi_add()
819 year = 2017; in acpi_add()
822 year = 2018; in acpi_add()
825 year = 2019; in acpi_add()
831 year = 2020; in acpi_add()
834 year = 2021; in acpi_add()
[all …]
/linux/fs/fat/
H A Dmisc.c176 * date: 9 - 15: year (0 - 127) from 1980
186 /* 120 (2100 - 1980) isn't leap year */
209 long day, leap_day, month, year; in fat_time_fat2unix() local
211 year = date >> 9; in fat_time_fat2unix()
215 leap_day = (year + 3) / 4; in fat_time_fat2unix()
216 if (year > YEAR_2100) /* 2100 isn't leap year */ in fat_time_fat2unix()
218 if (IS_LEAP_YEAR(year) && month > 2) in fat_time_fat2unix()
224 second += (time64_t)(year * 365 + leap_day in fat_time_fat2unix()
249 /* FAT can only support year between 1980 to 2107 */ in fat_time_unix2fat()
/linux/fs/udf/
H A Dudftime.c33 u16 year = le16_to_cpu(src.year); in udf_disk_stamp_to_time() local
46 dest->tv_sec = mktime64(year, src.month, src.day, src.hour, src.minute, in udf_disk_stamp_to_time()
76 dest->year = cpu_to_le16(tm.tm_year + 1900); in udf_time_to_disk_stamp()
/linux/drivers/firmware/
H A Ddmi_scan.c1019 * @yearp: optional out parameter for the year
1031 * On return, year, month and day are guaranteed to be in the
1036 int year = 0, month = 0, day = 0; in dmi_get_date() local
1047 * Determine year first. We assume the date string resembles in dmi_get_date()
1048 * mm/dd/yy[yy] but the original code extracted only the year in dmi_get_date()
1057 year = simple_strtoul(y, &e, 10); in dmi_get_date()
1058 if (y != e && year < 100) { /* 2-digit year */ in dmi_get_date()
1059 year += 1900; in dmi_get_date()
1060 if (year < 1996) /* no dates < spec 1.0 */ in dmi_get_date()
1061 year += 100; in dmi_get_date()
[all …]
/linux/crypto/asymmetric_keys/
H A Dx509_cert_parser.c647 * dates through the year 2049 as UTCTime; certificate validity dates in
659 unsigned year, mon, day, hour, min, sec, mon_len; in x509_decode_time() local
668 year = DD2bin(p); in x509_decode_time()
669 if (year >= 50) in x509_decode_time()
670 year += 1900; in x509_decode_time()
672 year += 2000; in x509_decode_time()
677 year = DD2bin(p) * 100 + DD2bin(p); in x509_decode_time()
678 if (year >= 1950 && year <= 2049) in x509_decode_time()
693 if (year < 1970 || in x509_decode_time()
699 if (year % 4 == 0) { in x509_decode_time()
[all …]

1234567891011