Home
last modified time | relevance | path

Searched refs:timer (Results 1 – 25 of 1714) sorted by relevance

12345678910>>...69

/linux/drivers/clocksource/
H A Dtimer-ti-dm.c166 static inline u32 dmtimer_read(struct dmtimer *timer, u32 reg) in dmtimer_read() argument
174 if (wp && timer->posted) in dmtimer_read()
175 while (readl_relaxed(timer->pend) & wp) in dmtimer_read()
178 return readl_relaxed(timer->func_base + offset); in dmtimer_read()
191 static inline void dmtimer_write(struct dmtimer *timer, u32 reg, u32 val) in dmtimer_write() argument
199 if (wp && timer->posted) in dmtimer_write()
200 while (readl_relaxed(timer->pend) & wp) in dmtimer_write()
203 writel_relaxed(val, timer->func_base + offset); in dmtimer_write()
206 static inline void __omap_dm_timer_init_regs(struct dmtimer *timer) in __omap_dm_timer_init_regs() argument
211 tidr = readl_relaxed(timer->io_base); in __omap_dm_timer_init_regs()
[all …]
H A Dtimer-zevio.c64 struct zevio_timer *timer = container_of(dev, struct zevio_timer, in zevio_timer_set_event() local
67 writel(delta, timer->timer1 + IO_CURRENT_VAL); in zevio_timer_set_event()
69 timer->timer1 + IO_CONTROL); in zevio_timer_set_event()
76 struct zevio_timer *timer = container_of(dev, struct zevio_timer, in zevio_timer_shutdown() local
80 writel(0, timer->interrupt_regs + IO_INTR_MSK); in zevio_timer_shutdown()
81 writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK); in zevio_timer_shutdown()
83 writel(CNTL_STOP_TIMER, timer->timer1 + IO_CONTROL); in zevio_timer_shutdown()
89 struct zevio_timer *timer = container_of(dev, struct zevio_timer, in zevio_timer_set_oneshot() local
93 writel(TIMER_INTR_MSK, timer->interrupt_regs + IO_INTR_MSK); in zevio_timer_set_oneshot()
94 writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK); in zevio_timer_set_oneshot()
[all …]
H A Dtimer-microchip-pit64b.c70 struct mchp_pit64b_timer timer; member
84 struct mchp_pit64b_timer timer; member
119 static inline void mchp_pit64b_reset(struct mchp_pit64b_timer *timer, in mchp_pit64b_reset() argument
127 writel_relaxed(MCHP_PIT64B_CR_SWRST, timer->base + MCHP_PIT64B_CR); in mchp_pit64b_reset()
128 writel_relaxed(mode | timer->mode, timer->base + MCHP_PIT64B_MR); in mchp_pit64b_reset()
129 writel_relaxed(high, timer->base + MCHP_PIT64B_MSB_PR); in mchp_pit64b_reset()
130 writel_relaxed(low, timer->base + MCHP_PIT64B_LSB_PR); in mchp_pit64b_reset()
131 writel_relaxed(irqs, timer->base + MCHP_PIT64B_IER); in mchp_pit64b_reset()
132 writel_relaxed(MCHP_PIT64B_CR_START, timer->base + MCHP_PIT64B_CR); in mchp_pit64b_reset()
135 static void mchp_pit64b_suspend(struct mchp_pit64b_timer *timer) in mchp_pit64b_suspend() argument
[all …]
H A Dtimer-rockchip.c44 struct rk_timer timer; member
52 return &container_of(ce, struct rk_clkevt, ce)->timer; in rk_timer()
55 static inline void rk_timer_disable(struct rk_timer *timer) in rk_timer_disable() argument
57 writel_relaxed(TIMER_DISABLE, timer->ctrl); in rk_timer_disable()
60 static inline void rk_timer_enable(struct rk_timer *timer, u32 flags) in rk_timer_enable() argument
62 writel_relaxed(TIMER_ENABLE | flags, timer->ctrl); in rk_timer_enable()
66 struct rk_timer *timer) in rk_timer_update_counter() argument
68 writel_relaxed(cycles, timer->base + TIMER_LOAD_COUNT0); in rk_timer_update_counter()
69 writel_relaxed(0, timer->base + TIMER_LOAD_COUNT1); in rk_timer_update_counter()
72 static void rk_timer_interrupt_clear(struct rk_timer *timer) in rk_timer_interrupt_clear() argument
[all …]
H A Dingenic-timer.c67 to_ingenic_tcu(struct ingenic_tcu_timer *timer) in to_ingenic_tcu() argument
69 return container_of(timer, struct ingenic_tcu, timers[timer->cpu]); in to_ingenic_tcu()
80 struct ingenic_tcu_timer *timer = to_ingenic_tcu_timer(evt); in ingenic_tcu_cevt_set_state_shutdown() local
81 struct ingenic_tcu *tcu = to_ingenic_tcu(timer); in ingenic_tcu_cevt_set_state_shutdown()
83 regmap_write(tcu->map, TCU_REG_TECR, BIT(timer->channel)); in ingenic_tcu_cevt_set_state_shutdown()
91 struct ingenic_tcu_timer *timer = to_ingenic_tcu_timer(evt); in ingenic_tcu_cevt_set_next() local
92 struct ingenic_tcu *tcu = to_ingenic_tcu(timer); in ingenic_tcu_cevt_set_next()
97 regmap_write(tcu->map, TCU_REG_TDFRc(timer->channel), next); in ingenic_tcu_cevt_set_next()
98 regmap_write(tcu->map, TCU_REG_TCNTc(timer->channel), 0); in ingenic_tcu_cevt_set_next()
99 regmap_write(tcu->map, TCU_REG_TESR, BIT(timer->channel)); in ingenic_tcu_cevt_set_next()
[all …]
H A Dbcm2835_timer.c46 struct bcm2835_timer *timer = container_of(evt_dev, in bcm2835_time_set_next_event() local
49 timer->compare); in bcm2835_time_set_next_event()
55 struct bcm2835_timer *timer = dev_id; in bcm2835_time_interrupt() local
57 if (readl_relaxed(timer->control) & timer->match_mask) { in bcm2835_time_interrupt()
58 writel_relaxed(timer->match_mask, timer->control); in bcm2835_time_interrupt()
60 event_handler = READ_ONCE(timer->evt.event_handler); in bcm2835_time_interrupt()
62 event_handler(&timer->evt); in bcm2835_time_interrupt()
74 struct bcm2835_timer *timer; in bcm2835_timer_init() local
101 timer = kzalloc(sizeof(*timer), GFP_KERNEL); in bcm2835_timer_init()
102 if (!timer) { in bcm2835_timer_init()
[all …]
/linux/drivers/rtc/
H A Drtc-brcmstb-waketimer.c48 static inline bool brcmstb_waketmr_is_pending(struct brcmstb_waketmr *timer) in brcmstb_waketmr_is_pending() argument
52 reg = readl_relaxed(timer->base + BRCMSTB_WKTMR_EVENT); in brcmstb_waketmr_is_pending()
56 static inline void brcmstb_waketmr_clear_alarm(struct brcmstb_waketmr *timer) in brcmstb_waketmr_clear_alarm() argument
60 if (timer->alarm_en && timer->alarm_irq) in brcmstb_waketmr_clear_alarm()
61 disable_irq(timer->alarm_irq); in brcmstb_waketmr_clear_alarm()
62 timer->alarm_en = false; in brcmstb_waketmr_clear_alarm()
63 reg = readl_relaxed(timer->base + BRCMSTB_WKTMR_COUNTER); in brcmstb_waketmr_clear_alarm()
64 writel_relaxed(reg - 1, timer->base + BRCMSTB_WKTMR_ALARM); in brcmstb_waketmr_clear_alarm()
65 writel_relaxed(WKTMR_ALARM_EVENT, timer->base + BRCMSTB_WKTMR_EVENT); in brcmstb_waketmr_clear_alarm()
66 (void)readl_relaxed(timer->base + BRCMSTB_WKTMR_EVENT); in brcmstb_waketmr_clear_alarm()
[all …]
/linux/tools/testing/selftests/kvm/aarch64/
H A Darch_timer_edge_cases.c53 enum arch_timer timer; member
84 typedef void (*sleep_method_t)(enum arch_timer timer, uint64_t usec);
86 static void sleep_poll(enum arch_timer timer, uint64_t usec);
87 static void sleep_sched_poll(enum arch_timer timer, uint64_t usec);
88 static void sleep_in_userspace(enum arch_timer timer, uint64_t usec);
89 static void sleep_migrate(enum arch_timer timer, uint64_t usec);
139 static void set_counter(enum arch_timer timer, uint64_t counter) in set_counter() argument
141 GUEST_SYNC_ARGS(SET_COUNTER_VALUE, counter, timer, 0, 0); in set_counter()
147 enum arch_timer timer; in guest_irq_handler() local
158 timer = PHYSICAL; in guest_irq_handler()
[all …]
/linux/net/netfilter/
H A Dxt_IDLETIMER.c35 struct timer_list timer; member
66 struct idletimer_tg *timer; in idletimer_tg_show() local
73 timer = __idletimer_tg_find_by_label(attr->attr.name); in idletimer_tg_show()
74 if (timer) { in idletimer_tg_show()
75 if (timer->timer_type & XT_IDLETIMER_ALARM) { in idletimer_tg_show()
76 ktime_t expires_alarm = alarm_expires_remaining(&timer->alarm); in idletimer_tg_show()
80 expires = timer->timer.expires; in idletimer_tg_show()
95 struct idletimer_tg *timer = container_of(work, struct idletimer_tg, in idletimer_tg_work() local
98 sysfs_notify(idletimer_tg_kobj, NULL, timer->attr.attr.name); in idletimer_tg_work()
103 struct idletimer_tg *timer = from_timer(timer, t, timer); in idletimer_tg_expired() local
[all …]
/linux/arch/nios2/kernel/
H A Dtime.c42 struct nios2_timer timer; member
47 struct nios2_timer timer; member
63 static u16 timer_readw(struct nios2_timer *timer, u32 offs) in timer_readw() argument
65 return readw(timer->base + offs); in timer_readw()
68 static void timer_writew(struct nios2_timer *timer, u16 val, u32 offs) in timer_writew() argument
70 writew(val, timer->base + offs); in timer_writew()
73 static inline unsigned long read_timersnapshot(struct nios2_timer *timer) in read_timersnapshot() argument
77 timer_writew(timer, 0, ALTERA_TIMER_SNAPL_REG); in read_timersnapshot()
78 count = timer_readw(timer, ALTERA_TIMER_SNAPH_REG) << 16 | in read_timersnapshot()
79 timer_readw(timer, ALTERA_TIMER_SNAPL_REG); in read_timersnapshot()
[all …]
/linux/sound/core/
H A Dtimer.c119 struct snd_timer *timer; member
140 static int snd_timer_free(struct snd_timer *timer);
145 static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left);
188 struct snd_timer *timer; in snd_timer_find() local
190 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_find()
191 if (timer->tmr_class != tid->dev_class) in snd_timer_find()
193 if ((timer->tmr_class == SNDRV_TIMER_CLASS_CARD || in snd_timer_find()
194 timer->tmr_class == SNDRV_TIMER_CLASS_PCM) && in snd_timer_find()
195 (timer->card == NULL || in snd_timer_find()
196 timer->card->number != tid->card)) in snd_timer_find()
[all …]
H A Dpcm_timer.c52 static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) in snd_pcm_timer_resolution() argument
56 substream = timer->private_data; in snd_pcm_timer_resolution()
60 static int snd_pcm_timer_start(struct snd_timer * timer) in snd_pcm_timer_start() argument
64 substream = snd_timer_chip(timer); in snd_pcm_timer_start()
69 static int snd_pcm_timer_stop(struct snd_timer * timer) in snd_pcm_timer_stop() argument
73 substream = snd_timer_chip(timer); in snd_pcm_timer_stop()
92 static void snd_pcm_timer_free(struct snd_timer *timer) in snd_pcm_timer_free() argument
94 struct snd_pcm_substream *substream = timer->private_data; in snd_pcm_timer_free()
95 substream->timer = NULL; in snd_pcm_timer_free()
101 struct snd_timer *timer; in snd_pcm_timer_init() local
[all …]
/linux/kernel/time/
H A Dtimer.c551 static inline unsigned int timer_get_idx(struct timer_list *timer) in timer_get_idx() argument
553 return (timer->flags & TIMER_ARRAYMASK) >> TIMER_ARRAYSHIFT; in timer_get_idx()
556 static inline void timer_set_idx(struct timer_list *timer, unsigned int idx) in timer_set_idx() argument
558 timer->flags = (timer->flags & ~TIMER_ARRAYMASK) | in timer_set_idx()
622 trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer) in trigger_dyntick_cpu() argument
631 if (!is_timers_nohz_active() || timer->flags & TIMER_DEFERRABLE) in trigger_dyntick_cpu()
643 WARN_ON_ONCE(!(timer->flags & TIMER_PINNED || in trigger_dyntick_cpu()
654 static void enqueue_timer(struct timer_base *base, struct timer_list *timer, in enqueue_timer() argument
658 hlist_add_head(&timer->entry, base->vectors + idx); in enqueue_timer()
660 timer_set_idx(timer, idx); in enqueue_timer()
[all …]
H A Dhrtimer.c166 struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer, in lock_hrtimer_base() argument
168 __acquires(&timer->base->lock) in lock_hrtimer_base()
173 base = READ_ONCE(timer->base); in lock_hrtimer_base()
176 if (likely(base == timer->base)) in lock_hrtimer_base()
195 hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base) in hrtimer_check_target() argument
199 expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset); in hrtimer_check_target()
227 switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base, in switch_hrtimer_base() argument
249 if (unlikely(hrtimer_callback_running(timer))) in switch_hrtimer_base()
253 WRITE_ONCE(timer->base, &migration_base); in switch_hrtimer_base()
258 hrtimer_check_target(timer, new_base)) { in switch_hrtimer_base()
[all …]
H A Dposix-cpu-timers.c22 static void posix_cpu_timer_rearm(struct k_itimer *timer);
113 static inline struct task_struct *cpu_timer_task_rcu(struct k_itimer *timer) in cpu_timer_task_rcu() argument
115 return pid_task(timer->it.cpu.pid, clock_pid_type(timer->it_clock)); in cpu_timer_task_rcu()
122 static u64 bump_cpu_timer(struct k_itimer *timer, u64 now) in bump_cpu_timer() argument
124 u64 delta, incr, expires = timer->it.cpu.node.expires; in bump_cpu_timer()
127 if (!timer->it_interval) in bump_cpu_timer()
133 incr = timer->it_interval; in bump_cpu_timer()
144 timer->it.cpu.node.expires += incr; in bump_cpu_timer()
145 timer->it_overrun += 1LL << i; in bump_cpu_timer()
148 return timer->it.cpu.node.expires; in bump_cpu_timer()
[all …]
/linux/arch/s390/kernel/
H A Dvtime.c39 u64 timer; in set_vtimer() local
44 : "=Q" (timer) : "Q" (expires)); in set_vtimer()
45 lc->system_timer += lc->last_update_timer - timer; in set_vtimer()
120 u64 timer, clock, user, guest, system, hardirq, softirq; in do_account_vtime() local
123 timer = lc->last_update_timer; in do_account_vtime()
132 timer -= lc->last_update_timer; in do_account_vtime()
135 lc->hardirq_timer += timer; in do_account_vtime()
137 lc->system_timer += timer; in do_account_vtime()
222 u64 timer = lc->last_update_timer; in vtime_delta() local
225 return timer - lc->last_update_timer; in vtime_delta()
[all …]
/linux/sound/core/seq/oss/
H A Dseq_oss_timer.c24 static void calc_alsa_tempo(struct seq_oss_timer *timer);
116 calc_alsa_tempo(struct seq_oss_timer *timer) in calc_alsa_tempo() argument
118 timer->tempo = (60 * 1000000) / timer->oss_tempo; in calc_alsa_tempo()
119 timer->ppq = timer->oss_timebase; in calc_alsa_tempo()
147 snd_seq_oss_timer_start(struct seq_oss_timer *timer) in snd_seq_oss_timer_start() argument
149 struct seq_oss_devinfo *dp = timer->dp; in snd_seq_oss_timer_start()
152 if (timer->running) in snd_seq_oss_timer_start()
153 snd_seq_oss_timer_stop(timer); in snd_seq_oss_timer_start()
157 tmprec.ppq = timer->ppq; in snd_seq_oss_timer_start()
158 tmprec.tempo = timer->tempo; in snd_seq_oss_timer_start()
[all …]
/linux/tools/testing/selftests/kvm/include/aarch64/
H A Darch_timer.h34 static inline uint64_t timer_get_cntct(enum arch_timer timer) in timer_get_cntct() argument
38 switch (timer) { in timer_get_cntct()
44 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_cntct()
51 static inline void timer_set_cval(enum arch_timer timer, uint64_t cval) in timer_set_cval() argument
53 switch (timer) { in timer_set_cval()
61 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_set_cval()
67 static inline uint64_t timer_get_cval(enum arch_timer timer) in timer_get_cval() argument
69 switch (timer) { in timer_get_cval()
75 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_cval()
82 static inline void timer_set_tval(enum arch_timer timer, int32_t tval) in timer_set_tval() argument
[all …]
/linux/sound/isa/gus/
H A Dgus_timer.c17 static int snd_gf1_timer1_start(struct snd_timer * timer) in snd_gf1_timer1_start() argument
24 gus = snd_timer_chip(timer); in snd_gf1_timer1_start()
26 ticks = timer->sticks; in snd_gf1_timer1_start()
35 static int snd_gf1_timer1_stop(struct snd_timer * timer) in snd_gf1_timer1_stop() argument
41 gus = snd_timer_chip(timer); in snd_gf1_timer1_stop()
53 static int snd_gf1_timer2_start(struct snd_timer * timer) in snd_gf1_timer2_start() argument
60 gus = snd_timer_chip(timer); in snd_gf1_timer2_start()
62 ticks = timer->sticks; in snd_gf1_timer2_start()
71 static int snd_gf1_timer2_stop(struct snd_timer * timer) in snd_gf1_timer2_stop() argument
77 gus = snd_timer_chip(timer); in snd_gf1_timer2_stop()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtimer.c13 struct bpf_timer timer; member
73 static int timer_cb1(void *map, int *key, struct bpf_timer *timer) in timer_cb1() argument
88 if (bpf_timer_start(timer, 1ull << 35, 0) != 0) in timer_cb1()
127 if (bpf_timer_cancel(timer) != -EINVAL) in timer_cb1()
176 bpf_timer_start(&val->timer, 1000, 0); in timer_cb2()
194 if (bpf_timer_cancel(&val->timer) != -EDEADLK) in timer_cb2()
207 if (bpf_timer_start(&val->timer, 1000, 0) != -EINVAL) in timer_cb2()
215 if (bpf_timer_cancel(&val->timer) != -EDEADLK) in timer_cb2()
235 if (bpf_timer_init(&val->timer, &hmap, CLOCK_BOOTTIME) != 0) in bpf_timer_test()
237 bpf_timer_set_callback(&val->timer, timer_cb2); in bpf_timer_test()
[all …]
H A Dtimer_lockup.c35 struct bpf_timer *timer; in timer_cb1() local
38 timer = bpf_map_lookup_elem(&timer2_map, &key); in timer_cb1()
39 if (timer) in timer_cb1()
40 timer2_err = bpf_timer_cancel(timer); in timer_cb1()
47 struct bpf_timer *timer; in timer_cb2() local
50 timer = bpf_map_lookup_elem(&timer1_map, &key); in timer_cb2()
51 if (timer) in timer_cb2()
52 timer1_err = bpf_timer_cancel(timer); in timer_cb2()
60 struct bpf_timer *timer; in timer1_prog() local
63 timer = bpf_map_lookup_elem(&timer1_map, &key); in timer1_prog()
[all …]
/linux/include/linux/
H A Dtimer.h70 void init_timer_key(struct timer_list *timer,
75 extern void init_timer_on_stack_key(struct timer_list *timer,
80 static inline void init_timer_on_stack_key(struct timer_list *timer, in init_timer_on_stack_key() argument
86 init_timer_key(timer, func, flags, name, key); in init_timer_on_stack_key()
120 #define timer_setup(timer, callback, flags) \ argument
121 __init_timer((timer), (callback), (flags))
123 #define timer_setup_on_stack(timer, callback, flags) \ argument
124 __init_timer_on_stack((timer), (callback), (flags))
127 extern void destroy_timer_on_stack(struct timer_list *timer);
129 static inline void destroy_timer_on_stack(struct timer_list *timer) { } in destroy_timer_on_stack() argument
[all …]
/linux/include/linux/platform_data/
H A Ddmtimer-omap.h17 int (*free)(struct omap_dm_timer *timer);
19 void (*enable)(struct omap_dm_timer *timer);
20 void (*disable)(struct omap_dm_timer *timer);
22 int (*get_irq)(struct omap_dm_timer *timer);
23 int (*set_int_enable)(struct omap_dm_timer *timer,
25 int (*set_int_disable)(struct omap_dm_timer *timer, u32 mask);
27 struct clk *(*get_fclk)(struct omap_dm_timer *timer);
29 int (*start)(struct omap_dm_timer *timer);
30 int (*stop)(struct omap_dm_timer *timer);
31 int (*set_source)(struct omap_dm_timer *timer, int source);
[all …]
/linux/drivers/isdn/mISDN/
H A Dtimerdev.c68 struct mISDNtimer *timer, *next; in mISDN_close() local
75 timer = list_first_entry(list, struct mISDNtimer, list); in mISDN_close()
77 timer_shutdown_sync(&timer->tl); in mISDN_close()
80 list_del(&timer->list); in mISDN_close()
81 kfree(timer); in mISDN_close()
85 list_for_each_entry_safe(timer, next, &dev->expired, list) { in mISDN_close()
86 kfree(timer); in mISDN_close()
97 struct mISDNtimer *timer; in mISDN_read() local
121 timer = list_first_entry(list, struct mISDNtimer, list); in mISDN_read()
122 list_del(&timer->list); in mISDN_read()
[all …]
/linux/drivers/misc/
H A Dcs5535-mfgpt.c44 int cs5535_mfgpt_toggle_event(struct cs5535_mfgpt_timer *timer, int cmp, in cs5535_mfgpt_toggle_event() argument
50 if (!timer) { in cs5535_mfgpt_toggle_event()
67 mask = 1 << (timer->nr + 24); in cs5535_mfgpt_toggle_event()
72 mask = 1 << (timer->nr + shift); in cs5535_mfgpt_toggle_event()
77 mask = 1 << (timer->nr + shift); in cs5535_mfgpt_toggle_event()
96 int cs5535_mfgpt_set_irq(struct cs5535_mfgpt_timer *timer, int cmp, int *irq, in cs5535_mfgpt_set_irq() argument
102 if (!timer) { in cs5535_mfgpt_set_irq()
116 shift = ((cmp == MFGPT_CMP1 ? 0 : 4) + timer->nr % 4) * 4; in cs5535_mfgpt_set_irq()
134 if (cs5535_mfgpt_toggle_event(timer, cmp, MFGPT_EVENT_IRQ, enable)) in cs5535_mfgpt_set_irq()
148 struct cs5535_mfgpt_timer *timer = NULL; in cs5535_mfgpt_alloc_timer() local
[all …]

12345678910>>...69