vtime.h 718 B

123456789101112131415161718192021
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _S390_VTIME_H
  3. #define _S390_VTIME_H
  4. #define __ARCH_HAS_VTIME_TASK_SWITCH
  5. static inline void update_timer_sys(void)
  6. {
  7. S390_lowcore.system_timer += S390_lowcore.last_update_timer - S390_lowcore.exit_timer;
  8. S390_lowcore.user_timer += S390_lowcore.exit_timer - S390_lowcore.sys_enter_timer;
  9. S390_lowcore.last_update_timer = S390_lowcore.sys_enter_timer;
  10. }
  11. static inline void update_timer_mcck(void)
  12. {
  13. S390_lowcore.system_timer += S390_lowcore.last_update_timer - S390_lowcore.exit_timer;
  14. S390_lowcore.user_timer += S390_lowcore.exit_timer - S390_lowcore.mcck_enter_timer;
  15. S390_lowcore.last_update_timer = S390_lowcore.mcck_enter_timer;
  16. }
  17. #endif /* _S390_VTIME_H */