File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 10
10
static spinlock_t lock ;
11
11
12
12
static uint32_t serial_handle = SERIAL_INVALID_HANDLE ;
13
+ struct timer console_timer ;
13
14
14
15
#define CONSOLE_KICK_TIMER_TIMEOUT 40 /* timeout is 40ms*/
15
16
@@ -198,7 +199,6 @@ static int console_timer_callback(__unused void *data)
198
199
199
200
void console_setup_timer (void )
200
201
{
201
- static struct timer console_timer ;
202
202
uint64_t period_in_cycle , fire_tsc ;
203
203
204
204
if (serial_handle == SERIAL_INVALID_HANDLE ) {
Original file line number Diff line number Diff line change 8
8
#define CONSOLE_H
9
9
10
10
#ifdef HV_DEBUG
11
+ extern struct timer console_timer ;
12
+
11
13
/** Initializes the console module.
12
14
*
13
15
* @param cdev A pointer to the character device to use for the console.
@@ -62,6 +64,17 @@ void console_dump_bytes(const void *p, unsigned int len);
62
64
void console_setup_timer (void );
63
65
64
66
uint32_t get_serial_handle (void );
67
+
68
+ static inline void suspend_console (void )
69
+ {
70
+ del_timer (& console_timer );
71
+ }
72
+
73
+ static inline void resume_console_enable (void )
74
+ {
75
+ console_setup_timer ();
76
+ }
77
+
65
78
#else
66
79
static inline int console_init (void )
67
80
{
@@ -86,6 +99,9 @@ static inline void console_dump_bytes(__unused const void *p,
86
99
}
87
100
static inline void console_setup_timer (void ) {}
88
101
static inline uint32_t get_serial_handle (void ) { return 0 ; }
102
+
103
+ void suspend_console (void ) {}
104
+ void resume_console_enable (void ) {}
89
105
#endif
90
106
91
107
#endif /* CONSOLE_H */
You can’t perform that action at this time.
0 commit comments