/drivers/md/bcache/ |
D | util.c | 165 uint64_t now, duration, last; in bch_time_stats_update() local 169 now = local_clock(); in bch_time_stats_update() 170 duration = time_after64(now, start_time) in bch_time_stats_update() 171 ? now - start_time : 0; in bch_time_stats_update() 172 last = time_after64(now, stats->last) in bch_time_stats_update() 173 ? now - stats->last : 0; in bch_time_stats_update() 188 stats->last = now ?: 1; in bch_time_stats_update() 203 uint64_t now = local_clock(); in bch_next_delay() local 213 if (time_before64(now + NSEC_PER_SEC * 5LLU / 2LLU, d->next)) in bch_next_delay() 214 d->next = now + NSEC_PER_SEC * 5LLU / 2LLU; in bch_next_delay() [all …]
|
/drivers/block/drbd/ |
D | drbd_debugfs.c | 96 static void seq_print_one_request(struct seq_file *m, struct drbd_request *req, unsigned long now) in seq_print_one_request() argument 108 seq_printf(m, "\t%d", jiffies_to_msecs(now - req->start_jif)); in seq_print_one_request() 109 seq_print_age_or_dash(m, s & RQ_IN_ACT_LOG, now - req->in_actlog_jif); in seq_print_one_request() 110 seq_print_age_or_dash(m, s & RQ_LOCAL_PENDING, now - req->pre_submit_jif); in seq_print_one_request() 113 seq_print_age_or_dash(m, s & RQ_NET_SENT, now - req->pre_send_jif); in seq_print_one_request() 114 seq_print_age_or_dash(m, (s & RQ_NET_SENT) && !(s & RQ_NET_PENDING), now - req->acked_jif); in seq_print_one_request() 115 seq_print_age_or_dash(m, s & RQ_NET_DONE, now - req->net_done_jif); in seq_print_one_request() 122 static void seq_print_minor_vnr_req(struct seq_file *m, struct drbd_request *req, unsigned long now) in seq_print_minor_vnr_req() argument 125 seq_print_one_request(m, req, now); in seq_print_minor_vnr_req() 128 …int_resource_pending_meta_io(struct seq_file *m, struct drbd_resource *resource, unsigned long now) in seq_print_resource_pending_meta_io() argument [all …]
|
D | drbd_req.c | 1620 unsigned long now, unsigned long ent, in net_timeout_reached() argument 1625 if (!time_after(now, net_req->pre_send_jif + ent)) in net_timeout_reached() 1628 if (time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) in net_timeout_reached() 1633 jiffies_to_msecs(now - net_req->pre_send_jif), ko_count, timeout); in net_timeout_reached() 1644 jiffies_to_msecs(now - net_req->pre_send_jif), ko_count, timeout); in net_timeout_reached() 1664 if (time_after(now, connection->send.last_sent_barrier_jif + ent)) { in net_timeout_reached() 1666 connection->send.last_sent_barrier_jif, now, in net_timeout_reached() 1667 jiffies_to_msecs(now - connection->send.last_sent_barrier_jif), ko_count, timeout); in net_timeout_reached() 1698 unsigned long now; in request_timer_fn() local 1721 now = jiffies; in request_timer_fn() [all …]
|
/drivers/rtc/ |
D | interface.c | 215 struct rtc_time before, now; in __rtc_read_alarm() local 268 memcpy(&before, &now, sizeof(struct rtc_time)); in __rtc_read_alarm() 283 err = rtc_read_time(rtc, &now); in __rtc_read_alarm() 288 } while (before.tm_min != now.tm_min || in __rtc_read_alarm() 289 before.tm_hour != now.tm_hour || in __rtc_read_alarm() 290 before.tm_mon != now.tm_mon || in __rtc_read_alarm() 291 before.tm_year != now.tm_year); in __rtc_read_alarm() 297 alarm->time.tm_sec = now.tm_sec; in __rtc_read_alarm() 299 alarm->time.tm_min = now.tm_min; in __rtc_read_alarm() 301 alarm->time.tm_hour = now.tm_hour; in __rtc_read_alarm() [all …]
|
D | rtc-digicolor.c | 94 unsigned long now; in dc_rtc_read_time() local 97 ret = dc_rtc_read(rtc, &now); in dc_rtc_read_time() 100 rtc_time64_to_tm(now, tm); in dc_rtc_read_time() 116 unsigned long now; in dc_rtc_read_alarm() local 123 ret = dc_rtc_read(rtc, &now); in dc_rtc_read_alarm() 127 alarm->pending = alarm_reg + reference > now; in dc_rtc_read_alarm()
|
/drivers/staging/wfx/ |
D | fwio.c | 154 ktime_t now, start; in wait_ncp_status() local 163 now = ktime_get(); in wait_ncp_status() 166 if (ktime_after(now, ktime_add_ms(start, DCA_TIMEOUT))) in wait_ncp_status() 169 if (ktime_compare(now, start)) in wait_ncp_status() 171 ktime_us_delta(now, start)); in wait_ncp_status() 181 ktime_t now, start; in upload_firmware() local 191 now = ktime_get(); in upload_firmware() 194 if (ktime_after(now, ktime_add_ms(start, DCA_TIMEOUT))) in upload_firmware() 200 if (ktime_compare(now, start)) in upload_firmware() 202 ktime_us_delta(now, start)); in upload_firmware() [all …]
|
/drivers/base/power/ |
D | domain_governor.c | 122 static void update_domain_next_wakeup(struct generic_pm_domain *genpd, ktime_t now) in update_domain_next_wakeup() argument 142 if (next_wakeup != KTIME_MAX && !ktime_before(next_wakeup, now)) in update_domain_next_wakeup() 149 if (next_wakeup != KTIME_MAX && !ktime_before(next_wakeup, now)) in update_domain_next_wakeup() 158 unsigned int state, ktime_t now) in next_wakeup_allows_state() argument 166 idle_time_ns = ktime_to_ns(ktime_sub(domain_wakeup, now)); in next_wakeup_allows_state() 266 static bool _default_power_down_ok(struct dev_pm_domain *pd, ktime_t now) in _default_power_down_ok() argument 278 update_domain_next_wakeup(genpd, now); in _default_power_down_ok() 282 if (next_wakeup_allows_state(genpd, state_idx, now)) { in _default_power_down_ok() 348 ktime_t now = ktime_get(); in cpu_power_down_ok() local 353 if (!_default_power_down_ok(pd, now)) in cpu_power_down_ok() [all …]
|
D | wakeup.c | 683 static void update_prevent_sleep_time(struct wakeup_source *ws, ktime_t now) in update_prevent_sleep_time() argument 685 ktime_t delta = ktime_sub(now, ws->start_prevent_time); in update_prevent_sleep_time() 690 ktime_t now) {} in update_prevent_sleep_time() argument 705 ktime_t now; in wakeup_source_deactivate() local 724 now = ktime_get(); in wakeup_source_deactivate() 725 duration = ktime_sub(now, ws->last_time); in wakeup_source_deactivate() 730 ws->last_time = now; in wakeup_source_deactivate() 735 update_prevent_sleep_time(ws, now); in wakeup_source_deactivate() 1108 ktime_t now = ktime_get(); in pm_wakep_autosleep_enabled() local 1118 ws->start_prevent_time = now; in pm_wakep_autosleep_enabled() [all …]
|
/drivers/clk/rockchip/ |
D | clk-half-divider.c | 13 static bool _is_best_half_div(unsigned long rate, unsigned long now, in _is_best_half_div() argument 17 return abs(rate - now) < abs(rate - best); in _is_best_half_div() 19 return now <= rate && now > best; in _is_best_half_div() 40 unsigned long parent_rate, best = 0, now, maxdiv; in clk_half_divider_bestdiv() local 77 now = DIV_ROUND_UP_ULL(((u64)parent_rate * 2), in clk_half_divider_bestdiv() 80 if (_is_best_half_div(rate, now, best, flags)) { in clk_half_divider_bestdiv() 82 best = now; in clk_half_divider_bestdiv()
|
/drivers/net/wireguard/ |
D | ratelimiter.c | 57 const u64 now = ktime_get_coarse_boottime_ns(); in wg_ratelimiter_gc_entries() local 66 now - entry->last_time_ns > NSEC_PER_SEC) in wg_ratelimiter_gc_entries() 72 now - entry->last_time_ns > NSEC_PER_SEC) in wg_ratelimiter_gc_entries() 113 u64 now, tokens; in wg_ratelimiter_allow() local 121 now = ktime_get_coarse_boottime_ns(); in wg_ratelimiter_allow() 123 entry->tokens + now - in wg_ratelimiter_allow() 125 entry->last_time_ns = now; in wg_ratelimiter_allow()
|
/drivers/gpu/drm/ |
D | drm_vblank.c | 985 u64 seq, ktime_t now) in send_vblank_event() argument 992 tv = ktime_to_timespec64(now); in send_vblank_event() 1005 e->event.seq.time_ns = ktime_to_ns(now); in send_vblank_event() 1016 drm_send_event_timestamp_locked(dev, &e->base, now); in send_vblank_event() 1088 ktime_t now; in drm_crtc_send_vblank_event() local 1091 seq = drm_vblank_count_and_time(dev, pipe, &now); in drm_crtc_send_vblank_event() 1095 now = ktime_get(); in drm_crtc_send_vblank_event() 1098 send_vblank_event(dev, e, seq, now); in drm_crtc_send_vblank_event() 1306 ktime_t now; in drm_crtc_vblank_off() local 1340 seq = drm_vblank_count_and_time(dev, pipe, &now); in drm_crtc_vblank_off() [all …]
|
/drivers/clk/meson/ |
D | clk-pll.c | 123 unsigned long now, in meson_clk_pll_is_better() argument 128 if (abs(now - rate) < abs(best - rate)) in meson_clk_pll_is_better() 132 if (now <= rate && best < now) in meson_clk_pll_is_better() 221 unsigned long best = 0, now = 0; in meson_clk_get_pll_settings() local 231 now = __pll_params_to_rate(parent_rate, m, n, 0, pll); in meson_clk_get_pll_settings() 232 if (meson_clk_pll_is_better(rate, best, now, pll)) { in meson_clk_get_pll_settings() 233 best = now; in meson_clk_get_pll_settings() 237 if (now == rate) in meson_clk_get_pll_settings()
|
D | clk-dualdiv.c | 68 unsigned long best = 0, now = 0; in __dualdiv_get_setting() local 75 now = __dualdiv_param_to_rate(parent_rate, &table[i]); in __dualdiv_get_setting() 78 if (now == rate) { in __dualdiv_get_setting() 80 } else if (abs(now - rate) < abs(best - rate)) { in __dualdiv_get_setting() 81 best = now; in __dualdiv_get_setting()
|
D | sclk-div.c | 55 unsigned long maxdiv, now, parent_now; in sclk_div_bestdiv() local 82 now = DIV_ROUND_UP_ULL((u64)parent_now, i); in sclk_div_bestdiv() 84 if (abs(rate - now) < abs(rate - best)) { in sclk_div_bestdiv() 86 best = now; in sclk_div_bestdiv()
|
/drivers/infiniband/hw/hfi1/ |
D | aspm.c | 134 ktime_t now, prev; in __aspm_ctx_disable() local 142 now = ktime_get(); in __aspm_ctx_disable() 143 rcd->aspm_ts_last_intr = now; in __aspm_ctx_disable() 146 close_interrupts = ktime_to_ns(ktime_sub(now, prev)) < ASPM_TRIGGER_NS; in __aspm_ctx_disable() 149 restart_timer = ktime_to_ns(ktime_sub(now, rcd->aspm_ts_timer_sched)) > in __aspm_ctx_disable() 163 rcd->aspm_ts_timer_sched = now; in __aspm_ctx_disable()
|
/drivers/gpu/drm/lima/ |
D | lima_devfreq.c | 21 ktime_t now, last; in lima_devfreq_update_utilization() local 23 now = ktime_get(); in lima_devfreq_update_utilization() 27 devfreq->busy_time += ktime_sub(now, last); in lima_devfreq_update_utilization() 29 devfreq->idle_time += ktime_sub(now, last); in lima_devfreq_update_utilization() 31 devfreq->time_last_update = now; in lima_devfreq_update_utilization()
|
/drivers/gpu/drm/sti/ |
D | sti_plane.c | 46 ktime_t now; in sti_plane_update_fps() local 50 now = ktime_get(); in sti_plane_update_fps() 63 ms_since_last = ktime_to_ms(ktime_sub(now, fps->last_timestamp)); in sti_plane_update_fps() 69 fps->last_timestamp = now; in sti_plane_update_fps()
|
/drivers/gpu/drm/panfrost/ |
D | panfrost_devfreq.c | 15 ktime_t now, last; in panfrost_devfreq_update_utilization() local 17 now = ktime_get(); in panfrost_devfreq_update_utilization() 21 pfdevfreq->busy_time += ktime_sub(now, last); in panfrost_devfreq_update_utilization() 23 pfdevfreq->idle_time += ktime_sub(now, last); in panfrost_devfreq_update_utilization() 25 pfdevfreq->time_last_update = now; in panfrost_devfreq_update_utilization()
|
/drivers/thermal/intel/ |
D | therm_throt.c | 243 u64 now = get_jiffies_64(); in throttle_active_work() local 260 if (time_before64(now, state->next_check) && in throttle_active_work() 264 state->next_check = now + CHECK_INTERVAL; in throttle_active_work() 317 u64 now; in therm_throt_process() local 320 now = get_jiffies_64(); in therm_throt_process() 361 state->last_interrupt_time = now; in therm_throt_process() 366 throttle_time = jiffies_delta_to_msecs(now - state->last_interrupt_time); in therm_throt_process() 379 u64 now = get_jiffies_64(); in thresh_event_valid() local 388 if (time_before64(now, state->next_check)) in thresh_event_valid() 391 state->next_check = now + CHECK_INTERVAL; in thresh_event_valid()
|
/drivers/clk/sunxi-ng/ |
D | ccu_mp.c | 47 unsigned long parent_rate, now; in ccu_mp_find_best_with_parent_adj() local 80 now = parent_rate / div; in ccu_mp_find_best_with_parent_adj() 82 if (now <= rate && now > best_rate) { in ccu_mp_find_best_with_parent_adj() 83 best_rate = now; in ccu_mp_find_best_with_parent_adj() 86 if (now == rate) in ccu_mp_find_best_with_parent_adj()
|
/drivers/macintosh/ |
D | via-cuda.c | 778 u32 now; in cuda_get_time() local 786 now = (req.reply[3] << 24) + (req.reply[4] << 16) + in cuda_get_time() 788 return (time64_t)now - RTC_OFFSET; in cuda_get_time() 793 u32 now; in cuda_set_rtc_time() local 796 now = lower_32_bits(rtc_tm_to_time64(tm) + RTC_OFFSET); in cuda_set_rtc_time() 798 now >> 24, now >> 16, now >> 8, now) < 0) in cuda_set_rtc_time()
|
/drivers/misc/ibmasm/ |
D | ibmasm.h | 43 struct timespec64 now; in get_timestamp() local 45 ktime_get_real_ts64(&now); in get_timestamp() 46 sprintf(buf, "%llu.%.08lu", (long long)now.tv_sec, in get_timestamp() 47 now.tv_nsec / NSEC_PER_USEC); in get_timestamp()
|
/drivers/net/wireless/broadcom/b43/ |
D | debugfs.c | 407 static unsigned long calc_expire_secs(unsigned long now, in calc_expire_secs() argument 413 if (time_after(now, expire)) in calc_expire_secs() 415 if (expire < now) { in calc_expire_secs() 418 now -= MAX_JIFFY_OFFSET; in calc_expire_secs() 420 B43_WARN_ON(expire < now); in calc_expire_secs() 422 return (expire - now) / HZ; in calc_expire_secs() 432 unsigned long now = jiffies; in loctls_read_file() local 446 calc_expire_secs(now, lo->txctl_measured_time, in loctls_read_file() 451 calc_expire_secs(now, lo->pwr_vec_read_time, in loctls_read_file() 465 calc_expire_secs(now, cal->calib_time, in loctls_read_file()
|
/drivers/input/ |
D | ff-memless.c | 115 unsigned long now = jiffies; in ml_schedule_timer() local 135 if (time_before_eq(now, next_at) && in ml_schedule_timer() 156 unsigned long now = jiffies; in apply_envelope() local 163 time_before(now, in apply_envelope() 167 time_from_level = jiffies_to_msecs(now - state->play_at); in apply_envelope() 172 time_after(now, in apply_envelope() 174 time_before(now, state->stop_at)) { in apply_envelope() 175 time_from_level = jiffies_to_msecs(state->stop_at - now); in apply_envelope()
|
/drivers/gpu/drm/amd/amdgpu/ |
D | mxgpu_nv.c | 100 uint64_t timeout, now; in xgpu_nv_poll_msg() local 102 now = (uint64_t)ktime_to_ms(ktime_get()); in xgpu_nv_poll_msg() 103 timeout = now + NV_MAILBOX_POLL_MSG_TIMEDOUT; in xgpu_nv_poll_msg() 111 now = (uint64_t)ktime_to_ms(ktime_get()); in xgpu_nv_poll_msg() 112 } while (timeout > now); in xgpu_nv_poll_msg()
|