Lines Matching refs:cval
141 static void timer_set_cval(struct arch_timer_context *ctxt, u64 cval) in timer_set_cval() argument
147 __vcpu_sys_reg(vcpu, CNTV_CVAL_EL0) = cval; in timer_set_cval()
150 __vcpu_sys_reg(vcpu, CNTP_CVAL_EL0) = cval; in timer_set_cval()
153 __vcpu_sys_reg(vcpu, CNTHV_CVAL_EL2) = cval; in timer_set_cval()
156 __vcpu_sys_reg(vcpu, CNTHP_CVAL_EL2) = cval; in timer_set_cval()
384 u64 cval, now; in kvm_timer_should_fire() local
417 cval = timer_get_cval(timer_ctx); in kvm_timer_should_fire()
420 return cval <= now; in kvm_timer_should_fire()
513 u64 cval; in timer_save_state() local
544 cval = read_sysreg_el0(SYS_CNTP_CVAL); in timer_save_state()
546 cval -= timer_get_offset(ctx); in timer_save_state()
548 timer_set_cval(ctx, cval); in timer_save_state()
619 u64 cval, offset; in timer_restore_state() local
630 cval = timer_get_cval(ctx); in timer_restore_state()
633 cval += offset; in timer_restore_state()
634 write_sysreg_el0(cval, SYS_CNTP_CVAL); in timer_restore_state()