1 #ifndef __XEN_PV_CONSOLE_H__ 2 #define __XEN_PV_CONSOLE_H__ 3 4 #include <xen/serial.h> 5 6 #ifdef CONFIG_XEN_GUEST 7 8 void pv_console_init(void); 9 void pv_console_set_rx_handler(serial_rx_fn fn); 10 void pv_console_init_postirq(void); 11 void pv_console_puts(const char *buf); 12 size_t pv_console_rx(struct cpu_user_regs *regs); 13 evtchn_port_t pv_console_evtchn(void); 14 15 #else 16 pv_console_init(void)17static inline void pv_console_init(void) {} pv_console_set_rx_handler(serial_rx_fn fn)18static inline void pv_console_set_rx_handler(serial_rx_fn fn) { } pv_console_init_postirq(void)19static inline void pv_console_init_postirq(void) { } pv_console_puts(const char * buf)20static inline void pv_console_puts(const char *buf) { } pv_console_rx(struct cpu_user_regs * regs)21static inline size_t pv_console_rx(struct cpu_user_regs *regs) { return 0; } pv_console_evtchn(void)22evtchn_port_t pv_console_evtchn(void) 23 { 24 ASSERT_UNREACHABLE(); 25 return 0; 26 } 27 28 #endif /* !CONFIG_XEN_GUEST */ 29 #endif /* __XEN_PV_CONSOLE_H__ */ 30 /* 31 * Local variables: 32 * mode: C 33 * c-file-style: "BSD" 34 * c-basic-offset: 4 35 * tab-width: 4 36 * indent-tabs-mode: nil 37 * End: 38 */ 39