Lines Matching refs:alarm
71 struct nvkm_alarm *alarm, *atemp; in nvkm_timer_alarm_trigger() local
77 list_for_each_entry_safe(alarm, atemp, &tmr->alarms, head) { in nvkm_timer_alarm_trigger()
79 if (alarm->timestamp > nvkm_timer_read(tmr)) { in nvkm_timer_alarm_trigger()
81 tmr->func->alarm_init(tmr, alarm->timestamp); in nvkm_timer_alarm_trigger()
82 if (alarm->timestamp > nvkm_timer_read(tmr)) in nvkm_timer_alarm_trigger()
89 list_del_init(&alarm->head); in nvkm_timer_alarm_trigger()
90 list_add(&alarm->exec, &exec); in nvkm_timer_alarm_trigger()
99 list_for_each_entry_safe(alarm, atemp, &exec, exec) { in nvkm_timer_alarm_trigger()
100 list_del(&alarm->exec); in nvkm_timer_alarm_trigger()
101 alarm->func(alarm); in nvkm_timer_alarm_trigger()
106 nvkm_timer_alarm(struct nvkm_timer *tmr, u32 nsec, struct nvkm_alarm *alarm) in nvkm_timer_alarm() argument
117 list_del_init(&alarm->head); in nvkm_timer_alarm()
121 alarm->timestamp = nvkm_timer_read(tmr) + nsec; in nvkm_timer_alarm()
123 if (list->timestamp > alarm->timestamp) in nvkm_timer_alarm()
127 list_add_tail(&alarm->head, &list->head); in nvkm_timer_alarm()
131 if (list == alarm) { in nvkm_timer_alarm()
132 tmr->func->alarm_init(tmr, alarm->timestamp); in nvkm_timer_alarm()
138 WARN_ON(alarm->timestamp <= nvkm_timer_read(tmr)); in nvkm_timer_alarm()