bitkeeper revision 1.415 (3f59896f82Ngzs7C7TvsxYpfL-oQRQ)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 6 Sep 2003 07:14:55 +0000 (07:14 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 6 Sep 2003 07:14:55 +0000 (07:14 +0000)
printk.c, init.c, console.c:
  Small cleanups.

xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c
xenolinux-2.4.22-sparse/arch/xeno/mm/init.c
xenolinux-2.4.22-sparse/kernel/printk.c

index e69cd2488e43485cc834254fe01de7697929652a..b93fe47656e57853579dfd18328826b9c1bbfc96 100644 (file)
 
 #define XENO_TTY_MINOR 123
 
-/*** useful function for console debugging -- goes straight to Xen ****/
-
+/*** Useful function for console debugging -- goes straight to Xen ****/
 asmlinkage int xprintk(const char *fmt, ...)
 {
-        va_list args;
-        unsigned long flags;
-        int printed_len;
-        static char printk_buf[1024];
-
-        /* Emit the output into the temporary buffer */
-        va_start(args, fmt);
-        printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
-        va_end(args);
-
-        // Useful Hack if things are going wrong very early in the day
-        (void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf));
+    va_list args;
+    int printk_len;
+    static char printk_buf[1024];
+    
+    /* Emit the output into the temporary buffer */
+    va_start(args, fmt);
+    printk_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
+    va_end(args);
+    
+    /* Send the processed output directly to Xen. */
+    (void)HYPERVISOR_console_write(printk_buf, printk_len);
+
+    return 0;
 }
 
 
index acce1fbfd72d1f0d2cb3f753bac15737bbeed975..352e614a05fbc7c3e23be3ff38c1664fd4097412 100644 (file)
@@ -178,10 +178,6 @@ static void __init fixrange_init (unsigned long start,
                                       (*(unsigned long *)kpte)&~_PAGE_RW);
 
                                set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte)));
-
-                               // XXX Xen below reqd ?
-                               //if (pte != pte_offset(pmd, 0))
-                               //      BUG();
                        }
                        vaddr += PMD_SIZE;
                }
index a46602ca3575bd38e95ccbe0bb0617a16ae70442..5564fccf5d87cd362f982dd9dccf6f149f3bdb87 100644 (file)
@@ -429,9 +429,10 @@ asmlinkage int printk(const char *fmt, ...)
        va_end(args);
 
 #if 0
-// Useful Hack if things are going wrong very early in the day
-(void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf));
+       /* Useful if things are going wrong very early in the day. */
+       (void)HYPERVISOR_console_write(printk_buf, printed_len);
 #endif
+
        /*
         * Copy the output into log_buf.  If the caller didn't provide
         * appropriate log level tags, we insert them here