xref: /linux/arch/s390/include/asm/vtime.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _S390_VTIME_H
3 #define _S390_VTIME_H
4 
update_timer_sys(void)5 static inline void update_timer_sys(void)
6 {
7 	struct lowcore *lc = get_lowcore();
8 
9 	lc->system_timer += lc->last_update_timer - lc->exit_timer;
10 	lc->user_timer += lc->exit_timer - lc->sys_enter_timer;
11 	lc->last_update_timer = lc->sys_enter_timer;
12 }
13 
update_timer_mcck(void)14 static inline void update_timer_mcck(void)
15 {
16 	struct lowcore *lc = get_lowcore();
17 
18 	lc->system_timer += lc->last_update_timer - lc->exit_timer;
19 	lc->user_timer += lc->exit_timer - lc->mcck_enter_timer;
20 	lc->last_update_timer = lc->mcck_enter_timer;
21 }
22 
23 #endif /* _S390_VTIME_H */
24