Home
last modified time | relevance | path

Searched refs:period (Results 1 – 25 of 623) sorted by relevance

12345678910>>...25

/linux/tools/perf/arch/x86/tests/
H A Damd-ibs-period.c180 /* Sample period value taken from perf sample must match with expected value. */
187 * Sample period value taken from perf sample must be >= minimum sample period
201 unsigned long period; in rb_drain_samples()
208 * { u64 period; } && PERF_SAMPLE_PERIOD in rb_drain_samples()
217 period = 0; in rb_drain_samples()
218 if (rb_read(rb, &period, sizeof(period))) in rb_drain_samples()
219 pr_debug("rb_read(period) error. [%m]"); in rb_drain_samples()
220 ret |= callback(exp_period, period); in rb_drain_samples()
202 unsigned long period; rb_drain_samples() local
270 unsigned long period; global() member
419 unsigned long period; global() member
488 __ibs_period_constraint_test(int ibs_type,struct ibs_period * period,int * nr_samples) __ibs_period_constraint_test() argument
607 unsigned long period; global() member
[all...]
/linux/drivers/gpu/drm/tegra/
H A Dmipi-phy.c17 unsigned long period) in mipi_dphy_timing_get_default() argument
20 timing->clkpost = 70 + 52 * period; in mipi_dphy_timing_get_default()
30 timing->hsprepare = 65 + 5 * period; in mipi_dphy_timing_get_default()
31 timing->hszero = 145 + 5 * period; in mipi_dphy_timing_get_default()
32 timing->hssettle = 85 + 6 * period; in mipi_dphy_timing_get_default()
46 timing->hstrail = max(4 * 8 * period, 60 + 4 * 4 * period); in mipi_dphy_timing_get_default()
63 unsigned long period) in mipi_dphy_timing_validate() argument
68 if (timing->clkpost < (60 + 52 * period)) in mipi_dphy_timing_validate()
89 if (timing->dtermen > 35 + 4 * period) in mipi_dphy_timing_validate()
92 if (timing->eot > 105 + 12 * period) in mipi_dphy_timing_validate()
[all …]
/linux/drivers/pwm/
H A Dpwm-visconti.c49 u32 period, duty_cycle, pwmc0; in visconti_pwm_apply() local
62 if (state->period > (0xffff << 3) * 1000) in visconti_pwm_apply()
63 period = (0xffff << 3) * 1000; in visconti_pwm_apply()
65 period = state->period; in visconti_pwm_apply()
67 if (state->duty_cycle > period) in visconti_pwm_apply()
68 duty_cycle = period; in visconti_pwm_apply()
77 period /= 1000; in visconti_pwm_apply()
80 if (!period) in visconti_pwm_apply()
89 pwmc0 = fls(period >> 16); in visconti_pwm_apply()
93 period >>= pwmc0; in visconti_pwm_apply()
[all …]
H A Dpwm-ntxec.c57 int period, int duty) in ntxec_pwm_set_raw_period_and_duty_cycle() argument
73 { NTXEC_REG_PERIOD_HIGH, ntxec_reg8(period >> 8) }, in ntxec_pwm_set_raw_period_and_duty_cycle()
75 { NTXEC_REG_PERIOD_LOW, ntxec_reg8(period) }, in ntxec_pwm_set_raw_period_and_duty_cycle()
86 unsigned int period, duty; in ntxec_pwm_apply() local
92 period = min_t(u64, state->period, MAX_PERIOD_NS); in ntxec_pwm_apply()
93 duty = min_t(u64, state->duty_cycle, period); in ntxec_pwm_apply()
95 period /= TIME_BASE_NS; in ntxec_pwm_apply()
108 res = ntxec_pwm_set_raw_period_and_duty_cycle(chip, period, duty); in ntxec_pwm_apply()
H A Dpwm-renesas-tpu.c76 u16 period; member
182 tpu_pwm_write(tpd, TPU_TGRBn, tpd->period); in tpu_pwm_timer_start()
185 tpd->channel, tpd->duty, tpd->period); in tpu_pwm_timer_start()
226 tpd->period = 0; in tpu_pwm_request()
250 u64 period; in tpu_pwm_config() local
265 period = mul_u64_u64_div_u64(clk_rate, period_ns, NSEC_PER_SEC); in tpu_pwm_config()
279 switch (period) { in tpu_pwm_config()
300 period >>= 2 * prescaler; in tpu_pwm_config()
310 clk_rate, 1 << (2 * prescaler), (u32)period, duty); in tpu_pwm_config()
312 if (tpd->prescaler == prescaler && tpd->period == period) in tpu_pwm_config()
[all …]
H A Dpwm-mc33xs2410.c154 static u8 mc33xs2410_pwm_get_freq(u64 period) in mc33xs2410_pwm_get_freq() argument
165 switch (period) { in mc33xs2410_pwm_get_freq()
184 count = DIV_ROUND_UP((u32)MC33XS2410_PWM_MAX_PERIOD(step), (u32)period); in mc33xs2410_pwm_get_freq()
231 u64 period, duty_cycle; in mc33xs2410_pwm_apply() local
237 period = min(state->period, MC33XS2410_PWM_MAX_PERIOD(0)); in mc33xs2410_pwm_apply()
238 if (period < MC33XS2410_PWM_MIN_PERIOD) in mc33xs2410_pwm_apply()
246 wr_val[0] = mc33xs2410_pwm_get_freq(period); in mc33xs2410_pwm_apply()
248 period = mc33xs2410_pwm_get_period(wr_val[0]); in mc33xs2410_pwm_apply()
251 duty_cycle = min(period, state->duty_cycle); in mc33xs2410_pwm_apply()
252 rel_dc = div64_u64(duty_cycle * 256, period) - 1; in mc33xs2410_pwm_apply()
[all …]
H A Dpwm-crc.c59 if (state->period > PWM_MAX_PERIOD_NS) { in crc_pwm_apply()
76 pwm_get_period(pwm) != state->period) { in crc_pwm_apply()
79 do_div(level, state->period); in crc_pwm_apply()
89 pwm_get_period(pwm) != state->period) { in crc_pwm_apply()
98 if (pwm_get_period(pwm) != state->period || in crc_pwm_apply()
100 int clk_div = crc_pwm_calc_clk_div(state->period); in crc_pwm_apply()
144 state->period = in crc_pwm_get_state()
147 DIV_ROUND_UP_ULL(duty_cycle_reg * state->period, PWM_MAX_LEVEL); in crc_pwm_get_state()
H A Dpwm-intel-lgm.c46 u32 period; member
71 if (state->polarity != PWM_POLARITY_NORMAL || state->period < pc->period) in lgm_pwm_apply()
77 duty_cycle = min_t(u64, state->duty_cycle, pc->period); in lgm_pwm_apply()
78 val = duty_cycle * LGM_PWM_MAX_DUTY_CYCLE / pc->period; in lgm_pwm_apply()
97 state->period = pc->period; /* fixed period */ in lgm_pwm_get_state()
101 state->duty_cycle = DIV_ROUND_UP(duty * pc->period, LGM_PWM_MAX_DUTY_CYCLE); in lgm_pwm_get_state()
117 pc->period = LGM_PWM_PERIOD_2WIRE_NS; in lgm_pwm_init()
H A Dcore.c87 .period = wf->period_length_ns, in pwm_wf2state()
94 .period = wf->period_length_ns, in pwm_wf2state()
109 .period_length_ns = state->period, in pwm_state2wf()
115 .period_length_ns = state->period, in pwm_state2wf()
116 .duty_length_ns = state->period - state->duty_cycle, in pwm_state2wf()
531 s2.duty_cycle = s1.period - s1.duty_cycle; in pwm_apply_debug()
532 s2.period = s1.period; in pwm_apply_debug()
539 s2.duty_cycle < s2.period) in pwm_apply_debug()
543 last->period > s2.period && in pwm_apply_debug()
544 last->period <= state->period) in pwm_apply_debug()
[all …]
H A Dpwm-mtk-disp.c73 u32 clk_div, period, high_width, value; in mtk_disp_pwm_apply() local
118 clk_div = mul_u64_u64_div_u64(state->period, rate, NSEC_PER_SEC) >> in mtk_disp_pwm_apply()
129 period = mul_u64_u64_div_u64(state->period, rate, div); in mtk_disp_pwm_apply()
130 if (period > 0) in mtk_disp_pwm_apply()
131 period--; in mtk_disp_pwm_apply()
134 value = period | (high_width << PWM_HIGH_WIDTH_SHIFT); in mtk_disp_pwm_apply()
177 u64 rate, period, high_width; in mtk_disp_pwm_get_state() local
210 period = FIELD_GET(PWM_PERIOD_MASK, con1); in mtk_disp_pwm_get_state()
215 state->period = DIV64_U64_ROUND_UP(period * (clk_div + 1) * NSEC_PER_SEC, rate); in mtk_disp_pwm_get_state()
H A Dpwm-dwc-core.c57 tmp = DIV_ROUND_CLOSEST_ULL(state->period - state->duty_cycle, in __dwc_pwm_configure_timer()
124 u64 duty, period; in dwc_pwm_get_state() local
141 period = (ld2 + 1) * dwc->clk_ns; in dwc_pwm_get_state()
142 period += duty; in dwc_pwm_get_state()
145 period = duty * 2; in dwc_pwm_get_state()
149 state->period = period; in dwc_pwm_get_state()
/linux/lib/
H A Dflex_proportions.c42 p->period = 0; in fprop_global_init()
80 p->period += periods; in fprop_new_period()
99 pl->period = 0; in fprop_local_init_percpu()
112 unsigned int period = p->period; in fprop_reflect_period_percpu() local
116 if (pl->period == period) in fprop_reflect_period_percpu()
120 if (pl->period >= period) { in fprop_reflect_period_percpu()
125 if (period - pl->period < BITS_PER_LONG) { in fprop_reflect_period_percpu()
132 -val + (val >> (period-pl->period)), PROP_BATCH); in fprop_reflect_period_percpu()
135 pl->period = period; in fprop_reflect_period_percpu()
/linux/drivers/iio/common/inv_sensors/
H A Dinv_sensors_timestamp.c53 ts->period = chip->init_period; in inv_sensors_timestamp_init()
61 uint32_t period, bool fifo) in inv_sensors_timestamp_update_odr() argument
69 mult = period / ts->chip.clock_period; in inv_sensors_timestamp_update_odr()
81 static bool inv_validate_period(struct inv_sensors_timestamp *ts, uint32_t period) in inv_validate_period() argument
88 if (period > period_min && period < period_max) in inv_validate_period()
95 uint32_t period) in inv_update_chip_period() argument
99 if (!inv_validate_period(ts, period)) in inv_update_chip_period()
103 new_chip_period = period / ts->mult; in inv_update_chip_period()
105 ts->period = ts->mult * ts->chip_period.val; in inv_update_chip_period()
122 add_max = period_max - (int64_t)ts->period; in inv_align_timestamp_it()
[all …]
/linux/tools/perf/tests/
H A Dhists_output.c54 struct perf_sample sample = { .evsel = evsel, .period = 100, }; in add_hist_entries()
183 !strcmp(SYM(he), "main") && he->stat.period == 200); in test1()
189 !strcmp(SYM(he), "page_fault") && he->stat.period == 100); in test1()
195 !strcmp(SYM(he), "main") && he->stat.period == 100); in test1()
201 !strcmp(SYM(he), "xmalloc") && he->stat.period == 100); in test1()
207 !strcmp(SYM(he), "page_fault") && he->stat.period == 100); in test1()
213 !strcmp(SYM(he), "schedule") && he->stat.period == 100); in test1()
219 !strcmp(SYM(he), "free") && he->stat.period == 100); in test1()
225 !strcmp(SYM(he), "malloc") && he->stat.period == 100); in test1()
231 !strcmp(SYM(he), "cmd_record") && he->stat.period in test1()
[all...]
/linux/drivers/watchdog/
H A Dbooke_wdt.c60 static unsigned long long period_to_sec(unsigned int period) in period_to_sec() argument
62 unsigned long long tmp = 1ULL << (64 - period); in period_to_sec()
81 unsigned int period; in sec_to_period() local
82 for (period = 63; period > 0; period--) { in sec_to_period()
83 if (period_to_sec(period) >= secs) in sec_to_period()
84 return period; in sec_to_period()
93 static unsigned long long period_to_sec(unsigned int period) in period_to_sec() argument
95 return period; in period_to_sec()
/linux/Documentation/RCU/Design/Memory-Ordering/
H A DTree-RCU-Memory-Ordering.rst13 grace-period memory ordering guarantee is provided.
20 Any code that happens after the end of a given RCU grace period is guaranteed
22 period that are within RCU read-side critical sections.
24 period is guaranteed to not see the effects of all accesses following the end
25 of that grace period that are within RCU read-side critical sections.
34 two phases, one of which is executed before the grace period and
35 the other of which is executed after the grace period.
49 The workhorse for RCU's grace-period memory ordering is the
74 period, including any CPUs that came online or went offline during
75 the grace period in question.
[all …]
/linux/drivers/scsi/
H A Dscsi_transport_spi.c413 static int period_to_str(char *buf, int period) in period_to_str() argument
417 if (period < 0 || period > 0xff) { in period_to_str()
419 } else if (period <= SPI_STATIC_PPR) { in period_to_str()
420 picosec = ppr_to_ps[period]; in period_to_str()
422 picosec = period * 4000; in period_to_str()
435 show_spi_transport_period_helper(char *buf, int period) in show_spi_transport_period_helper() argument
437 int len = period_to_str(buf, period); in show_spi_transport_period_helper()
447 int j, picosec, period = -1; in store_spi_transport_period_helper() local
465 period = j; in store_spi_transport_period_helper()
469 if (period == -1) in store_spi_transport_period_helper()
[all …]
/linux/Documentation/RCU/Design/Expedited-Grace-Periods/
H A DExpedited-Grace-Periods.rst23 grace period.
32 state, the expedited grace period has completed.
43 expedited grace period is shown in the following diagram:
54 Otherwise, the expedited grace period will use
72 block the current expedited grace period until it resumes and finds its
75 the CPU is no longer blocking the grace period.
86 | Why not just have the expedited grace period check the state of all |
116 the handling of a given CPU by an RCU-sched expedited grace period is
153 period. Note that this number never decreases, at least in the
159 beginning of the most recent RCU expedited grace period. The
[all …]
/linux/arch/m68k/atari/
H A Datasound.c60 int period; in atari_mksound() local
75 period = PSG_FREQ / hz; in atari_mksound()
77 if (period > 0xfff) period = 0xfff; in atari_mksound()
81 sound_ym.wd_data = period & 0xff; in atari_mksound()
83 sound_ym.wd_data = (period >> 8) & 0xf; in atari_mksound()
/linux/drivers/input/misc/
H A Dpwm-beeper.c23 unsigned long period; member
31 static int pwm_beeper_on(struct pwm_beeper *beeper, unsigned long period) in pwm_beeper_on() argument
39 state.period = period; in pwm_beeper_on()
72 unsigned long period = READ_ONCE(beeper->period); in pwm_beeper_work() local
74 if (period) in pwm_beeper_work()
75 pwm_beeper_on(beeper, period); in pwm_beeper_work()
99 beeper->period = 0; in pwm_beeper_event()
101 beeper->period = HZ_TO_NANOSECONDS(value); in pwm_beeper_event()
/linux/drivers/iio/trigger/
H A Diio-trig-hrtimer.c29 ktime_t period; member
57 u64 period; in iio_hrtimer_store_sampling_frequency() local
73 period = PSEC_PER_SEC; in iio_hrtimer_store_sampling_frequency()
74 do_div(period, val); in iio_hrtimer_store_sampling_frequency()
75 info->period = period; /* nS */ in iio_hrtimer_store_sampling_frequency()
104 hrtimer_forward_now(timer, info->period); in iio_hrtimer_trig_handler()
117 hrtimer_start(&trig_info->timer, trig_info->period, in iio_trig_hrtimer_set_state()
152 trig_info->period = NSEC_PER_SEC / trig_info->sampling_frequency[0]; in iio_trig_hrtimer_probe()
/linux/arch/m68k/amiga/
H A Damisound.c84 unsigned long period = (clock_constant / hz); in amiga_mksound() local
86 if (period < amiga_audio_min_period) in amiga_mksound()
87 period = amiga_audio_min_period; in amiga_mksound()
88 if (period > MAX_PERIOD) in amiga_mksound()
89 period = MAX_PERIOD; in amiga_mksound()
94 custom.aud[2].audper = (unsigned short)period; in amiga_mksound()
/linux/drivers/leds/
H A Dleds-pca955x.c356 static u8 pca955x_period_to_psc(struct pca955x *pca955x, unsigned long period) in pca955x_period_to_psc() argument
359 period *= pca955x->chipdef->blink_div; in pca955x_period_to_psc()
360 period /= MSEC_PER_SEC; in pca955x_period_to_psc()
361 period -= 1; in pca955x_period_to_psc()
363 return period; in pca955x_period_to_psc()
368 unsigned long period = psc; in pca955x_psc_to_period() local
371 period += 1; in pca955x_psc_to_period()
372 period *= MSEC_PER_SEC; in pca955x_psc_to_period()
373 period /= pca955x->chipdef->blink_div; in pca955x_psc_to_period()
375 return period; in pca955x_psc_to_period()
[all …]
/linux/tools/perf/Documentation/
H A Dintel-acr.txt10 two or more events. To enable this, the user must provide a sample period
13 period is exceeded.
18 perf record -e {cpu_atom/instructions,period=200000,acr_mask=0x2/, \
19 cpu_atom/cycles,period=100000,acr_mask=0x3/} -- true
21 In this case, if the "instructions" counter exceeds the sample period of
27 events in the group to be reset when the period is exceeded. In the
31 that both event counters will be reset if the sample period is exceeded
37 alongside the sample period term n or the -c/--count option. This would
44 cpu_atom/cycles,period=100000,ratio-to-prev=0.5/} -- true
53 cpu_atom/instructions,period=200000,ratio-to-prev=2.0/} -- true
/linux/Documentation/litmus-tests/rcu/
H A DRCU+sync+free.litmus7 * follows a grace period, if it did not see writes that precede that grace
8 * period.
11 * period assigns a pointer, and the writes following the grace period destroy
14 * This is one implication of the RCU grace-period guarantee, which says (among
15 * other things) that an RCU read-side critical section cannot span a grace period.

12345678910>>...25