/linux/drivers/rtc/ |
H A D | rtc-88pm80x.c | 103 unsigned long ticks, base, data; in pm80x_rtc_read_time() local 113 ticks = base + data; in pm80x_rtc_read_time() 114 dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm80x_rtc_read_time() 115 base, data, ticks); in pm80x_rtc_read_time() 116 rtc_time64_to_tm(ticks, tm); in pm80x_rtc_read_time() 124 unsigned long ticks, base, data; in pm80x_rtc_set_time() local 126 ticks = rtc_tm_to_time64(tm); in pm80x_rtc_set_time() 132 base = ticks - data; in pm80x_rtc_set_time() 133 dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm80x_rtc_set_time() 134 base, data, ticks); in pm80x_rtc_set_time() [all …]
|
H A D | rtc-tps6586x.c | 59 unsigned long long ticks = 0; in tps6586x_rtc_read_time() local 72 ticks <<= 8; in tps6586x_rtc_read_time() 73 ticks |= buff[i]; in tps6586x_rtc_read_time() 76 seconds = ticks >> 10; in tps6586x_rtc_read_time() 85 unsigned long long ticks; in tps6586x_rtc_set_time() local 92 ticks = (unsigned long long)seconds << 10; in tps6586x_rtc_set_time() 93 buff[0] = (ticks >> 32) & 0xff; in tps6586x_rtc_set_time() 94 buff[1] = (ticks >> 24) & 0xff; in tps6586x_rtc_set_time() 95 buff[2] = (ticks >> 16) & 0xff; in tps6586x_rtc_set_time() 96 buff[3] = (ticks >> 8) & 0xff; in tps6586x_rtc_set_time() [all …]
|
H A D | rtc-88pm860x.c | 82 unsigned long ticks, base, data; in pm860x_rtc_read_time() local 94 ticks = base + data; in pm860x_rtc_read_time() 95 dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm860x_rtc_read_time() 96 base, data, ticks); in pm860x_rtc_read_time() 98 rtc_time64_to_tm(ticks, tm); in pm860x_rtc_read_time() 107 unsigned long ticks, base, data; in pm860x_rtc_set_time() local 109 ticks = rtc_tm_to_time64(tm); in pm860x_rtc_set_time() 115 base = ticks - data; in pm860x_rtc_set_time() 116 dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm860x_rtc_set_time() 117 base, data, ticks); in pm860x_rtc_set_time() [all …]
|
/linux/fs/ |
H A D | timerfd.c | 39 u64 ticks; member 69 ctx->ticks++; in timerfd_triggered() 94 * wake-up requires ctx->ticks to be non zero, therefore we increment 110 ctx->ticks++; in timerfd_clock_was_set() 201 ctx->ticks = 0; in timerfd_setup() 258 if (ctx->ticks) in timerfd_poll() 270 u64 ticks = 0; in timerfd_read_iter() local 272 if (iov_iter_count(to) < sizeof(ticks)) in timerfd_read_iter() 279 res = wait_event_interruptible_locked_irq(ctx->wqh, ctx->ticks); in timerfd_read_iter() 283 * ticks and we do not rearm the timer. Userspace must in timerfd_read_iter() [all …]
|
/linux/Documentation/timers/ |
H A D | no_hz.rst | 2 NO_HZ: Reducing Scheduling-Clock Ticks 13 (also known as "scheduling-clock ticks" or simply "ticks"): 15 1. Never omit scheduling-clock ticks (CONFIG_HZ_PERIODIC=y or 19 2. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or 23 3. Omit scheduling-clock ticks on CPUs that are either idle or that 33 Never Omit Scheduling-Clock Ticks 37 are incapable of omitting scheduling-clock ticks. It turns out that 65 Omit Scheduling-Clock Ticks For Idle CPUs 104 Omit Scheduling-Clock Ticks For CPUs With Only One Runnable Task 109 Note that omitting scheduling-clock ticks for CPUs with only one runnable [all …]
|
/linux/drivers/hwmon/ |
H A D | hih6130.c | 46 * hih6130_temp_ticks_to_millicelsius() - convert raw temperature ticks to 48 * @ticks: temperature ticks value received from sensor 50 static inline int hih6130_temp_ticks_to_millicelsius(int ticks) in hih6130_temp_ticks_to_millicelsius() argument 52 ticks = ticks >> 2; in hih6130_temp_ticks_to_millicelsius() 55 * Formula T = ( ticks / ( 2^14 - 2 ) ) * 165 -40 in hih6130_temp_ticks_to_millicelsius() 57 return (DIV_ROUND_CLOSEST(ticks * 1650, 16382) - 400) * 100; in hih6130_temp_ticks_to_millicelsius() 61 * hih6130_rh_ticks_to_per_cent_mille() - convert raw humidity ticks to 63 * @ticks: humidity ticks value received from sensor 65 static inline int hih6130_rh_ticks_to_per_cent_mille(int ticks) in hih6130_rh_ticks_to_per_cent_mille() argument 67 ticks &= ~0xC000; /* clear status bits */ in hih6130_rh_ticks_to_per_cent_mille() [all …]
|
H A D | sht21.c | 49 * sht21_temp_ticks_to_millicelsius() - convert raw temperature ticks to 51 * @ticks: temperature ticks value received from sensor 53 static inline int sht21_temp_ticks_to_millicelsius(int ticks) in sht21_temp_ticks_to_millicelsius() argument 55 ticks &= ~0x0003; /* clear status bits */ in sht21_temp_ticks_to_millicelsius() 60 return ((21965 * ticks) >> 13) - 46850; in sht21_temp_ticks_to_millicelsius() 64 * sht21_rh_ticks_to_per_cent_mille() - convert raw humidity ticks to 66 * @ticks: humidity ticks value received from sensor 68 static inline int sht21_rh_ticks_to_per_cent_mille(int ticks) in sht21_rh_ticks_to_per_cent_mille() argument 70 ticks &= ~0x0003; /* clear status bits */ in sht21_rh_ticks_to_per_cent_mille() 75 return ((15625 * ticks) >> 13) - 6000; in sht21_rh_ticks_to_per_cent_mille()
|
/linux/arch/powerpc/sysdev/ |
H A D | mpic_timer.c | 85 const u64 ticks, time64_t *time) in convert_ticks_to_time() argument 87 *time = (u64)div_u64(ticks, priv->timerfreq); in convert_ticks_to_time() 90 /* the time set by the user is converted to "ticks" */ 92 time64_t time, u64 *ticks) in convert_time_to_ticks() argument 101 *ticks = (u64)time * (u64)priv->timerfreq; in convert_time_to_ticks() 137 static int set_cascade_timer(struct timer_group_priv *priv, u64 ticks, in set_cascade_timer() argument 154 tmp_ticks = div_u64_rem(ticks, MAX_TICKS_CASCADE, &rem_ticks); in set_cascade_timer() 166 u64 ticks) in get_cascade_timer() argument 174 if (ticks > max_ticks) in get_cascade_timer() 182 /* set ticks to timer */ in get_cascade_timer() [all …]
|
/linux/drivers/ssb/ |
H A D | driver_extif.c | 115 u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks) in ssb_extif_watchdog_timer_set_wdt() argument 119 return ssb_extif_watchdog_timer_set(extif, ticks); in ssb_extif_watchdog_timer_set_wdt() 125 u32 ticks = (SSB_EXTIF_WATCHDOG_CLK / 1000) * ms; in ssb_extif_watchdog_timer_set_ms() local 127 ticks = ssb_extif_watchdog_timer_set(extif, ticks); in ssb_extif_watchdog_timer_set_ms() 129 return (ticks * 1000) / SSB_EXTIF_WATCHDOG_CLK; in ssb_extif_watchdog_timer_set_ms() 132 u32 ssb_extif_watchdog_timer_set(struct ssb_extif *extif, u32 ticks) in ssb_extif_watchdog_timer_set() argument 134 if (ticks > SSB_EXTIF_WATCHDOG_MAX_TIMER) in ssb_extif_watchdog_timer_set() 135 ticks = SSB_EXTIF_WATCHDOG_MAX_TIMER; in ssb_extif_watchdog_timer_set() 136 extif_write32(extif, SSB_EXTIF_WATCHDOG, ticks); in ssb_extif_watchdog_timer_set() 138 return ticks; in ssb_extif_watchdog_timer_set()
|
H A D | driver_chipcommon.c | 311 u32 ssb_chipco_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks) in ssb_chipco_watchdog_timer_set_wdt() argument 318 return ssb_chipco_watchdog_timer_set(cc, ticks); in ssb_chipco_watchdog_timer_set_wdt() 324 u32 ticks; in ssb_chipco_watchdog_timer_set_ms() local 329 ticks = ssb_chipco_watchdog_timer_set(cc, cc->ticks_per_ms * ms); in ssb_chipco_watchdog_timer_set_ms() 330 return ticks / cc->ticks_per_ms; in ssb_chipco_watchdog_timer_set_ms() 470 /* Set chip watchdog reset timer to fire in 'ticks' backplane cycles */ 471 u32 ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc, u32 ticks) in ssb_chipco_watchdog_timer_set() argument 478 if (ticks == 1) in ssb_chipco_watchdog_timer_set() 479 ticks = 2; in ssb_chipco_watchdog_timer_set() 480 else if (ticks > maxt) in ssb_chipco_watchdog_timer_set() [all …]
|
/linux/drivers/bcma/ |
H A D | driver_chipcommon.c | 78 u32 ticks) in bcma_chipco_watchdog_timer_set_wdt() argument 82 return bcma_chipco_watchdog_timer_set(cc, ticks); in bcma_chipco_watchdog_timer_set_wdt() 89 u32 ticks; in bcma_chipco_watchdog_timer_set_ms_wdt() local 91 ticks = bcma_chipco_watchdog_timer_set(cc, cc->ticks_per_ms * ms); in bcma_chipco_watchdog_timer_set_ms_wdt() 92 return ticks / cc->ticks_per_ms; in bcma_chipco_watchdog_timer_set_ms_wdt() 235 /* Set chip watchdog reset timer to fire in 'ticks' backplane cycles */ 236 u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks) in bcma_chipco_watchdog_timer_set() argument 242 if (ticks == 1) in bcma_chipco_watchdog_timer_set() 243 ticks = 2; in bcma_chipco_watchdog_timer_set() 244 else if (ticks > maxt) in bcma_chipco_watchdog_timer_set() [all …]
|
/linux/include/sound/ |
H A D | timer.h | 46 unsigned long ticks; /* max timer ticks per interrupt */ member 67 unsigned long sticks; /* schedule ticks */ 89 unsigned long ticks, unsigned long resolution); 96 unsigned long ticks; /* auto-load ticks when expired */ member 97 unsigned long cticks; /* current ticks */ 98 unsigned long pticks; /* accumulated ticks for callback */ 100 unsigned long lost; /* lost ticks */ 126 int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks);
|
/linux/kernel/time/ |
H A D | tick-legacy.c | 15 * @ticks: number of ticks, that have elapsed since the last call. 20 * If 'ticks' is zero, the CPU is not handling timekeeping, so 25 void legacy_timer_tick(unsigned long ticks) in legacy_timer_tick() argument 27 if (ticks) { in legacy_timer_tick() 30 do_timer(ticks); in legacy_timer_tick()
|
/linux/drivers/acpi/acpica/ |
H A D | hwtimer.c | 53 * PARAMETERS: ticks - Where the timer value is returned in ACPI_EXPORT_SYMBOL() 55 * RETURN: Status and current timer value (ticks) in ACPI_EXPORT_SYMBOL() 57 * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). in ACPI_EXPORT_SYMBOL() 60 acpi_status acpi_get_timer(u32 * ticks) in ACPI_EXPORT_SYMBOL() 67 if (!ticks) { in ACPI_EXPORT_SYMBOL() 82 *ticks = (u32)timer_value; in ACPI_EXPORT_SYMBOL() 104 * The PM Timer's clock ticks at roughly 3.6 times per in ACPI_EXPORT_SYMBOL() 114 * 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec in ACPI_EXPORT_SYMBOL() 115 * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes in ACPI_EXPORT_SYMBOL()
|
/linux/Documentation/block/ |
H A D | stat.rst | 32 read ticks milliseconds total wait time for read requests 36 write ticks milliseconds total wait time for write requests 43 discard ticks milliseconds total wait time for discard requests 45 flush ticks milliseconds total wait time for flush requests 75 read ticks, write ticks, discard ticks, flush ticks 103 number of requests waiting (see "read ticks" above for an example).
|
/linux/sound/isa/gus/ |
H A D | gus_timer.c | 21 unsigned int ticks; in snd_gf1_timer1_start() local 26 ticks = timer->sticks; in snd_gf1_timer1_start() 28 snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1, 256 - ticks); /* timer 1 count */ in snd_gf1_timer1_start() 57 unsigned int ticks; in snd_gf1_timer2_start() local 62 ticks = timer->sticks; in snd_gf1_timer2_start() 64 snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_2, 256 - ticks); /* timer 2 count */ in snd_gf1_timer2_start() 115 .ticks = 256, 124 .ticks = 256,
|
/linux/arch/arm/mach-rpc/ |
H A D | time.c | 33 u32 ticks; in ioc_timer_read() local 45 ticks = ioc_time + RPC_LATCH - count2; in ioc_timer_read() 54 ticks += RPC_LATCH; in ioc_timer_read() 59 * been processed, so add the missed ticks. in ioc_timer_read() 61 ticks += RPC_LATCH; in ioc_timer_read() 64 return ticks; in ioc_timer_read()
|
/linux/drivers/char/hw_random/ |
H A D | n2-drv.c | 113 unsigned long hv_err, state, ticks, watchdog_delta, watchdog_status; in n2rng_generic_read_control_v2() local 118 &ticks, in n2rng_generic_read_control_v2() 133 __delay(ticks); in n2rng_generic_read_control_v2() 159 unsigned long *ticks) in n2rng_write_ctl_one() argument 165 watchdog_timeout, ticks); in n2rng_write_ctl_one() 171 *ticks = N2RNG_ACCUM_CYCLES_DEFAULT; in n2rng_write_ctl_one() 179 unsigned long ticks, hv_err; in n2rng_generic_read_data() local 183 hv_err = sun4v_rng_data_read(data_ra, &ticks); in n2rng_generic_read_data() 190 __delay(ticks); in n2rng_generic_read_data() 206 unsigned long *ticks) in n2rng_read_diag_data_one() argument [all …]
|
/linux/include/net/tc_act/ |
H A D | tc_police.h | 78 * 1 second 2^6 ticks in tcf_police_burst() 83 * 2^6 ticks in tcf_police_burst() 85 * "rate" bytes "burst" nanoseconds 2^6 ticks in tcf_police_burst() 87 * 1 second 2^6 ticks NSEC_PER_SEC nanoseconds in tcf_police_burst() 126 * 1 second 2^6 ticks in tcf_police_burst_pkt() 131 * 2^6 ticks in tcf_police_burst_pkt() 133 * "rate" pkts "burst" nanoseconds 2^6 ticks in tcf_police_burst_pkt() 135 * 1 second 2^6 ticks NSEC_PER_SEC nanoseconds in tcf_police_burst_pkt()
|
/linux/tools/testing/selftests/tc-testing/plugin-lib/ |
H A D | nsPlugin.py | 41 ticks = 20 43 if ticks == 0: 53 ticks -= 1 132 ticks = 20 134 if ticks == 0: 144 ticks -= 1 149 ticks = 20 151 if ticks == 0: 159 ticks -= 1
|
/linux/drivers/gpu/drm/msm/ |
H A D | msm_gpu_trace.h | 34 TP_PROTO(struct msm_gem_submit *submit, u64 ticks), 35 TP_ARGS(submit, ticks), 41 __field(u64, ticks) 48 __entry->ticks = ticks; 50 TP_printk("id=%d pid=%d ring=%d:%d ticks=%lld", 52 __entry->ticks)
|
/linux/arch/loongarch/kvm/ |
H A D | timer.c | 55 unsigned long ticks, delta, period; in kvm_restore_timer() local 90 ticks = kvm_read_sw_gcsr(csr, LOONGARCH_CSR_TVAL); in kvm_restore_timer() 92 if (!(cfg & CSR_TCFG_PERIOD) && (ticks > cfg)) { in kvm_restore_timer() 140 unsigned long ticks, delta, cfg; in _kvm_save_timer() local 145 ticks = kvm_read_sw_gcsr(csr, LOONGARCH_CSR_TVAL); in _kvm_save_timer() 154 if (ticks < cfg) in _kvm_save_timer() 155 delta = tick_to_ns(vcpu, ticks); in _kvm_save_timer()
|
/linux/tools/testing/selftests/bpf/benchs/ |
H A D | bench_local_storage_rcu_tasks_trace.c | 29 "Pid of rcu_tasks_trace kthread for ticks tracking"}, 191 long ticks; in measure() local 195 ticks = kthread_pid_ticks(); in measure() 196 res->stime = ticks - ctx.prev_kthread_stime; in measure() 197 ctx.prev_kthread_stime = ticks; in measure() 220 printf("Iter %d\t avg ticks per tasks_trace grace period\t%lf\n", in report_progress() 232 printf("SUMMARY ticks per tasks_trace grace period"); in report_final() 252 * using /proc/PID/stat to measure rcu_tasks_trace_kthread kernel ticks
|
/linux/sound/core/ |
H A D | timer.c | 74 unsigned long ticks; member 541 bool start, unsigned long ticks) in snd_timer_start1() argument 563 if ((u64)snd_timer_hw_resolution(timer) * ticks < 100000) in snd_timer_start1() 568 timeri->ticks = timeri->cticks = ticks; in snd_timer_start1() 582 timer->sticks = ticks; in snd_timer_start1() 631 timeri->cticks = timeri->ticks; in snd_timer_stop1() 678 int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks) in snd_timer_start() argument 680 if (timeri == NULL || ticks < 1) in snd_timer_start() 685 return snd_timer_start1(timeri, true, ticks); in snd_timer_start() 720 * pause.. remember the ticks left [all …]
|
/linux/drivers/misc/ |
H A D | vcpu_stall_detector.c | 61 u32 ticks, ping_timeout_ms; in vcpu_stall_detect_timer_fn() local 68 ticks = vcpu_stall_config.clock_freq_hz * in vcpu_stall_detect_timer_fn() 71 VCPU_STALL_REG_LOAD_CNT, ticks); in vcpu_stall_detect_timer_fn() 89 u32 ticks, ping_timeout_ms; in start_stall_detector_cpu() local 97 /* Compute the number of ticks required for the stall detector in start_stall_detector_cpu() 101 ticks = vcpu_stall_config.clock_freq_hz * in start_stall_detector_cpu() 103 vcpu_stall_reg_write(cpu, VCPU_STALL_REG_LOAD_CNT, ticks); in start_stall_detector_cpu()
|