/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | test_tc_edt.c | 34 uint64_t tstamp, next_tstamp = 0; in throttle_flow() local 39 tstamp = skb->tstamp; in throttle_flow() 40 if (tstamp < now) in throttle_flow() 41 tstamp = now; in throttle_flow() 44 if (next_tstamp <= tstamp) { in throttle_flow() 45 if (bpf_map_update_elem(&flow_map, &key, &tstamp, BPF_ANY)) in throttle_flow() 60 skb->tstamp = next_tstamp; in throttle_flow()
|
H A D | test_tc_dtime.c | 226 skb->tstamp) in egress_host() 232 skb->tstamp) in egress_host() 238 skb->tstamp = EGRESS_ENDHOST_MAGIC; in egress_host() 256 skb->tstamp == EGRESS_FWDNS_MAGIC) in ingress_host() 279 if (skb->tstamp == EGRESS_ENDHOST_MAGIC) in ingress_fwdns_prio100() 283 skb->tstamp = 0; in ingress_fwdns_prio100() 303 if (skb->tstamp == INGRESS_FWDNS_MAGIC) in egress_fwdns_prio100() 309 skb->tstamp = 0; in egress_fwdns_prio100() 332 skb->tstamp != expected_dtime) in ingress_fwdns_prio101() 342 skb->tstamp = INGRESS_FWDNS_MAGIC; in ingress_fwdns_prio101() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igc/ |
H A D | igc_ptp.c | 569 tstamp->skb = NULL; in igc_ptp_clear_tx_tstamp() 671 tstamp->skb = NULL; in igc_ptp_tx_timeout() 690 if (!tstamp->skb) in igc_ptp_tx_hang() 717 skb = tstamp->skb; in igc_ptp_tx_reg_to_stamp() 742 tstamp->skb = NULL; in igc_ptp_tx_reg_to_stamp() 811 if (!(tstamp->mask & mask)) in igc_ptp_tx_hwtstamp() 814 regval = rd32(tstamp->regl); in igc_ptp_tx_hwtstamp() 1054 tstamp->regl = IGC_TXSTMPL_0; in igc_ptp_init() 1055 tstamp->regh = IGC_TXSTMPH_0; in igc_ptp_init() 1056 tstamp->flags = 0; in igc_ptp_init() [all …]
|
/openbmc/phosphor-pid-control/experiments/ |
H A D | drive.cpp | 31 using tstamp = std::chrono::high_resolution_clock::time_point; typedef 47 int64_t getAverage(std::tuple<tstamp, int64_t, int64_t>& values) in getAverage() argument 73 std::vector<std::tuple<tstamp, int64_t, int64_t>>& series, in driveGoal() argument 92 tstamp t1 = std::chrono::high_resolution_clock::now(); in driveGoal() 105 std::tuple<tstamp, int64_t, int64_t> nm2 = series.at(seriesCnt - 3); in driveGoal() 146 tstamp t0 = std::get<0>(s0); in driveTime() 157 tstamp t1 = std::chrono::high_resolution_clock::now(); in driveTime() 177 std::vector<std::tuple<tstamp, int64_t, int64_t>> series; in driveMain() 214 tstamp t1 = std::chrono::high_resolution_clock::now(); in driveMain() 247 tstamp tp = t1; in driveMain() [all …]
|
/openbmc/linux/include/linux/dsa/ |
H A D | ksz_common.h | 18 static inline ktime_t ksz_decode_tstamp(u32 tstamp) in ksz_decode_tstamp() argument 20 u64 ns = FIELD_GET(KSZ_TSTAMP_SEC_MASK, tstamp) * NSEC_PER_SEC + in ksz_decode_tstamp() 21 FIELD_GET(KSZ_TSTAMP_NSEC_MASK, tstamp); in ksz_decode_tstamp() 41 u32 tstamp; member
|
H A D | sja1105.h | 53 enum sja1110_meta_tstamp dir, u64 tstamp); 58 u64 tstamp; member
|
/openbmc/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | otx2_ptp.c | 104 u64 tstamp; in otx2_ptp_hw_gettime() local 106 tstamp = otx2_ptp_get_clock(ptp); in otx2_ptp_hw_gettime() 108 *ts = ns_to_timespec64(tstamp); in otx2_ptp_hw_gettime() 247 u64 tstamp; in otx2_ptp_tc_gettime() local 250 tstamp = timecounter_read(&ptp->time_counter); in otx2_ptp_tc_gettime() 252 *ts = ns_to_timespec64(tstamp); in otx2_ptp_tc_gettime() 290 return tstamp; in otx2_ptp_hw_tstamp2time() 326 u64 tstamp; in otx2_sync_tstamp() local 329 tstamp = otx2_ptp_get_clock(ptp); in otx2_sync_tstamp() 332 ptp->tstamp = ptp->ptp_tstamp2nsec(&ptp->time_counter, tstamp); in otx2_sync_tstamp() [all …]
|
/openbmc/linux/drivers/net/ethernet/cavium/common/ |
H A D | cavium_ptp.h | 32 static inline u64 cavium_ptp_tstamp2time(struct cavium_ptp *ptp, u64 tstamp) in cavium_ptp_tstamp2time() argument 38 ret = timecounter_cyc2time(&ptp->time_counter, tstamp); in cavium_ptp_tstamp2time() 58 static inline u64 cavium_ptp_tstamp2time(struct cavium_ptp *ptp, u64 tstamp) in cavium_ptp_tstamp2time() argument
|
/openbmc/linux/tools/perf/util/bpf_skel/ |
H A D | lock_contention.bpf.c | 43 } tstamp SEC(".maps"); 284 pelem = bpf_map_lookup_elem(&tstamp, &pid); in contention_begin() 291 bpf_map_update_elem(&tstamp, &pid, &zero, BPF_ANY); in contention_begin() 292 pelem = bpf_map_lookup_elem(&tstamp, &pid); in contention_begin() 346 pelem = bpf_map_lookup_elem(&tstamp, &pid); in contention_end() 352 bpf_map_delete_elem(&tstamp, &pid); in contention_end() 382 bpf_map_delete_elem(&tstamp, &pid); in contention_end() 405 bpf_map_delete_elem(&tstamp, &pid); in contention_end() 418 bpf_map_delete_elem(&tstamp, &pid); in contention_end()
|
/openbmc/linux/sound/soc/intel/atom/sst/ |
H A D | sst_drv_interface.c | 255 addr = ((void __iomem *)(ctx->mailbox + ctx->tstamp)) + in sst_cdev_ack() 342 struct snd_compr_tstamp *tstamp) in sst_cdev_tstamp() argument 349 addr = (void __iomem *)(ctx->mailbox + ctx->tstamp) + in sst_cdev_tstamp() 359 tstamp->copied_total = fw_tstamp.ring_buffer_counter; in sst_cdev_tstamp() 360 tstamp->pcm_frames = fw_tstamp.frames_decoded; in sst_cdev_tstamp() 363 tstamp->sampling_rate = fw_tstamp.sampling_frequency; in sst_cdev_tstamp() 365 dev_dbg(dev, "PCM = %u\n", tstamp->pcm_io_frames); in sst_cdev_tstamp() 367 str_id, tstamp->copied_total, tstamp->pcm_frames); in sst_cdev_tstamp() 368 dev_dbg(dev, "rendered %d\n", tstamp->pcm_io_frames); in sst_cdev_tstamp() 529 addr = (void __iomem *)(ctx->mailbox + ctx->tstamp) + in sst_read_timestamp() [all …]
|
/openbmc/linux/net/sched/ |
H A D | sch_etf.c | 78 ktime_t txtime = nskb->tstamp; in is_packet_valid() 131 next = ktime_sub_ns(skb->tstamp, q->delta); in reset_watchdog() 139 ktime_t txtime = skb->tstamp; in report_sock_error() 167 ktime_t txtime = nskb->tstamp; in etf_enqueue_timesortedlist() 181 if (ktime_compare(txtime, skb->tstamp) >= 0) { in etf_enqueue_timesortedlist() 208 if (ktime_after(skb->tstamp, now)) in timesortedlist_drop() 248 q->last = skb->tstamp; in timesortedlist_remove() 266 if (ktime_before(skb->tstamp, now)) { in etf_dequeue_timesortedlist() 277 skb->tstamp = now; in etf_dequeue_timesortedlist() 281 next = ktime_sub_ns(skb->tstamp, q->delta); in etf_dequeue_timesortedlist()
|
/openbmc/linux/sound/pci/lola/ |
H A D | lola_pcm.c | 41 unsigned int tstamp = lola_get_lrc(chip) >> 8; in lola_get_tstamp() local 45 tstamp -= tstamp % chip->granularity; in lola_get_tstamp() 47 return tstamp << 8; in lola_get_tstamp() 61 unsigned int tstamp) in lola_stream_start() argument 69 tstamp); in lola_stream_start() 73 unsigned int tstamp) in lola_stream_stop() argument 79 tstamp); in lola_stream_stop() 509 unsigned int tstamp; in lola_pcm_trigger() local 532 tstamp = lola_get_tstamp(chip, !sync_streams); in lola_pcm_trigger() 539 lola_stream_start(chip, str, tstamp); in lola_pcm_trigger() [all …]
|
/openbmc/linux/net/netfilter/ |
H A D | nf_conntrack_timestamp.c | 19 module_param_named(tstamp, nf_ct_tstamp, bool, 0644); 20 MODULE_PARM_DESC(tstamp, "Enable connection tracking flow timestamping.");
|
/openbmc/linux/sound/soc/intel/atom/ |
H A D | sst-mfld-platform-compress.c | 205 struct snd_compr_tstamp *tstamp) in sst_platform_compr_pointer() argument 210 stream->compr_ops->tstamp(sst->dev, stream->id, tstamp); in sst_platform_compr_pointer() 211 tstamp->byte_offset = tstamp->copied_total % in sst_platform_compr_pointer() 213 pr_debug("calc bytes offset/copied bytes as %d\n", tstamp->byte_offset); in sst_platform_compr_pointer()
|
/openbmc/linux/tools/testing/selftests/alsa/ |
H A D | pcm-test.c | 58 void timestamp_now(timestamp_t *tstamp) in timestamp_now() argument 60 if (clock_gettime(CLOCK_MONOTONIC_RAW, tstamp)) in timestamp_now() 64 long long timestamp_diff_ms(timestamp_t *tstamp) in timestamp_diff_ms() argument 68 if (tstamp->tv_nsec > now.tv_nsec) { in timestamp_diff_ms() 69 diff.tv_sec = now.tv_sec - tstamp->tv_sec - 1; in timestamp_diff_ms() 70 diff.tv_nsec = (now.tv_nsec + 1000000000L) - tstamp->tv_nsec; in timestamp_diff_ms() 72 diff.tv_sec = now.tv_sec - tstamp->tv_sec; in timestamp_diff_ms() 73 diff.tv_nsec = now.tv_nsec - tstamp->tv_nsec; in timestamp_diff_ms() 275 timestamp_t tstamp; in test_pcm_time() local 446 timestamp_now(&tstamp); in test_pcm_time() [all …]
|
/openbmc/linux/net/dsa/ |
H A D | tag_sja1105.c | 95 u64 tstamp; member 117 packing(buf, &meta->tstamp, 31, 0, 4, UNPACK, 0); in sja1105_meta_unpack() 353 SJA1105_SKB_CB(skb)->tstamp = meta->tstamp; in sja1105_transfer_meta() 595 u64 tstamp; in sja1110_rcv_meta() local 600 tstamp = be64_to_cpu(*(__be64 *)(buf + 2)); in sja1110_rcv_meta() 603 tstamp); in sja1110_rcv_meta() 639 u64 *tstamp = &SJA1105_SKB_CB(skb)->tstamp; in sja1110_rcv_inband_control_extension() local 645 packing(rx_trailer, tstamp, 63, 0, 8, UNPACK, 0); in sja1110_rcv_inband_control_extension()
|
/openbmc/linux/drivers/platform/chrome/ |
H A D | cros_usbpd_logger.c | 81 ktime_t tstamp) in cros_usbpd_print_log_entry() argument 94 tstamp = ktime_sub_us(tstamp, r->timestamp << PD_LOG_TIMESTAMP_SHIFT); in cros_usbpd_print_log_entry() 95 rt = rtc_ktime_to_tm(tstamp); in cros_usbpd_print_log_entry() 161 div_s64_rem(ktime_to_ms(tstamp), MSEC_PER_SEC, &rem); in cros_usbpd_print_log_entry()
|
/openbmc/linux/net/rxrpc/ |
H A D | io_thread.c | 35 if (skb->tstamp == 0) in rxrpc_encap_rcv() 36 skb->tstamp = ktime_get_real(); in rxrpc_encap_rcv() 44 skb->tstamp = ktime_add_ms(skb->tstamp, rxrpc_inject_rx_delay); in rxrpc_encap_rcv() 501 if (ktime_before(now, skb->tstamp)) in rxrpc_io_thread() 534 ktime_t tstamp = skb->tstamp; in rxrpc_io_thread() local 536 s64 delay_ns = ktime_to_ns(ktime_sub(tstamp, now)); in rxrpc_io_thread()
|
/openbmc/linux/drivers/net/wireless/ath/ath9k/ |
H A D | dynack.c | 159 ack_ts = da->ack_rbf.tstamp[da->ack_rbf.h_rb]; in ath_dynack_compute_to() 166 ack_ts, st_ts->tstamp, st_ts->dur, in ath_dynack_compute_to() 169 if (ack_ts > st_ts->tstamp + st_ts->dur) { in ath_dynack_compute_to() 170 ackto = ack_ts - st_ts->tstamp - st_ts->dur; in ath_dynack_compute_to() 248 da->st_rbf.ts[da->st_rbf.t_rb].tstamp = ts->ts_tstamp; in ath_dynack_sample_tx_ts() 304 da->ack_rbf.tstamp[da->ack_rbf.t_rb] = ts; in ath_dynack_sample_ack_ts()
|
/openbmc/linux/tools/testing/selftests/net/ |
H A D | rxtimestamp.c | 30 bool tstamp; member 72 { .tstamp = true } 108 { .tstamp = true, .swtstamp = true } 145 if (t->expected.tstamp) in print_test_case() 214 actual.tstamp = true; in do_recv() 243 VALIDATE(tstamp); in do_recv()
|
/openbmc/linux/sound/firewire/ |
H A D | amdtp-stream.c | 861 static inline u32 compute_ohci_iso_ctx_cycle_count(u32 tstamp) in compute_ohci_iso_ctx_cycle_count() argument 863 return (((tstamp >> 13) & 0x07) * CYCLES_PER_SECOND) + (tstamp & 0x1fff); in compute_ohci_iso_ctx_cycle_count() 868 u32 tstamp = be32_to_cpu(ctx_header_tstamp) & HEADER_TSTAMP_MASK; in compute_ohci_cycle_count() local 869 return compute_ohci_iso_ctx_cycle_count(tstamp); in compute_ohci_cycle_count() 1276 skip_rx_packets(context, tstamp, length, ctx_header, private_data); in process_rx_packets_intermediately() 1408 drop_tx_packets(context, tstamp, length, ctx_header, s); in process_tx_packets_intermediately() 1420 process_tx_packets(context, tstamp, header_length, ctx_header, s); in process_tx_packets_intermediately() 1481 drop_tx_packets(context, tstamp, header_length, header, s); in drop_tx_packets_initially() 1571 skip_rx_packets(context, tstamp, header_length, header, private_data); in irq_target_callback_skip() 1622 u32 tstamp, size_t header_length, in amdtp_stream_first_callback() argument [all …]
|
/openbmc/linux/sound/soc/sof/amd/ |
H A D | acp-probes.c | 111 struct snd_compr_tstamp *tstamp, in acp_probes_compr_pointer() argument 118 tstamp->copied_total = stream->cstream_posn; in acp_probes_compr_pointer() 119 tstamp->sampling_rate = snd_pcm_rate_bit_to_rate(pstream->rates); in acp_probes_compr_pointer()
|
/openbmc/linux/sound/core/ |
H A D | timer.c | 502 struct timespec64 tstamp; in snd_timer_notify1() local 505 ktime_get_ts64(&tstamp); in snd_timer_notify1() 507 ktime_get_real_ts64(&tstamp); in snd_timer_notify1() 1389 tu->tstamp = *tstamp; in snd_timer_user_ccallback() 1394 r1.tstamp_sec = tstamp->tv_sec; in snd_timer_user_ccallback() 1418 struct timespec64 tstamp; in snd_timer_user_tinterrupt() local 1422 memset(&tstamp, 0, sizeof(tstamp)); in snd_timer_user_tinterrupt() 1431 ktime_get_ts64(&tstamp); in snd_timer_user_tinterrupt() 1433 ktime_get_real_ts64(&tstamp); in snd_timer_user_tinterrupt() 1438 r1.tstamp_sec = tstamp.tv_sec; in snd_timer_user_tinterrupt() [all …]
|
/openbmc/linux/sound/soc/sof/intel/ |
H A D | hda-probes.c | 115 struct snd_compr_tstamp *tstamp, in hda_probes_compr_pointer() argument 122 tstamp->copied_total = hdac_stream(hext_stream)->curr_pos; in hda_probes_compr_pointer() 123 tstamp->sampling_rate = snd_pcm_rate_bit_to_rate(pstream->rates); in hda_probes_compr_pointer()
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | time_tai.c | 25 .tstamp = 0, in test_time_tai() 51 ts1 = skb.tstamp; in test_time_tai()
|