Lines Matching refs:count_hz
353 return div_u64(delta * vcpu->arch.count_hz, NSEC_PER_SEC); in kvm_mips_ktime_to_count()
512 delta = div_u64(delta * NSEC_PER_SEC, vcpu->arch.count_hz); in kvm_mips_resume_hrtimer()
587 delta = div_u64(delta * NSEC_PER_SEC, vcpu->arch.count_hz); in kvm_mips_restore_hrtimer()
628 void kvm_mips_init_count(struct kvm_vcpu *vcpu, unsigned long count_hz) in kvm_mips_init_count() argument
630 vcpu->arch.count_hz = count_hz; in kvm_mips_init_count()
631 vcpu->arch.count_period = div_u64((u64)NSEC_PER_SEC << 32, count_hz); in kvm_mips_init_count()
649 int kvm_mips_set_count_hz(struct kvm_vcpu *vcpu, s64 count_hz) in kvm_mips_set_count_hz() argument
657 if (count_hz <= 0 || count_hz > NSEC_PER_SEC) in kvm_mips_set_count_hz()
660 if (vcpu->arch.count_hz == count_hz) in kvm_mips_set_count_hz()
673 vcpu->arch.count_hz = count_hz; in kvm_mips_set_count_hz()
674 vcpu->arch.count_period = div_u64((u64)NSEC_PER_SEC << 32, count_hz); in kvm_mips_set_count_hz()
888 vcpu->arch.count_hz); in kvm_mips_set_count_ctl()