summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/vtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/vtime.h')
-rw-r--r--arch/s390/include/asm/vtime.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/s390/include/asm/vtime.h b/arch/s390/include/asm/vtime.h
new file mode 100644
index 000000000000..9d25fb35a042
--- /dev/null
+++ b/arch/s390/include/asm/vtime.h
@@ -0,0 +1,23 @@
+/* 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 */