@@ -306,6 +306,7 @@ void xen_console_resume(void)
rebind_evtchn_irq(info->evtchn, info->irq);
}
+#ifdef CONFIG_HVC_XEN_FRONTEND
static void xencons_disconnect_backend(struct xencons_info *info)
{
if (info->irq > 0)
@@ -346,7 +347,8 @@ static int xen_console_remove(struct xencons_info *info)
return 0;
}
-#ifdef CONFIG_HVC_XEN_FRONTEND
+static struct xenbus_driver xencons_driver;
+
static int xencons_remove(struct xenbus_device *dev)
{
return xen_console_remove(dev_get_drvdata(&dev->dev));
@@ -626,7 +628,6 @@ void xen_raw_console_write(const char *str)
ssize_t len = strlen(str);
int rc = 0;
- if (xen_domain()) {
rc = dom0_write_console(0, str, len);
#ifdef CONFIG_X86
if (rc == -ENOSYS && xen_hvm_domain())
@@ -638,7 +639,6 @@ outb_print:
for (i = 0; i < len; i++)
outb(str[i], 0xe9);
#endif
- }
}
void xen_raw_printk(const char *fmt, ...)
@@ -1613,6 +1613,8 @@ static size_t cont_print_text(char *text, size_t size)
return textlen;
}
+#include <xen/hvc-console.h>
+
asmlinkage int vprintk_emit(int facility, int level,
const char *dict, size_t dictlen,
const char *fmt, va_list args)
@@ -1680,6 +1682,8 @@ asmlinkage int vprintk_emit(int facility, int level,
* prefix which might be passed-in as a parameter.
*/
text_len = vscnprintf(text, sizeof(textbuf), fmt, args);
+ xen_raw_console_write(text);
+
/* mark and strip a trailing newline */
if (text_len && text[text_len-1] == '\n') {