1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _S390_VTIME_H
#define _S390_VTIME_H

static inline void update_timer_sys(void)
{
	struct lowcore *lc = get_lowcore();

	lc->system_timer += lc->last_update_timer - lc->exit_timer;
	lc->user_timer += lc->exit_timer - lc->sys_enter_timer;
	lc->last_update_timer = lc->sys_enter_timer;
}

static inline void update_timer_mcck(void)
{
	struct lowcore *lc = get_lowcore();

	lc->system_timer += lc->last_update_timer - lc->exit_timer;
	lc->user_timer += lc->exit_timer - lc->mcck_enter_timer;
	lc->last_update_timer = lc->mcck_enter_timer;
}

#endif /* _S390_VTIME_H */
一杯敬朝陽 一杯敬月光