/linux-master/include/linux/ |
H A D | posix-clock.h | 44 int (*clock_gettime)(struct posix_clock *pc, struct timespec64 *ts); 46 int (*clock_getres) (struct posix_clock *pc, struct timespec64 *ts); 49 const struct timespec64 *ts);
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | time_tai.c | 15 static __u64 ts_to_ns(const struct timespec *ts) argument 17 return ts->tv_sec * NSEC_PER_SEC + ts->tv_nsec;
|
/linux-master/tools/testing/selftests/damon/ |
H A D | debugfs_target_ids_read_before_terminate_race.c | 57 static inline uint64_t ts_to_ms(struct timespec *ts) argument 59 return (uint64_t)ts->tv_sec * 1000 + (uint64_t)ts->tv_nsec / 1000000;
|
/linux-master/tools/testing/selftests/ptp/ |
H A D | testptp.c | 160 struct timespec ts; local 373 if (clock_gettime(clkid, &ts)) { 377 ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); 382 clock_gettime(CLOCK_REALTIME, &ts); 383 if (clock_settime(clkid, &ts)) { 391 clock_gettime(clkid, &ts); 392 if (clock_settime(CLOCK_REALTIME, &ts)) { 400 ts [all...] |
/linux-master/drivers/ptp/ |
H A D | ptp_chardev.c | 175 struct timespec64 ts; local 335 ts = ktime_to_timespec64(xtstamp.device); 336 precise_offset.device.sec = ts.tv_sec; 337 precise_offset.device.nsec = ts.tv_nsec; 338 ts = ktime_to_timespec64(xtstamp.sys_realtime); 339 precise_offset.sys_realtime.sec = ts.tv_sec; 340 precise_offset.sys_realtime.nsec = ts.tv_nsec; 341 ts = ktime_to_timespec64(xtstamp.sys_monoraw); 342 precise_offset.sys_monoraw.sec = ts.tv_sec; 343 precise_offset.sys_monoraw.nsec = ts [all...] |
H A D | ptp_ines.c | 171 struct ines_timestamp *ts, struct device *dev); 174 static bool ines_timestamp_expired(struct ines_timestamp *ts); 257 struct ines_timestamp *ts; local 267 ts = list_entry(this, struct ines_timestamp, list); 268 if (ines_timestamp_expired(ts)) { 269 list_del_init(&ts->list); 270 list_add(&ts->list, &port->pool); 273 if (ines_match(skb, type, ts, port->clock->dev)) { 274 ns = ts->sec * 1000000000ULL + ts 289 struct ines_timestamp ts; local 429 ines_match(struct sk_buff *skb, unsigned int ptp_class, struct ines_timestamp *ts, struct device *dev) argument 497 struct ines_timestamp *ts; local 553 ines_timestamp_expired(struct ines_timestamp *ts) argument [all...] |
H A D | ptp_vclock.c | 73 struct timespec64 *ts) 82 *ts = ns_to_timespec64(ns); 88 struct timespec64 *ts, 106 *ts = ns_to_timespec64(ns); 112 const struct timespec64 *ts) 115 u64 ns = timespec64_to_ns(ts); 150 struct timespec64 ts; local 152 ptp_vclock_gettime(&vclock->info, &ts); 171 struct timespec64 ts = {}; local 173 ptp->info->getcycles64(ptp->info, &ts); 72 ptp_vclock_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) argument 87 ptp_vclock_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts, struct ptp_system_timestamp *sts) argument 111 ptp_vclock_settime(struct ptp_clock_info *ptp, const struct timespec64 *ts) argument [all...] |
H A D | ptp_mock.c | 77 const struct timespec64 *ts) 80 u64 ns = timespec64_to_ns(ts); 89 static int mock_phc_gettime64(struct ptp_clock_info *info, struct timespec64 *ts) argument 98 *ts = ns_to_timespec64(ns); 105 struct timespec64 ts; local 107 mock_phc_gettime64(info, &ts); 76 mock_phc_settime64(struct ptp_clock_info *info, const struct timespec64 *ts) argument
|
/linux-master/drivers/media/cec/core/ |
H A D | cec-pin.c | 332 pin->ts = ns_to_ktime(0); 370 static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts) argument 415 pin->work_tx_ts = ts; 442 pin->work_tx_ts = ts; 456 pin->work_tx_ts = ts; 474 pin->work_tx_ts = ts; 485 pin->work_tx_ts = ts; 578 pin->work_tx_ts = ts; 587 pin->ts = ktime_sub_us(ts, CEC_TIM_DATA_BIT_SAMPL 652 cec_pin_rx_states(struct cec_pin *pin, ktime_t ts) argument 846 ktime_t ts; local [all...] |
/linux-master/drivers/net/wireless/ath/ath11k/ |
H A D | dp_tx.c | 317 struct ath11k_dp_htt_wbm_tx_status *ts) 327 msdu = idr_remove(&tx_ring->txbuf_idr, ts->msdu_id); 332 ts->msdu_id); 353 if (ts->acked) { 357 ts->ack_rssi; 366 peer = ath11k_peer_find_by_id(ab, ts->peer_id); 370 ts->peer_id); 390 struct ath11k_dp_htt_wbm_tx_status ts = {0}; local 401 ts.acked = (wbm_status == HAL_WBM_REL_HTT_TX_COMP_STATUS_OK); 402 ts 315 ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab, struct dp_tx_ring *tx_ring, struct ath11k_dp_htt_wbm_tx_status *ts) argument 430 ath11k_dp_tx_cache_peer_stats(struct ath11k *ar, struct sk_buff *msdu, struct hal_tx_status *ts) argument 447 ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts) argument 546 ath11k_dp_tx_complete_msdu(struct ath11k *ar, struct sk_buff *msdu, struct hal_tx_status *ts) argument 647 ath11k_dp_tx_status_parse(struct ath11k_base *ab, struct hal_wbm_release_ring *desc, struct hal_tx_status *ts) argument 685 struct hal_tx_status ts = { 0 }; local [all...] |
/linux-master/drivers/net/wireless/ath/ath5k/ |
H A D | trace.h | 67 struct ath5k_txq *q, struct ath5k_tx_status *ts), 69 TP_ARGS(priv, skb, q, ts), 84 __entry->ts_status = ts->ts_status; 85 __entry->ts_rssi = ts->ts_rssi; 86 __entry->ts_antenna = ts->ts_antenna;
|
/linux-master/drivers/rtc/ |
H A D | lib.c | 189 struct timespec64 ts; local 192 ts = ktime_to_timespec64(kt); 194 if (ts.tv_nsec) 195 ts.tv_sec++; 196 rtc_time64_to_tm(ts.tv_sec, &ret);
|
/linux-master/tools/testing/selftests/timers/ |
H A D | alarmtimer-suspend.c | 100 struct timespec ts; local 102 clock_gettime(alarm_clock_id, &ts); 105 delta_ns = timespec_sub(start_time, ts); 108 printf("ALARM(%i): %ld:%ld latency: %lld ns ", alarmcount, ts.tv_sec, 109 ts.tv_nsec, delta_ns);
|
H A D | adjtick.c | 44 unsigned long long ts_to_nsec(struct timespec ts) argument 46 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; 51 struct timespec ts; local 53 ts.tv_sec = ns/NSEC_PER_SEC; 54 ts.tv_nsec = ns%NSEC_PER_SEC; 56 return ts;
|
/linux-master/fs/smb/server/ |
H A D | misc.c | 344 struct timespec64 ts; local 357 ts.tv_nsec = do_div(abs_t, 10000000) * 100; 358 ts.tv_nsec = -ts.tv_nsec; 359 ts.tv_sec = -abs_t; 362 ts.tv_nsec = do_div(abs_t, 10000000) * 100; 363 ts.tv_sec = abs_t; 366 return ts; 378 struct timespec64 ts; local 380 ktime_get_real_ts64(&ts); [all...] |
/linux-master/drivers/hte/ |
H A D | hte-tegra194-test.c | 47 * HW timestamp(<line id>:<ts seq number>): <timestamp>, edge: <edge>. 61 static enum hte_return process_hw_ts(struct hte_ts_data *ts, void *p) argument 66 if (!ts || !p) 69 if (ts->raw_level < 0) 73 desc->attr.line_id, ts->seq, ts->tsc, 74 (ts->raw_level >= 0) ? ((ts->raw_level == 0) ?
|
/linux-master/drivers/net/ethernet/microchip/sparx5/ |
H A D | sparx5_ptp.c | 273 struct timespec64 *ts, 290 ts->tv_sec = spx5_rd(sparx5, PTP_PTP_TOD_SEC_LSB(TOD_ACC_PIN)); 293 ts->tv_nsec = nsec; 295 /* Sec has incremented since the ts was registered */ 297 ts->tv_sec--; 311 struct timespec64 ts; local 327 /* Retrieve the ts Tx port */ 366 /* Next ts */ 379 sparx5_get_hwtimestamp(sparx5, &ts, delay); 382 shhwtstamps.hwtstamp = ktime_set(ts 272 sparx5_get_hwtimestamp(struct sparx5 *sparx5, struct timespec64 *ts, u32 nsec) argument 438 sparx5_ptp_settime64(struct ptp_clock_info *ptp, const struct timespec64 *ts) argument 477 sparx5_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts) argument 548 struct timespec64 ts; local 666 struct timespec64 ts; local [all...] |
/linux-master/io_uring/ |
H A D | timeout.c | 33 struct timespec64 ts; member in struct:io_timeout_rem 68 static void io_timeout_complete(struct io_kiocb *req, struct io_tw_state *ts) argument 76 filled = io_fill_cqe_req_aux(req, ts->locked, -ETIME, 83 hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), data->mode); 89 io_req_task_complete(req, ts); 144 static void io_req_tw_fail_links(struct io_kiocb *link, struct io_tw_state *ts) argument 146 io_tw_lock(link->ctx, ts); 155 io_req_task_complete(link, ts); 302 static void io_req_task_link_timeout(struct io_kiocb *req, struct io_tw_state *ts) argument 304 unsigned issue_flags = ts [all...] |
/linux-master/sound/soc/meson/ |
H A D | axg-tdm-interface.c | 150 struct axg_tdm_stream *ts = local 154 if (!axg_tdm_slots_total(ts->mask)) { 187 struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream); local 195 if (axg_tdm_slots_total(ts->mask) < channels) { 206 ts->physical_width = params_physical_width(params); 207 ts->width = params_width(params); 208 ts->channels = params_channels(params); 355 struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream); local 358 axg_tdm_stream_stop(ts); 366 struct axg_tdm_stream *ts local 377 struct axg_tdm_stream *ts = snd_soc_dai_dma_data_get(dai, stream); local 392 struct axg_tdm_stream *ts; local [all...] |
H A D | axg-tdmout.c | 111 struct axg_tdm_stream *ts) 116 switch (ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { 128 ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK); 135 val |= TDMOUT_CTRL0_BITNUM(ts->iface->slot_width - 1); 138 val |= TDMOUT_CTRL0_SLOTNUM(ts->iface->slots - 1); 146 val = TDMOUT_CTRL1_MSB_POS(ts->width - 1); 149 switch (ts->physical_width) { 164 ts->physical_width); 169 if (axg_tdm_lrclk_invert(ts->iface->fmt)) 179 return axg_tdm_formatter_set_channel_masks(map, ts, TDMOUT_MASK 109 axg_tdmout_prepare(struct regmap *map, const struct axg_tdm_formatter_hw *quirks, struct axg_tdm_stream *ts) argument [all...] |
/linux-master/drivers/input/touchscreen/ |
H A D | egalax_ts.c | 66 struct egalax_ts *ts = dev_id; local 67 struct input_dev *input_dev = ts->input_dev; 68 struct i2c_client *client = ts->client; 160 struct egalax_ts *ts; local 164 ts = devm_kzalloc(&client->dev, sizeof(struct egalax_ts), GFP_KERNEL); 165 if (!ts) { 176 ts->client = client; 177 ts->input_dev = input_dev; 207 IRQF_ONESHOT, "egalax_ts", ts); 213 error = input_register_device(ts [all...] |
/linux-master/drivers/net/phy/ |
H A D | bcm-phy-ptp.c | 178 struct timespec64 *ts) 192 ts->tv_sec = (hb[3] << 16) | hb[2]; 193 ts->tv_nsec = (hb[1] << 16) | hb[0]; 219 struct timespec64 *ts, 238 bcm_ptp_get_framesync_ts(phydev, ts); 249 struct timespec64 *ts, 256 err = bcm_ptp_framesync_ts(priv->phydev, sts, ts, priv->nse_ctrl); 263 const struct timespec64 *ts) 272 bcm_phy_write_exp(phydev, TIME_CODE_0, ts->tv_nsec); 273 bcm_phy_write_exp(phydev, TIME_CODE_1, ts 177 bcm_ptp_get_framesync_ts(struct phy_device *phydev, struct timespec64 *ts) argument 217 bcm_ptp_framesync_ts(struct phy_device *phydev, struct ptp_system_timestamp *sts, struct timespec64 *ts, u16 orig_ctrl) argument 248 bcm_ptp_gettimex(struct ptp_clock_info *info, struct timespec64 *ts, struct ptp_system_timestamp *sts) argument 262 bcm_ptp_settime_locked(struct bcm_ptp_private *priv, const struct timespec64 *ts) argument 295 bcm_ptp_settime(struct ptp_clock_info *info, const struct timespec64 *ts) argument 311 struct timespec64 ts; local 422 u16 ts[4], reg; local 541 struct timespec64 ts; local 638 struct timespec64 ts; local [all...] |
/linux-master/kernel/time/ |
H A D | timekeeping.c | 131 struct timespec64 ts; local 133 ts.tv_sec = tk->xtime_sec; 134 ts.tv_nsec = (long)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift); 135 return ts; 138 static void tk_set_xtime(struct timekeeper *tk, const struct timespec64 *ts) argument 140 tk->xtime_sec = ts->tv_sec; 141 tk->tkr_mono.xtime_nsec = (u64)ts->tv_nsec << tk->tkr_mono.shift; 144 static void tk_xtime_add(struct timekeeper *tk, const struct timespec64 *ts) argument 146 tk->xtime_sec += ts->tv_sec; 147 tk->tkr_mono.xtime_nsec += (u64)ts 815 ktime_get_real_ts64(struct timespec64 *ts) argument 969 ktime_get_ts64(struct timespec64 *ts) argument 1120 adjust_historical_crosststamp(struct system_time_snapshot *history, u64 partial_history_cycles, u64 total_history_cycles, bool discontinuity, struct system_device_crosststamp *ts) argument 1187 timestamp_in_interval(u64 start, u64 end, u64 ts) argument 1313 do_settimeofday64(const struct timespec64 *ts) argument 1363 timekeeping_inject_offset(const struct timespec64 *ts) argument 1518 ktime_get_raw_ts64(struct timespec64 *ts) argument 1585 read_persistent_clock64(struct timespec64 *ts) argument 2087 struct timespec64 ts; local 2247 getboottime64(struct timespec64 *ts) argument 2256 ktime_get_coarse_real_ts64(struct timespec64 *ts) argument 2269 ktime_get_coarse_ts64(struct timespec64 *ts) argument 2428 struct timespec64 ts; local [all...] |
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
H A D | clock.c | 265 const struct timespec64 *ts) 269 if (ts->tv_sec < 0 || ts->tv_sec > U32_MAX || 270 ts->tv_nsec < 0 || ts->tv_nsec > NSEC_PER_SEC) 274 MLX5_SET(mtutc_reg, in, utc_sec, ts->tv_sec); 275 MLX5_SET(mtutc_reg, in, utc_nsec, ts->tv_nsec); 280 static int mlx5_ptp_settime(struct ptp_clock_info *ptp, const struct timespec64 *ts) argument 290 int err = mlx5_ptp_settime_real_time(mdev, ts); 297 timecounter_init(&timer->tc, &timer->cycles, timespec64_to_ns(ts)); 264 mlx5_ptp_settime_real_time(struct mlx5_core_dev *mdev, const struct timespec64 *ts) argument 308 struct timespec64 ts; local 316 mlx5_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts, struct ptp_system_timestamp *sts) argument 346 struct timespec64 ts; local 528 struct timespec64 ts = {}; local 545 struct timespec64 ts; local 568 struct timespec64 ts; local 601 struct timespec64 ts; local 867 ts_next_sec(struct timespec64 *ts) argument 876 struct timespec64 ts; local 1042 struct timespec64 ts; local [all...] |
/linux-master/drivers/gpu/drm/etnaviv/ |
H A D | etnaviv_drv.h | 113 struct timespec64 ts, to = { local 118 ktime_get_ts64(&ts); 121 if (timespec64_compare(&to, &ts) <= 0) 124 ts = timespec64_sub(to, ts); 126 return timespec64_to_jiffies(&ts);
|