stimer            532 arch/x86/include/asm/kvm_host.h 	struct kvm_vcpu_hv_stimer stimer[HV_SYNIC_STIMER_COUNT];
stimer             39 arch/x86/kvm/hyperv.c static void stimer_mark_pending(struct kvm_vcpu_hv_stimer *stimer,
stimer            167 arch/x86/kvm/hyperv.c 	struct kvm_vcpu_hv_stimer *stimer;
stimer            173 arch/x86/kvm/hyperv.c 	for (idx = 0; idx < ARRAY_SIZE(hv_vcpu->stimer); idx++) {
stimer            174 arch/x86/kvm/hyperv.c 		stimer = &hv_vcpu->stimer[idx];
stimer            175 arch/x86/kvm/hyperv.c 		if (stimer->msg_pending && stimer->config.enable &&
stimer            176 arch/x86/kvm/hyperv.c 		    !stimer->config.direct_mode &&
stimer            177 arch/x86/kvm/hyperv.c 		    stimer->config.sintx == sint)
stimer            178 arch/x86/kvm/hyperv.c 			stimer_mark_pending(stimer, false);
stimer            415 arch/x86/kvm/hyperv.c static void stimer_mark_pending(struct kvm_vcpu_hv_stimer *stimer,
stimer            418 arch/x86/kvm/hyperv.c 	struct kvm_vcpu *vcpu = stimer_to_vcpu(stimer);
stimer            420 arch/x86/kvm/hyperv.c 	set_bit(stimer->index,
stimer            427 arch/x86/kvm/hyperv.c static void stimer_cleanup(struct kvm_vcpu_hv_stimer *stimer)
stimer            429 arch/x86/kvm/hyperv.c 	struct kvm_vcpu *vcpu = stimer_to_vcpu(stimer);
stimer            431 arch/x86/kvm/hyperv.c 	trace_kvm_hv_stimer_cleanup(stimer_to_vcpu(stimer)->vcpu_id,
stimer            432 arch/x86/kvm/hyperv.c 				    stimer->index);
stimer            434 arch/x86/kvm/hyperv.c 	hrtimer_cancel(&stimer->timer);
stimer            435 arch/x86/kvm/hyperv.c 	clear_bit(stimer->index,
stimer            437 arch/x86/kvm/hyperv.c 	stimer->msg_pending = false;
stimer            438 arch/x86/kvm/hyperv.c 	stimer->exp_time = 0;
stimer            443 arch/x86/kvm/hyperv.c 	struct kvm_vcpu_hv_stimer *stimer;
stimer            445 arch/x86/kvm/hyperv.c 	stimer = container_of(timer, struct kvm_vcpu_hv_stimer, timer);
stimer            446 arch/x86/kvm/hyperv.c 	trace_kvm_hv_stimer_callback(stimer_to_vcpu(stimer)->vcpu_id,
stimer            447 arch/x86/kvm/hyperv.c 				     stimer->index);
stimer            448 arch/x86/kvm/hyperv.c 	stimer_mark_pending(stimer, true);
stimer            458 arch/x86/kvm/hyperv.c static int stimer_start(struct kvm_vcpu_hv_stimer *stimer)
stimer            463 arch/x86/kvm/hyperv.c 	time_now = get_time_ref_counter(stimer_to_vcpu(stimer)->kvm);
stimer            466 arch/x86/kvm/hyperv.c 	if (stimer->config.periodic) {
stimer            467 arch/x86/kvm/hyperv.c 		if (stimer->exp_time) {
stimer            468 arch/x86/kvm/hyperv.c 			if (time_now >= stimer->exp_time) {
stimer            471 arch/x86/kvm/hyperv.c 				div64_u64_rem(time_now - stimer->exp_time,
stimer            472 arch/x86/kvm/hyperv.c 					      stimer->count, &remainder);
stimer            473 arch/x86/kvm/hyperv.c 				stimer->exp_time =
stimer            474 arch/x86/kvm/hyperv.c 					time_now + (stimer->count - remainder);
stimer            477 arch/x86/kvm/hyperv.c 			stimer->exp_time = time_now + stimer->count;
stimer            480 arch/x86/kvm/hyperv.c 					stimer_to_vcpu(stimer)->vcpu_id,
stimer            481 arch/x86/kvm/hyperv.c 					stimer->index,
stimer            482 arch/x86/kvm/hyperv.c 					time_now, stimer->exp_time);
stimer            484 arch/x86/kvm/hyperv.c 		hrtimer_start(&stimer->timer,
stimer            486 arch/x86/kvm/hyperv.c 					   100 * (stimer->exp_time - time_now)),
stimer            490 arch/x86/kvm/hyperv.c 	stimer->exp_time = stimer->count;
stimer            491 arch/x86/kvm/hyperv.c 	if (time_now >= stimer->count) {
stimer            498 arch/x86/kvm/hyperv.c 		stimer_mark_pending(stimer, false);
stimer            502 arch/x86/kvm/hyperv.c 	trace_kvm_hv_stimer_start_one_shot(stimer_to_vcpu(stimer)->vcpu_id,
stimer            503 arch/x86/kvm/hyperv.c 					   stimer->index,
stimer            504 arch/x86/kvm/hyperv.c 					   time_now, stimer->count);
stimer            506 arch/x86/kvm/hyperv.c 	hrtimer_start(&stimer->timer,
stimer            507 arch/x86/kvm/hyperv.c 		      ktime_add_ns(ktime_now, 100 * (stimer->count - time_now)),
stimer            512 arch/x86/kvm/hyperv.c static int stimer_set_config(struct kvm_vcpu_hv_stimer *stimer, u64 config,
stimer            516 arch/x86/kvm/hyperv.c 		old_config = {.as_uint64 = stimer->config.as_uint64};
stimer            518 arch/x86/kvm/hyperv.c 	trace_kvm_hv_stimer_set_config(stimer_to_vcpu(stimer)->vcpu_id,
stimer            519 arch/x86/kvm/hyperv.c 				       stimer->index, config, host);
stimer            521 arch/x86/kvm/hyperv.c 	stimer_cleanup(stimer);
stimer            525 arch/x86/kvm/hyperv.c 	stimer->config.as_uint64 = new_config.as_uint64;
stimer            527 arch/x86/kvm/hyperv.c 	if (stimer->config.enable)
stimer            528 arch/x86/kvm/hyperv.c 		stimer_mark_pending(stimer, false);
stimer            533 arch/x86/kvm/hyperv.c static int stimer_set_count(struct kvm_vcpu_hv_stimer *stimer, u64 count,
stimer            536 arch/x86/kvm/hyperv.c 	trace_kvm_hv_stimer_set_count(stimer_to_vcpu(stimer)->vcpu_id,
stimer            537 arch/x86/kvm/hyperv.c 				      stimer->index, count, host);
stimer            539 arch/x86/kvm/hyperv.c 	stimer_cleanup(stimer);
stimer            540 arch/x86/kvm/hyperv.c 	stimer->count = count;
stimer            541 arch/x86/kvm/hyperv.c 	if (stimer->count == 0)
stimer            542 arch/x86/kvm/hyperv.c 		stimer->config.enable = 0;
stimer            543 arch/x86/kvm/hyperv.c 	else if (stimer->config.auto_enable)
stimer            544 arch/x86/kvm/hyperv.c 		stimer->config.enable = 1;
stimer            546 arch/x86/kvm/hyperv.c 	if (stimer->config.enable)
stimer            547 arch/x86/kvm/hyperv.c 		stimer_mark_pending(stimer, false);
stimer            552 arch/x86/kvm/hyperv.c static int stimer_get_config(struct kvm_vcpu_hv_stimer *stimer, u64 *pconfig)
stimer            554 arch/x86/kvm/hyperv.c 	*pconfig = stimer->config.as_uint64;
stimer            558 arch/x86/kvm/hyperv.c static int stimer_get_count(struct kvm_vcpu_hv_stimer *stimer, u64 *pcount)
stimer            560 arch/x86/kvm/hyperv.c 	*pcount = stimer->count;
stimer            621 arch/x86/kvm/hyperv.c static int stimer_send_msg(struct kvm_vcpu_hv_stimer *stimer)
stimer            623 arch/x86/kvm/hyperv.c 	struct kvm_vcpu *vcpu = stimer_to_vcpu(stimer);
stimer            624 arch/x86/kvm/hyperv.c 	struct hv_message *msg = &stimer->msg;
stimer            632 arch/x86/kvm/hyperv.c 	bool no_retry = stimer->config.periodic;
stimer            634 arch/x86/kvm/hyperv.c 	payload->expiration_time = stimer->exp_time;
stimer            637 arch/x86/kvm/hyperv.c 				 stimer->config.sintx, msg,
stimer            641 arch/x86/kvm/hyperv.c static int stimer_notify_direct(struct kvm_vcpu_hv_stimer *stimer)
stimer            643 arch/x86/kvm/hyperv.c 	struct kvm_vcpu *vcpu = stimer_to_vcpu(stimer);
stimer            646 arch/x86/kvm/hyperv.c 		.vector = stimer->config.apic_vector
stimer            654 arch/x86/kvm/hyperv.c static void stimer_expiration(struct kvm_vcpu_hv_stimer *stimer)
stimer            656 arch/x86/kvm/hyperv.c 	int r, direct = stimer->config.direct_mode;
stimer            658 arch/x86/kvm/hyperv.c 	stimer->msg_pending = true;
stimer            660 arch/x86/kvm/hyperv.c 		r = stimer_send_msg(stimer);
stimer            662 arch/x86/kvm/hyperv.c 		r = stimer_notify_direct(stimer);
stimer            663 arch/x86/kvm/hyperv.c 	trace_kvm_hv_stimer_expiration(stimer_to_vcpu(stimer)->vcpu_id,
stimer            664 arch/x86/kvm/hyperv.c 				       stimer->index, direct, r);
stimer            666 arch/x86/kvm/hyperv.c 		stimer->msg_pending = false;
stimer            667 arch/x86/kvm/hyperv.c 		if (!(stimer->config.periodic))
stimer            668 arch/x86/kvm/hyperv.c 			stimer->config.enable = 0;
stimer            675 arch/x86/kvm/hyperv.c 	struct kvm_vcpu_hv_stimer *stimer;
stimer            679 arch/x86/kvm/hyperv.c 	for (i = 0; i < ARRAY_SIZE(hv_vcpu->stimer); i++)
stimer            681 arch/x86/kvm/hyperv.c 			stimer = &hv_vcpu->stimer[i];
stimer            682 arch/x86/kvm/hyperv.c 			if (stimer->config.enable) {
stimer            683 arch/x86/kvm/hyperv.c 				exp_time = stimer->exp_time;
stimer            689 arch/x86/kvm/hyperv.c 						stimer_expiration(stimer);
stimer            692 arch/x86/kvm/hyperv.c 				if ((stimer->config.enable) &&
stimer            693 arch/x86/kvm/hyperv.c 				    stimer->count) {
stimer            694 arch/x86/kvm/hyperv.c 					if (!stimer->msg_pending)
stimer            695 arch/x86/kvm/hyperv.c 						stimer_start(stimer);
stimer            697 arch/x86/kvm/hyperv.c 					stimer_cleanup(stimer);
stimer            707 arch/x86/kvm/hyperv.c 	for (i = 0; i < ARRAY_SIZE(hv_vcpu->stimer); i++)
stimer            708 arch/x86/kvm/hyperv.c 		stimer_cleanup(&hv_vcpu->stimer[i]);
stimer            729 arch/x86/kvm/hyperv.c static void stimer_prepare_msg(struct kvm_vcpu_hv_stimer *stimer)
stimer            731 arch/x86/kvm/hyperv.c 	struct hv_message *msg = &stimer->msg;
stimer            739 arch/x86/kvm/hyperv.c 	payload->timer_index = stimer->index;
stimer            744 arch/x86/kvm/hyperv.c static void stimer_init(struct kvm_vcpu_hv_stimer *stimer, int timer_index)
stimer            746 arch/x86/kvm/hyperv.c 	memset(stimer, 0, sizeof(*stimer));
stimer            747 arch/x86/kvm/hyperv.c 	stimer->index = timer_index;
stimer            748 arch/x86/kvm/hyperv.c 	hrtimer_init(&stimer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
stimer            749 arch/x86/kvm/hyperv.c 	stimer->timer.function = stimer_timer_callback;
stimer            750 arch/x86/kvm/hyperv.c 	stimer_prepare_msg(stimer);
stimer            761 arch/x86/kvm/hyperv.c 	for (i = 0; i < ARRAY_SIZE(hv_vcpu->stimer); i++)
stimer            762 arch/x86/kvm/hyperv.c 		stimer_init(&hv_vcpu->stimer[i], i);
stimer             71 arch/x86/kvm/hyperv.h 	return &vcpu_to_hv_vcpu(vcpu)->stimer[timer_index];
stimer             74 arch/x86/kvm/hyperv.h static inline struct kvm_vcpu *stimer_to_vcpu(struct kvm_vcpu_hv_stimer *stimer)
stimer             78 arch/x86/kvm/hyperv.h 	hv_vcpu = container_of(stimer - stimer->index, struct kvm_vcpu_hv,
stimer             79 arch/x86/kvm/hyperv.h 			       stimer[0]);
stimer            308 sound/pci/trident/trident.h 	unsigned int stimer;		/* global sample timer (to detect spurious interrupts) */
stimer           1567 sound/pci/trident/trident_main.c 					evoice->stimer = val;
stimer           1571 sound/pci/trident/trident_main.c 				voice->stimer = val;
stimer           3706 sound/pci/trident/trident_main.c 	unsigned int audio_int, chn_int, stimer, channel, mask, tmp;
stimer           3716 sound/pci/trident/trident_main.c 		stimer = inl(TRID_REG(trident, T4D_STIMER)) & 0x00ffffff;
stimer           3734 sound/pci/trident/trident_main.c 			delta = (int)stimer - (int)voice->stimer;
stimer           3744 sound/pci/trident/trident_main.c 			voice->stimer = stimer;