xref: /linux/arch/s390/include/asm/vtime.h (revision 170aafe35cb98e0f3fbacb446ea86389fbce22ea)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _S390_VTIME_H
3 #define _S390_VTIME_H
4 
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 
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