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()
368 u64 cval, now; in kvm_timer_should_fire() local
401 cval = timer_get_cval(timer_ctx); in kvm_timer_should_fire()
404 return cval <= now; in kvm_timer_should_fire()
514 u64 cval; in timer_save_state() local
519 cval = read_sysreg_el0(SYS_CNTV_CVAL); in timer_save_state()
522 cval -= timer_get_offset(ctx); in timer_save_state()
524 timer_set_cval(ctx, cval); in timer_save_state()
550 cval = read_sysreg_el0(SYS_CNTP_CVAL); in timer_save_state()
552 cval -= timer_get_offset(ctx); in timer_save_state()
554 timer_set_cval(ctx, cval); in timer_save_state()
625 u64 cval, offset; in timer_restore_state() local
629 cval = timer_get_cval(ctx); in timer_restore_state()
633 cval += offset; in timer_restore_state()
637 write_sysreg_el0(cval, SYS_CNTV_CVAL); in timer_restore_state()
643 cval = timer_get_cval(ctx); in timer_restore_state()
646 cval += offset; in timer_restore_state()
647 write_sysreg_el0(cval, SYS_CNTP_CVAL); in timer_restore_state()