| /linux/lib/ |
| H A D | find_bit_benchmark.c | 39 ktime_t time; in test_find_first_bit() local 41 time = ktime_get(); in test_find_first_bit() 46 time = ktime_get() - time; in test_find_first_bit() 47 pr_err("find_first_bit: %18llu ns, %6ld iterations\n", time, cnt); in test_find_first_bit() 56 ktime_t time; in test_find_first_and_bit() local 60 time = ktime_get(); in test_find_first_and_bit() 65 time = ktime_get() - time; in test_find_first_and_bit() 66 pr_err("find_first_and_bit: %18llu ns, %6ld iterations\n", time, cnt); in test_find_first_and_bit() 74 ktime_t time; in test_find_next_bit() local 76 time = ktime_get(); in test_find_next_bit() [all …]
|
| H A D | rbtree_test.c | 246 cycles_t time1, time2, time; in basic_check() local 263 time = time2 - time1; in basic_check() 265 time = div_u64(time, perf_loops); in basic_check() 267 (unsigned long long)time); in basic_check() 279 time = time2 - time1; in basic_check() 281 time = div_u64(time, perf_loops); in basic_check() 283 (unsigned long long)time); in basic_check() 296 time = time2 - time1; in basic_check() 298 time = div_u64(time, perf_loops); in basic_check() 300 (unsigned long long)time); in basic_check() [all …]
|
| /linux/tools/perf/scripts/python/ |
| H A D | stat-cpi.py | 10 def get_key(time, event, cpu, thread): argument 11 return "%d-%s-%d-%d" % (time, event, cpu, thread) 13 def store_key(time, cpu, thread): argument 14 if (time not in times): 15 times.append(time) 23 def store(time, event, cpu, thread, val, ena, run): argument 27 store_key(time, cpu, thread) 28 key = get_key(time, event, cpu, thread) 31 def get(time, event, cpu, thread): argument 32 key = get_key(time, event, cpu, thread) [all …]
|
| /linux/sound/core/seq/ |
| H A D | seq_prioq.c | 91 return (snd_seq_compare_tick_time(&a->time.tick, &b->time.tick)); in compare_timestamp() 94 return (snd_seq_compare_real_time(&a->time.time, &b->time.time)); in compare_timestamp() 108 if (a->time.tick > b->time.tick) in compare_timestamp_rel() 110 else if (a->time.tick == b->time.tick) in compare_timestamp_rel() 116 if (a->time.time.tv_sec > b->time.time.tv_sec) in compare_timestamp_rel() 118 else if (a->time.time.tv_sec == b->time.time.tv_sec) { in compare_timestamp_rel() 119 if (a->time.time.tv_nsec > b->time.time.tv_nsec) in compare_timestamp_rel() 121 else if (a->time.time.tv_nsec == b->time.time.tv_nsec) in compare_timestamp_rel() 202 return snd_seq_compare_tick_time(current_time, &ev->time.tick); in event_is_ready() 204 return snd_seq_compare_real_time(current_time, &ev->time.time); in event_is_ready() [all …]
|
| /linux/drivers/rtc/ |
| H A D | rtc-mc146818-lib.c | 101 struct rtc_time *time; member 121 p->time->tm_sec = seconds; in mc146818_get_time_callback() 122 p->time->tm_min = CMOS_READ(RTC_MINUTES); in mc146818_get_time_callback() 123 p->time->tm_hour = CMOS_READ(RTC_HOURS); in mc146818_get_time_callback() 124 p->time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in mc146818_get_time_callback() 125 p->time->tm_mon = CMOS_READ(RTC_MONTH); in mc146818_get_time_callback() 126 p->time->tm_year = CMOS_READ(RTC_YEAR); in mc146818_get_time_callback() 154 int mc146818_get_time(struct rtc_time *time, int timeout) in mc146818_get_time() argument 157 .time = time in mc146818_get_time() 161 memset(time, 0, sizeof(*time)); in mc146818_get_time() [all …]
|
| H A D | rtc-spacemit-p1.c | 57 u8 time[6]; in p1_rtc_read_time() local 63 ret = regmap_bulk_read(regmap, RTC_TIME, time, sizeof(time)); in p1_rtc_read_time() 68 seconds = time[0]; in p1_rtc_read_time() 69 ret = regmap_bulk_read(regmap, RTC_TIME, time, sizeof(time)); in p1_rtc_read_time() 72 } while (time[0] != seconds && --count); in p1_rtc_read_time() 77 t->tm_sec = time[0] & GENMASK(5, 0); in p1_rtc_read_time() 78 t->tm_min = time[1] & GENMASK(5, 0); in p1_rtc_read_time() 79 t->tm_hour = time[2] & GENMASK(4, 0); in p1_rtc_read_time() 80 t->tm_mday = (time[3] & GENMASK(4, 0)) + 1; in p1_rtc_read_time() 81 t->tm_mon = time[4] & GENMASK(3, 0); in p1_rtc_read_time() [all …]
|
| H A D | rtc-wm8350.c | 93 u16 time[4]; in wm8350_rtc_settime() local 97 time[0] = tm->tm_sec; in wm8350_rtc_settime() 98 time[0] |= tm->tm_min << WM8350_RTC_MINS_SHIFT; in wm8350_rtc_settime() 99 time[1] = tm->tm_hour; in wm8350_rtc_settime() 100 time[1] |= (tm->tm_wday + 1) << WM8350_RTC_DAY_SHIFT; in wm8350_rtc_settime() 101 time[2] = tm->tm_mday; in wm8350_rtc_settime() 102 time[2] |= (tm->tm_mon + 1) << WM8350_RTC_MTH_SHIFT; in wm8350_rtc_settime() 103 time[3] = ((tm->tm_year + 1900) / 100) << WM8350_RTC_YHUNDREDS_SHIFT; in wm8350_rtc_settime() 104 time[3] |= (tm->tm_year + 1900) % 100; in wm8350_rtc_settime() 107 time[0], time[1], time[2], time[3]); in wm8350_rtc_settime() [all …]
|
| H A D | rtc-sd2405al.c | 87 static int sd2405al_read_time(struct device *dev, struct rtc_time *time) in sd2405al_read_time() argument 98 time->tm_sec = bcd2bin(data[SD2405AL_REG_T_SEC] & 0x7F); in sd2405al_read_time() 99 time->tm_min = bcd2bin(data[SD2405AL_REG_T_MIN] & 0x7F); in sd2405al_read_time() 102 time->tm_hour = bcd2bin(data[SD2405AL_REG_T_HOUR] & 0x3F); in sd2405al_read_time() 105 time->tm_hour = bcd2bin(data[SD2405AL_REG_T_HOUR] in sd2405al_read_time() 108 time->tm_hour = bcd2bin(data[SD2405AL_REG_T_HOUR] in sd2405al_read_time() 111 time->tm_wday = bcd2bin(data[SD2405AL_REG_T_WEEK] & 0x07); in sd2405al_read_time() 112 time->tm_mday = bcd2bin(data[SD2405AL_REG_T_DAY] & 0x3F); in sd2405al_read_time() 113 time->tm_mon = bcd2bin(data[SD2405AL_REG_T_MON] & 0x1F) - 1; in sd2405al_read_time() 114 time->tm_year = bcd2bin(data[SD2405AL_REG_T_YEAR]) + 100; in sd2405al_read_time() [all …]
|
| H A D | rtc-nct6694.c | 66 struct nct6694_rtc_time time; member 81 struct nct6694_rtc_time *time = &data->msg->time; in nct6694_rtc_read_time() local 86 .len = cpu_to_le16(sizeof(*time)) in nct6694_rtc_read_time() 90 ret = nct6694_read_msg(data->nct6694, &cmd_hd, time); in nct6694_rtc_read_time() 94 tm->tm_sec = bcd2bin(time->sec); /* tm_sec expect 0 ~ 59 */ in nct6694_rtc_read_time() 95 tm->tm_min = bcd2bin(time->min); /* tm_min expect 0 ~ 59 */ in nct6694_rtc_read_time() 96 tm->tm_hour = bcd2bin(time->hour); /* tm_hour expect 0 ~ 23 */ in nct6694_rtc_read_time() 97 tm->tm_wday = bcd2bin(time->week) - 1; /* tm_wday expect 0 ~ 6 */ in nct6694_rtc_read_time() 98 tm->tm_mday = bcd2bin(time->day); /* tm_mday expect 1 ~ 31 */ in nct6694_rtc_read_time() 99 tm->tm_mon = bcd2bin(time->month) - 1; /* tm_month expect 0 ~ 11 */ in nct6694_rtc_read_time() [all …]
|
| H A D | interface.c | 70 time64_t time = rtc_tm_to_time64(tm); in rtc_valid_range() local 77 if (time < range_min || time > range_max) in rtc_valid_range() 194 alarm->time.tm_sec = -1; in rtc_read_alarm_internal() 195 alarm->time.tm_min = -1; in rtc_read_alarm_internal() 196 alarm->time.tm_hour = -1; in rtc_read_alarm_internal() 197 alarm->time.tm_mday = -1; in rtc_read_alarm_internal() 198 alarm->time.tm_mon = -1; in rtc_read_alarm_internal() 199 alarm->time.tm_year = -1; in rtc_read_alarm_internal() 200 alarm->time.tm_wday = -1; in rtc_read_alarm_internal() 201 alarm->time.tm_yday = -1; in rtc_read_alarm_internal() [all …]
|
| H A D | rtc-spear.c | 202 unsigned int time, date; in spear_rtc_read_time() local 208 time = readl(config->ioaddr + TIME_REG); in spear_rtc_read_time() 210 } while (time == readl(config->ioaddr + TIME_REG)); in spear_rtc_read_time() 211 tm->tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; in spear_rtc_read_time() 212 tm->tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; in spear_rtc_read_time() 213 tm->tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; in spear_rtc_read_time() 233 unsigned int time, date; in spear_rtc_set_time() local 238 time = (tm->tm_sec << SECOND_SHIFT) | (tm->tm_min << MINUTE_SHIFT) | in spear_rtc_set_time() 242 writel(time, config->ioaddr + TIME_REG); in spear_rtc_set_time() 259 unsigned int time, date; in spear_rtc_read_alarm() local [all …]
|
| H A D | rtc-ds1305.c | 170 static int ds1305_get_time(struct device *dev, struct rtc_time *time) in ds1305_get_time() argument 188 time->tm_sec = bcd2bin(buf[DS1305_SEC]); in ds1305_get_time() 189 time->tm_min = bcd2bin(buf[DS1305_MIN]); in ds1305_get_time() 190 time->tm_hour = bcd2hour(buf[DS1305_HOUR]); in ds1305_get_time() 191 time->tm_wday = buf[DS1305_WDAY] - 1; in ds1305_get_time() 192 time->tm_mday = bcd2bin(buf[DS1305_MDAY]); in ds1305_get_time() 193 time->tm_mon = bcd2bin(buf[DS1305_MON]) - 1; in ds1305_get_time() 194 time->tm_year = bcd2bin(buf[DS1305_YEAR]) + 100; in ds1305_get_time() 198 "read", time->tm_sec, time->tm_min, in ds1305_get_time() 199 time->tm_hour, time->tm_mday, in ds1305_get_time() [all …]
|
| H A D | rtc-ds1302.c | 37 static int ds1302_rtc_set_time(struct device *dev, struct rtc_time *time) in ds1302_rtc_set_time() argument 58 *bp++ = bin2bcd(time->tm_sec); in ds1302_rtc_set_time() 59 *bp++ = bin2bcd(time->tm_min); in ds1302_rtc_set_time() 60 *bp++ = bin2bcd(time->tm_hour); in ds1302_rtc_set_time() 61 *bp++ = bin2bcd(time->tm_mday); in ds1302_rtc_set_time() 62 *bp++ = bin2bcd(time->tm_mon + 1); in ds1302_rtc_set_time() 63 *bp++ = time->tm_wday + 1; in ds1302_rtc_set_time() 64 *bp++ = bin2bcd(time->tm_year % 100); in ds1302_rtc_set_time() 72 static int ds1302_rtc_get_time(struct device *dev, struct rtc_time *time) in ds1302_rtc_get_time() argument 88 time->tm_sec = bcd2bin(buf[RTC_ADDR_SEC]); in ds1302_rtc_get_time() [all …]
|
| H A D | rtc-mcp795.c | 274 later = rtc_tm_to_time64(&alm->time); in mcp795_set_alarm() 279 (SEC_PER_DAY * (365 + is_leap_year(alm->time.tm_year)))) in mcp795_set_alarm() 290 alm->time.tm_year = -1; in mcp795_set_alarm() 291 alm->time.tm_isdst = -1; in mcp795_set_alarm() 292 alm->time.tm_yday = -1; in mcp795_set_alarm() 294 tmp[0] = (tmp[0] & 0x80) | bin2bcd(alm->time.tm_sec); in mcp795_set_alarm() 295 tmp[1] = (tmp[1] & 0x80) | bin2bcd(alm->time.tm_min); in mcp795_set_alarm() 296 tmp[2] = (tmp[2] & 0xE0) | bin2bcd(alm->time.tm_hour); in mcp795_set_alarm() 297 tmp[3] = (tmp[3] & 0x80) | bin2bcd(alm->time.tm_wday + 1); in mcp795_set_alarm() 300 tmp[4] = (tmp[4] & 0xC0) | bin2bcd(alm->time.tm_mday); in mcp795_set_alarm() [all …]
|
| H A D | rtc-ma35d1.c | 122 u32 time, cal, wday; in ma35d1_rtc_read_time() local 125 time = rtc_reg_read(rtc, MA35_REG_RTC_TIME); in ma35d1_rtc_read_time() 128 } while (time != rtc_reg_read(rtc, MA35_REG_RTC_TIME) || in ma35d1_rtc_read_time() 137 tm->tm_sec = bcd2bin(time >> 0); in ma35d1_rtc_read_time() 138 tm->tm_min = bcd2bin(time >> 8); in ma35d1_rtc_read_time() 139 tm->tm_hour = bcd2bin(time >> 16); in ma35d1_rtc_read_time() 171 alrm->time.tm_mday = bcd2bin(calm >> 0); in ma35d1_rtc_read_alarm() 172 alrm->time.tm_mon = bcd2bin(calm >> 8); in ma35d1_rtc_read_alarm() 173 alrm->time.tm_mon = alrm->time.tm_mon - 1; in ma35d1_rtc_read_alarm() 175 alrm->time.tm_year = bcd2bin(calm >> 16) + 100; in ma35d1_rtc_read_alarm() [all …]
|
| H A D | rtc-rk808.c | 76 time64_t time = rtc_tm_to_time64(tm); in rockchip_to_gregorian() local 77 rtc_time64_to_tm(time + nov2dec_transitions(tm) * 86400, tm); in rockchip_to_gregorian() 83 time64_t time = rtc_tm_to_time64(tm); in gregorian_to_rockchip() local 84 rtc_time64_to_tm(time - extra_days * 86400, tm); in gregorian_to_rockchip() 91 rtc_time64_to_tm(time - (extra_days - 1) * 86400, tm); in gregorian_to_rockchip() 203 alrm->time.tm_sec = bcd2bin(alrm_data[0] & SECONDS_REG_MSK); in rk808_rtc_readalarm() 204 alrm->time.tm_min = bcd2bin(alrm_data[1] & MINUTES_REG_MAK); in rk808_rtc_readalarm() 205 alrm->time.tm_hour = bcd2bin(alrm_data[2] & HOURS_REG_MSK); in rk808_rtc_readalarm() 206 alrm->time.tm_mday = bcd2bin(alrm_data[3] & DAYS_REG_MSK); in rk808_rtc_readalarm() 207 alrm->time.tm_mon = (bcd2bin(alrm_data[4] & MONTHS_REG_MSK)) - 1; in rk808_rtc_readalarm() [all …]
|
| /linux/Documentation/sound/designs/ |
| H A D | timestamping.rst | 7 - Trigger_tstamp is the system time snapshot taken when the .trigger 19 The difference (tstamp - trigger_tstamp) defines the elapsed time. 26 The use of these different pointers and time information depends on 30 - ``delay`` reports the time it will take to hear a new sample after all 34 along with a snapshot of system time. Applications can select from 42 of time as measured by different components of audio hardware. In 47 --------------------------------------------------------------> time 51 time time time time time 58 The analog time is taken at the last stage of the playback, as close 61 The link time is taken at the output of the SoC/chipset as the samples [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/core/ |
| H A D | subdev.c | 58 s64 time; in nvkm_subdev_fini() local 61 time = ktime_to_us(ktime_get()); in nvkm_subdev_fini() 75 time = ktime_to_us(ktime_get()) - time; in nvkm_subdev_fini() 76 nvkm_trace(subdev, "%s completed in %lldus\n", action, time); in nvkm_subdev_fini() 83 s64 time; in nvkm_subdev_preinit() local 86 time = ktime_to_us(ktime_get()); in nvkm_subdev_preinit() 96 time = ktime_to_us(ktime_get()) - time; in nvkm_subdev_preinit() 97 nvkm_trace(subdev, "preinit completed in %lldus\n", time); in nvkm_subdev_preinit() 104 s64 time; in nvkm_subdev_oneinit_() local 111 time = ktime_to_us(ktime_get()); in nvkm_subdev_oneinit_() [all …]
|
| /linux/Documentation/trace/rv/ |
| H A D | monitor_rtapp.rst | 1 Real-time application monitors 11 Real-time applications may have design flaws such that they experience 12 unexpected latency and fail to meet their time requirements. Often, these flaws 15 - Page faults: A real-time thread may access memory that does not have a 18 action. This causes significant delays to the real-time thread 19 - Priority inversion: A real-time thread blocks waiting for a lower-priority 20 thread. This causes the real-time thread to effectively take on the 21 scheduling priority of the lower-priority thread. For example, the real-time 23 non-pi-mutex, but the mutex is currently owned by a non-real-time thread. 26 reasons for unexpected latency with real-time applications. It is a container of [all …]
|
| /linux/fs/fat/ |
| H A D | fat_test.c | 26 __le16 time; member 36 .time = cpu_to_le16(0), 44 .time = cpu_to_le16(49021), 52 .time = cpu_to_le16(0), 60 .time = cpu_to_le16(49021), 68 .time = cpu_to_le16(0), 76 .time = cpu_to_le16(0), 84 .time = cpu_to_le16(0), 92 .time = cpu_to_le16(48064), 100 .time = cpu_to_le16(960), [all …]
|
| /linux/arch/um/kernel/ |
| H A D | time.c | 149 msg->time & UM_TIMETRAVEL_START_ACK_ID); in time_travel_handle_message() 170 time_travel_set_time(msg->time); in time_travel_handle_message() 184 _time_travel_ext_free_until = msg->time; in time_travel_handle_message() 187 bc_message = msg->time; in time_travel_handle_message() 196 static u64 time_travel_ext_req(u32 op, u64 time) in time_travel_ext_req() argument 202 .time = time, in time_travel_ext_req() 237 msg.op, msg.seq, mseq, msg.time); in time_travel_ext_req() 240 time_travel_set_time(msg.time); in time_travel_ext_req() 244 return msg.time; in time_travel_ext_req() 264 static void time_travel_ext_update_request(unsigned long long time) in time_travel_ext_update_request() argument [all …]
|
| /linux/drivers/base/power/ |
| H A D | trace.c | 91 static struct rtc_time time = { in set_magic_time() local 103 time.tm_year = (n % 100); in set_magic_time() 105 time.tm_mon = (n % 12); in set_magic_time() 107 time.tm_mday = (n % 28) + 1; in set_magic_time() 109 time.tm_hour = (n % 24); in set_magic_time() 111 time.tm_min = (n % 20) * 3; in set_magic_time() 113 mc146818_set_time(&time); in set_magic_time() 120 struct rtc_time time; in read_magic_time() local 123 if (mc146818_get_time(&time, 1000) < 0) { in read_magic_time() 128 pr_info("RTC time: %ptRt, date: %ptRd\n", &time, &time); in read_magic_time() [all …]
|
| /linux/Documentation/scheduler/ |
| H A D | sched-rt-group.rst | 28 resolution, or the time it takes to handle the budget refresh itself. 33 are real-time processes). 42 Real-time scheduling is all about determinism, a group has to be able to rely on 43 the amount of bandwidth (eg. CPU time) being constant. In order to schedule 44 multiple groups of real-time tasks, each group must be assigned a fixed portion 45 of the CPU time available. Without a minimum guarantee a real-time group can 52 CPU time is divided by means of specifying how much time can be spent running 53 in a given period. We allocate this "run time" for each real-time group which 54 the other real-time groups will not be permitted to use. 56 Any time not allocated to a real-time group will be used to run normal priority [all …]
|
| /linux/drivers/firmware/efi/ |
| H A D | efi-pstore.c | 89 u64 time; in efi_pstore_read_func() local 94 &record->type, &part, &cnt, &time, &data_type) == 5) { in efi_pstore_read_func() 95 record->id = generic_id(time, part, cnt); in efi_pstore_read_func() 98 record->time.tv_sec = time; in efi_pstore_read_func() 99 record->time.tv_nsec = 0; in efi_pstore_read_func() 106 &record->type, &part, &cnt, &time) == 4) { in efi_pstore_read_func() 107 record->id = generic_id(time, part, cnt); in efi_pstore_read_func() 110 record->time.tv_sec = time; in efi_pstore_read_func() 111 record->time.tv_nsec = 0; in efi_pstore_read_func() 115 &record->type, &part, &time) == 3) { in efi_pstore_read_func() [all …]
|
| /linux/tools/testing/selftests/timers/ |
| H A D | valid-adjtimex.c | 202 tmx.time.tv_sec = offset / NSEC_PER_SEC; in set_offset() 203 tmx.time.tv_usec = offset % NSEC_PER_SEC; in set_offset() 205 if (offset < 0 && tmx.time.tv_usec) { in set_offset() 206 tmx.time.tv_sec -= 1; in set_offset() 207 tmx.time.tv_usec += NSEC_PER_SEC; in set_offset() 210 tmx.time.tv_sec = offset / USEC_PER_SEC; in set_offset() 211 tmx.time.tv_usec = offset % USEC_PER_SEC; in set_offset() 213 if (offset < 0 && tmx.time.tv_usec) { in set_offset() 214 tmx.time.tv_sec -= 1; in set_offset() 215 tmx.time.tv_usec += USEC_PER_SEC; in set_offset() [all …]
|