Lines Matching refs:cval
127 static void timer_set_cval(struct arch_timer_context *ctxt, u64 cval) in timer_set_cval() argument
133 __vcpu_assign_sys_reg(vcpu, CNTV_CVAL_EL0, cval); in timer_set_cval()
136 __vcpu_assign_sys_reg(vcpu, CNTP_CVAL_EL0, cval); in timer_set_cval()
139 __vcpu_assign_sys_reg(vcpu, CNTHV_CVAL_EL2, cval); in timer_set_cval()
142 __vcpu_assign_sys_reg(vcpu, CNTHP_CVAL_EL2, cval); in timer_set_cval()
358 u64 cval, now; in kvm_timer_should_fire() local
391 cval = timer_get_cval(timer_ctx); in kvm_timer_should_fire()
394 return cval <= now; in kvm_timer_should_fire()
505 u64 cval; in timer_save_state() local
510 cval = read_sysreg_el0(SYS_CNTV_CVAL); in timer_save_state()
513 cval -= timer_get_offset(ctx); in timer_save_state()
515 timer_set_cval(ctx, cval); in timer_save_state()
541 cval = read_sysreg_el0(SYS_CNTP_CVAL); in timer_save_state()
543 cval -= timer_get_offset(ctx); in timer_save_state()
545 timer_set_cval(ctx, cval); in timer_save_state()
616 u64 cval, offset; in timer_restore_state() local
620 cval = timer_get_cval(ctx); in timer_restore_state()
624 cval += offset; in timer_restore_state()
628 write_sysreg_el0(cval, SYS_CNTV_CVAL); in timer_restore_state()
634 cval = timer_get_cval(ctx); in timer_restore_state()
637 cval += offset; in timer_restore_state()
638 write_sysreg_el0(cval, SYS_CNTP_CVAL); in timer_restore_state()