Lines Matching refs:ps

86 	struct kvm_kpit_state *ps = &pit->pit_state;  in __kpit_elapsed()  local
88 if (!ps->period) in __kpit_elapsed()
100 remaining = hrtimer_get_remaining(&ps->timer); in __kpit_elapsed()
101 elapsed = ps->period - ktime_to_ns(remaining); in __kpit_elapsed()
198 static inline struct kvm_pit *pit_state_to_pit(struct kvm_kpit_state *ps) in pit_state_to_pit() argument
200 return container_of(ps, struct kvm_pit, pit_state); in pit_state_to_pit()
205 struct kvm_kpit_state *ps = container_of(kian, struct kvm_kpit_state, in kvm_pit_ack_irq() local
207 struct kvm_pit *pit = pit_state_to_pit(ps); in kvm_pit_ack_irq()
209 atomic_set(&ps->irq_ack, 1); in kvm_pit_ack_irq()
214 if (atomic_dec_if_positive(&ps->pending) > 0) in kvm_pit_ack_irq()
246 struct kvm_kpit_state *ps = &pit->pit_state; in pit_do_work() local
248 if (atomic_read(&ps->reinject) && !atomic_xchg(&ps->irq_ack, 0)) in pit_do_work()
270 struct kvm_kpit_state *ps = container_of(data, struct kvm_kpit_state, timer); in pit_timer_fn() local
271 struct kvm_pit *pt = pit_state_to_pit(ps); in pit_timer_fn()
273 if (atomic_read(&ps->reinject)) in pit_timer_fn()
274 atomic_inc(&ps->pending); in pit_timer_fn()
278 if (ps->is_periodic) { in pit_timer_fn()
279 hrtimer_add_expires_ns(&ps->timer, ps->period); in pit_timer_fn()
293 struct kvm_kpit_state *ps = &pit->pit_state; in kvm_pit_set_reinject() local
296 if (atomic_read(&ps->reinject) == reinject) in kvm_pit_set_reinject()
312 kvm_register_irq_ack_notifier(kvm, &ps->irq_ack_notifier); in kvm_pit_set_reinject()
317 kvm_unregister_irq_ack_notifier(kvm, &ps->irq_ack_notifier); in kvm_pit_set_reinject()
321 atomic_set(&ps->reinject, reinject); in kvm_pit_set_reinject()
326 struct kvm_kpit_state *ps = &pit->pit_state; in create_pit_timer() local
331 ps->flags & KVM_PIT_FLAGS_HPET_LEGACY) in create_pit_timer()
339 hrtimer_cancel(&ps->timer); in create_pit_timer()
341 ps->period = interval; in create_pit_timer()
342 ps->is_periodic = is_period; in create_pit_timer()
351 if (ps->is_periodic) { in create_pit_timer()
354 if (ps->period < min_period) { in create_pit_timer()
358 ps->period, min_period); in create_pit_timer()
359 ps->period = min_period; in create_pit_timer()
363 hrtimer_start(&ps->timer, ktime_add_ns(ktime_get(), interval), in create_pit_timer()
369 struct kvm_kpit_state *ps = &pit->pit_state; in pit_load_count() local
380 ps->channels[channel].count = val; in pit_load_count()
383 ps->channels[channel].count_load_time = ktime_get(); in pit_load_count()
389 switch (ps->channels[0].mode) { in pit_load_count()