[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.0-testing] [XEN] Add a warning banner when 'sync_console' is used. Make it



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 473e91b8b6cb9ef6c7c584804bd635a70a58beca
# Parent  0baa7b54a19d2f854cb0227a0463a3904e6fd731
[XEN] Add a warning banner when 'sync_console' is used. Make it
very obvious and mildly annoying.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   10468:06b10ad218f450732d9ed2e694b11f403edffd46
xen-unstable date:        Tue Jun 20 18:19:07 2006 +0100
---
 xen/common/kernel.c        |    5 +++--
 xen/drivers/char/console.c |   24 ++++++++++++++++++++++++
 xen/include/xen/lib.h      |    1 +
 3 files changed, 28 insertions(+), 2 deletions(-)

diff -r 0baa7b54a19d -r 473e91b8b6cb xen/common/kernel.c
--- a/xen/common/kernel.c       Tue Jun 20 15:41:40 2006 +0100
+++ b/xen/common/kernel.c       Tue Jun 20 18:22:34 2006 +0100
@@ -96,10 +96,11 @@ char *print_tainted(char *str)
 {
     if ( tainted )
     {
-        snprintf(str, TAINT_STRING_MAX_LEN, "Tainted: %c%c%c",
+        snprintf(str, TAINT_STRING_MAX_LEN, "Tainted: %c%c%c%c",
                  tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
                  tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
-                 tainted & TAINT_BAD_PAGE ? 'B' : ' ');
+                 tainted & TAINT_BAD_PAGE ? 'B' : ' ',
+                 tainted & TAINT_SYNC_CONSOLE ? 'C' : ' ');
     }
     else
     {
diff -r 0baa7b54a19d -r 473e91b8b6cb xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Tue Jun 20 15:41:40 2006 +0100
+++ b/xen/drivers/char/console.c        Tue Jun 20 18:22:34 2006 +0100
@@ -494,12 +494,36 @@ void init_console(void)
     if ( opt_sync_console )
     {
         serial_start_sync(sercon_handle);
+        add_taint(TAINT_SYNC_CONSOLE);
         printk("Console output is synchronous.\n");
     }
 }
 
 void console_endboot(int disable_vga)
 {
+    int i;
+
+    if ( opt_sync_console )
+    {
+        printk("**********************************************\n");
+        printk("******* WARNING: CONSOLE OUTPUT IS SYCHRONOUS\n");
+        printk("******* This option is intended to aid debugging "
+               "of Xen by ensuring\n");
+        printk("******* that all output is synchronously delivered "
+               "on the serial line.\n");
+        printk("******* However it can introduce SIGNIFICANT latencies "
+               "and affect\n");
+        printk("******* timekeeping. It is NOT recommended for "
+               "production use!\n");
+        printk("**********************************************\n");
+        for ( i = 0; i < 3; i++ )
+        {
+            printk("%d... ", 3-i);
+            mdelay(1000);
+        }
+        printk("\n");
+    }
+
     if ( disable_vga )
         vgacon_enabled = 0;
 
diff -r 0baa7b54a19d -r 473e91b8b6cb xen/include/xen/lib.h
--- a/xen/include/xen/lib.h     Tue Jun 20 15:41:40 2006 +0100
+++ b/xen/include/xen/lib.h     Tue Jun 20 18:22:34 2006 +0100
@@ -79,6 +79,7 @@ unsigned long long parse_size_and_unit(c
 #define TAINT_UNSAFE_SMP                (1<<0)
 #define TAINT_MACHINE_CHECK             (1<<1)
 #define TAINT_BAD_PAGE                  (1<<2)
+#define TAINT_SYNC_CONSOLE              (1<<3)
 extern int tainted;
 #define TAINT_STRING_MAX_LEN            20
 extern char *print_tainted(char *str);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.