Home
last modified time | relevance | path

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

1234567891011

/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/kernel/time/
H A Dtime_test.c7 * Traditional implementation of leap year evaluation.
9 static bool is_leap(long year) in is_leap() argument
11 return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); in is_leap()
17 static int last_day_of_month(long year, int month) in last_day_of_month() argument
20 return 28 + is_leap(year); in last_day_of_month()
29 static void advance_date(long *year, int *month, int *mday, int *yday) in advance_date() argument
31 if (*mday != last_day_of_month(*year, *month)) { in advance_date()
46 ++*year; in advance_date()
61 long year = 1970 - 80000; in time64_to_tm_test_date_range() local
77 year, month, mdday, yday, days in time64_to_tm_test_date_range()
[all …]
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/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/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()
58 u32 u32tmp, udays, century, day_of_century, year_of_century, year, in rtc_time64_to_tm() local
71 * (fictitious) calendar where the year starts in March, month = 2 in rtc_time64_to_tm()
73 * mathematically convenient because the day of the year does not in rtc_time64_to_tm()
74 * depend on whether the year is leap or not. For instance: in rtc_time64_to_tm()
76 * March 1st 0-th day of the year; in rtc_time64_to_tm()
78 * April 1st 31-st day of the year; in rtc_time64_to_tm()
[all …]
H A Drtc-pcf8583.c175 unsigned char ctrl, year[2]; in pcf8583_rtc_read_time() local
178 .nr = sizeof(year), in pcf8583_rtc_read_time()
179 .data = year in pcf8583_rtc_read_time()
202 real_year = year[0]; in pcf8583_rtc_read_time()
205 * The RTC year holds the LSB two bits of the current in pcf8583_rtc_read_time()
206 * year, which should reflect the LSB two bits of the in pcf8583_rtc_read_time()
207 * CMOS copy of the year. Any difference indicates in pcf8583_rtc_read_time()
213 * RTC year wrapped. Adjust it appropriately. in pcf8583_rtc_read_time()
217 tm->tm_year = (real_year + year_offset + year[1] * 100) - 1900; in pcf8583_rtc_read_time()
225 unsigned char year[2], chk; in pcf8583_rtc_set_time() local
[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 Dlib_test.c9 static void advance_date(int *year, int *month, int *mday, int *yday) in advance_date() argument
11 if (*mday != rtc_month_days(*month - 1, *year)) { in advance_date()
26 ++*year; in advance_date()
42 int year = 1970; in rtc_time64_to_tm_test_date_range() local
58 year, month, mday, yday, days in rtc_time64_to_tm_test_date_range()
60 KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG); in rtc_time64_to_tm_test_date_range()
65 advance_date(&year, &month, &mday, &yday); 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-sunxi.c104 * The year parameter passed to the driver is usually an offset relative to
105 * the year 1900. This macro is used to convert this offset to another one
106 * relative to the minimum year allowed by the hardware.
111 * min and max year are arbitrary set considering the limited range of the
115 unsigned int min; /* min year allowed */
116 unsigned int max; /* max year allowed */
117 unsigned int mask; /* mask for the year field */
118 unsigned char leap_shift; /* bit shift to get the leap year */
331 unsigned int year; in sunxi_rtc_settime() local
335 * the SUNXI_YEAR_OFF macro to rebase it with respect to the min year in sunxi_rtc_settime()
[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.c25 unsigned int cent, year; in aspeed_rtc_read_time() local
44 year = (reg2 >> 8) & 0x7f; in aspeed_rtc_read_time()
46 tm->tm_year = year + (cent * 100) - 1900; in aspeed_rtc_read_time()
57 int year, cent; in aspeed_rtc_set_time() local
60 year = tm->tm_year % 100; in aspeed_rtc_set_time()
65 reg2 = ((cent & 0x1f) << 16) | ((year & 0x7f) << 8) | in aspeed_rtc_set_time()
/linux/arch/mips/include/asm/mach-rm/
H A Dmc146818rtc.h14 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) argument
16 #define mc146818_decode_year(year) ((year) + 1980) argument
/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()
/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/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/arch/mips/include/asm/
H A Dmc146818-time.h91 unsigned int year, mon, day, hour, min, sec; in mc146818_get_cmos_time() local
102 year = CMOS_READ(RTC_YEAR); in mc146818_get_cmos_time()
111 year = bcd2bin(year); in mc146818_get_cmos_time()
114 year = mc146818_decode_year(year); in mc146818_get_cmos_time()
116 return mktime64(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
/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/arch/mips/include/asm/mach-generic/
H A Dmc146818rtc.h33 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) argument
/linux/arch/mips/include/asm/mach-malta/
H A Dmc146818rtc.h34 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) argument
/linux/fs/fat/
H A Dfat_test.c66 .name = "Leap Day / Year (1996-02-29 00:00:00)",
74 .name = "Year 2000 is leap year (2000-02-29 00:00:00)",
82 .name = "Year 2100 not leap year (2100-03-01 00:00:00)",
90 .name = "Leap year + timezone UTC+1 (== 2004-02-29 00:30:00 UTC)",
98 .name = "Leap year + timezone UTC-1 (== 2004-02-29 23:30:00 UTC)",

1234567891011