|
@@ -543,16 +543,15 @@ void kvm_mips_write_count(struct kvm_vcpu *vcpu, u32 count)
|
|
|
/**
|
|
|
* kvm_mips_init_count() - Initialise timer.
|
|
|
* @vcpu: Virtual CPU.
|
|
|
+ * @count_hz: Frequency of timer.
|
|
|
*
|
|
|
- * Initialise the timer to a sensible frequency, namely 100MHz, zero it, and set
|
|
|
- * it going if it's enabled.
|
|
|
+ * Initialise the timer to the specified frequency, zero it, and set it going if
|
|
|
+ * it's enabled.
|
|
|
*/
|
|
|
-void kvm_mips_init_count(struct kvm_vcpu *vcpu)
|
|
|
+void kvm_mips_init_count(struct kvm_vcpu *vcpu, unsigned long count_hz)
|
|
|
{
|
|
|
- /* 100 MHz */
|
|
|
- vcpu->arch.count_hz = 100*1000*1000;
|
|
|
- vcpu->arch.count_period = div_u64((u64)NSEC_PER_SEC << 32,
|
|
|
- vcpu->arch.count_hz);
|
|
|
+ vcpu->arch.count_hz = count_hz;
|
|
|
+ vcpu->arch.count_period = div_u64((u64)NSEC_PER_SEC << 32, count_hz);
|
|
|
vcpu->arch.count_dyn_bias = 0;
|
|
|
|
|
|
/* Starting at 0 */
|