xref: /linux/arch/um/include/shared/timetravel.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
133c7d061SJohannes Berg /* SPDX-License-Identifier: GPL-2.0 */
233c7d061SJohannes Berg /*
333c7d061SJohannes Berg  * Copyright (C) 2019-2021 Intel Corporation
433c7d061SJohannes Berg  */
533c7d061SJohannes Berg #ifndef _UM_TIME_TRAVEL_H_
633c7d061SJohannes Berg #define _UM_TIME_TRAVEL_H_
733c7d061SJohannes Berg 
833c7d061SJohannes Berg enum time_travel_mode {
933c7d061SJohannes Berg 	TT_MODE_OFF,
1033c7d061SJohannes Berg 	TT_MODE_BASIC,
1133c7d061SJohannes Berg 	TT_MODE_INFCPU,
1233c7d061SJohannes Berg 	TT_MODE_EXTERNAL,
1333c7d061SJohannes Berg };
1433c7d061SJohannes Berg 
1533c7d061SJohannes Berg #if defined(UML_CONFIG_UML_TIME_TRAVEL_SUPPORT) || \
1633c7d061SJohannes Berg     defined(CONFIG_UML_TIME_TRAVEL_SUPPORT)
1733c7d061SJohannes Berg extern enum time_travel_mode time_travel_mode;
18*6555acdeSMordechay Goodstein extern int time_travel_should_print_bc_msg;
1933c7d061SJohannes Berg #else
2033c7d061SJohannes Berg #define time_travel_mode TT_MODE_OFF
21*6555acdeSMordechay Goodstein #define time_travel_should_print_bc_msg 0
2233c7d061SJohannes Berg #endif /* (UML_)CONFIG_UML_TIME_TRAVEL_SUPPORT */
2333c7d061SJohannes Berg 
24*6555acdeSMordechay Goodstein void _time_travel_print_bc_msg(void);
time_travel_print_bc_msg(void)25*6555acdeSMordechay Goodstein static inline void time_travel_print_bc_msg(void)
26*6555acdeSMordechay Goodstein {
27*6555acdeSMordechay Goodstein 	if (time_travel_should_print_bc_msg)
28*6555acdeSMordechay Goodstein 		_time_travel_print_bc_msg();
29*6555acdeSMordechay Goodstein }
30*6555acdeSMordechay Goodstein 
3133c7d061SJohannes Berg #endif /* _UM_TIME_TRAVEL_H_ */
32