linux: make xencons separately configurable and modular
PATCH 1/1 linux: make xencons separately configurable and modular
This is a little more involved because there had been hard calls into the console code from reboot.c. Only compile tested so far.
Jan
drivers/xen/Kconfig +6 -0
@@ -160,6 +160,12 @@ config XEN_TPMDEV_FRONTEND select TCG_XEN help The TPM-device frontend driver. + +config XEN_CONSOLE + tristate "Xen virtual console" + default y + help + The Xen virtual console is ... config XEN_NETDEV_LOOPBACK tristate "Network-device loopback driver"
drivers/xen/console/Makefile +2 -1
@@ -1,2 +1,3 @@ +obj-$(CONFIG_XEN_CONSOLE) := xencons.o -obj-y := console.o xencons_ring.o +xencons-y := console.o xencons_ring.o
drivers/xen/console/console.c +71 -4
166 lines not on this page · raw message
drivers/xen/console/xencons_ring.c +0 -5
@@ -109,11 +109,6 @@ int xencons_ring_init(void)return 0 ; } -void xencons_resume (void ) -{ - (void )xencons_ring_init (); -} -/* * Local variables: * c-file-style: "linux"
drivers/xen/core/reboot.c +7 -0
@@ -25,6 +25,13 @@ void (*pm_power_off)(void);EXPORT_SYMBOL (pm_power_off);#endif +#ifdef CONFIG_XEN_CONSOLE_MODULE +void (*__xencons_force_flush)(void ) =NULL ; +EXPORT_SYMBOL (__xencons_force_flush); +void (*__xencons_resume)(void ) =NULL ; +EXPORT_SYMBOL (__xencons_resume); +#endif +#define SHUTDOWN_INVALID -1#define SHUTDOWN_POWEROFF 0#define SHUTDOWN_REBOOT 1
include/xen/xencons.h +21 -0
@@ -1,8 +1,29 @@#ifndef __ASM_XENCONS_H__#define __ASM_XENCONS_H__ +#ifdef CONFIG_XEN_CONSOLE void xencons_force_flush (void );void xencons_resume (void ); +#else +#ifdef CONFIG_XEN_CONSOLE_MODULE +extern void (*__xencons_force_flush)(void ); +extern void (*__xencons_resume)(void ); +#endif +static inline void xencons_force_flush (void ) +{ +#ifdef CONFIG_XEN_CONSOLE_MODULE +if (__xencons_force_flush) +__xencons_force_flush (); +#endif +} +static inline void xencons_resume (void ) +{ +#ifdef CONFIG_XEN_CONSOLE_MODULE +if (__xencons_resume) +__xencons_resume (); +#endif +} +#endif /* Interrupt work hooks. Receive data, or kick data out. */ void xencons_rx (char *buf,unsigned len,struct pt_regs *regs);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Jan Beulich
This is a little more involved because there had been hard calls into the console code from
reboot.c. Only compile tested so far.
Why would you want to make the console driver modular? It's the only way for domains to get early boot information out to the user.
-- Keir
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Keir Fraser <[email protected]> 28.02.06 18:33:23 >>>
Quoted 3 lines · Jan Beulich
This is a little more involved because there had been hard calls into the console code from
reboot.c. Only compile
tested so far.Why would you want to make the console driver modular? It's the only way for domains to get early boot information out to the user.
Right. But dom0 doesn't necessarily need this early on, nor would a kernel running on micro-Xen need it.
Jan