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

[Xen-changelog] More console-related cleanups.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e13c994bdccbfea46fd702fac8ce844c6fc8496c
# Parent  0a81c6edf2b1222aa1d7b5b5e834c4436d101045
More console-related cleanups.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 0a81c6edf2b1 -r e13c994bdccb 
linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c   Fri Dec  2 15:14:20 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c   Fri Dec  2 15:26:57 2005
@@ -27,8 +27,6 @@
 #include <mach_apic.h>
 #endif
 #include <asm-xen/evtchn.h>
-
-#define xxprint(msg) HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg), msg)
 
 /*
  *     Some notes on x86 processor bugs affecting SMP operation:
@@ -542,9 +540,7 @@
         */
        cpu_clear(smp_processor_id(), cpu_online_map);
        local_irq_disable();
-#if 1
-       xxprint("stop_this_cpu disable_local_APIC\n");
-#else
+#if 0
        disable_local_APIC();
 #endif
        if (cpu_data[smp_processor_id()].hlt_works_ok)
@@ -561,9 +557,7 @@
        smp_call_function(stop_this_cpu, NULL, 1, 0);
 
        local_irq_disable();
-#if 1
-       xxprint("smp_send_stop disable_local_APIC\n");
-#else
+#if 0
        disable_local_APIC();
 #endif
        local_irq_enable();
diff -r 0a81c6edf2b1 -r e13c994bdccb 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c Fri Dec  2 15:14:20 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c Fri Dec  2 15:26:57 2005
@@ -30,8 +30,6 @@
 #include <asm/apicdef.h>
 #ifdef CONFIG_XEN
 #include <asm-xen/evtchn.h>
-
-#define xxprint(msg) HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg), msg)
 
 #else
 /*
@@ -379,8 +377,6 @@
        local_irq_disable();
 #ifndef CONFIG_XEN
        disable_local_APIC();
-#else
-       xxprint("stop_this_cpu disable_local_APIC\n");
 #endif
        local_irq_enable(); 
 }
@@ -409,9 +405,7 @@
                spin_unlock(&call_lock);
 
        local_irq_disable();
-#ifdef CONFIG_XEN
-       xxprint("stop_this_cpu disable_local_APIC\n");
-#else
+#ifndef CONFIG_XEN
        disable_local_APIC();
 #endif
        local_irq_enable();
diff -r 0a81c6edf2b1 -r e13c994bdccb 
linux-2.6-xen-sparse/drivers/xen/console/console.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/console.c        Fri Dec  2 
15:14:20 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c        Fri Dec  2 
15:26:57 2005
@@ -134,19 +134,21 @@
 static void kcons_write(
        struct console *c, const char *s, unsigned int count)
 {
-       int           i;
-       unsigned long flags;
-
-       spin_lock_irqsave(&xencons_lock, flags);
-    
-       for (i = 0; i < count; i++) {
-               if ((wp - wc) >= (wbuf_size - 1))
-                       break;
-               if ((wbuf[WBUF_MASK(wp++)] = s[i]) == '\n')
-                       wbuf[WBUF_MASK(wp++)] = '\r';
-       }
-
-       __xencons_tx_flush();
+       int           i = 0;
+       unsigned long flags;
+
+       spin_lock_irqsave(&xencons_lock, flags);
+
+       while (i < count) {
+               for (; i < count; i++) {
+                       if ((wp - wc) >= (wbuf_size - 1))
+                               break;
+                       if ((wbuf[WBUF_MASK(wp++)] = s[i]) == '\n')
+                               wbuf[WBUF_MASK(wp++)] = '\r';
+               }
+
+               __xencons_tx_flush();
+       }
 
        spin_unlock_irqrestore(&xencons_lock, flags);
 }
diff -r 0a81c6edf2b1 -r e13c994bdccb 
linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c   Fri Dec  2 
15:14:20 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c   Fri Dec  2 
15:26:57 2005
@@ -15,6 +15,7 @@
 
 #include <asm/hypervisor.h>
 #include <asm-xen/evtchn.h>
+#include <asm-xen/xencons.h>
 #include <linux/wait.h>
 #include <linux/interrupt.h>
 #include <linux/sched.h>
@@ -96,7 +97,7 @@
                xen_start_info->console_evtchn,
                handle_input, 0, "xencons", NULL);
        if (err <= 0) {
-               xprintk("XEN console request irq failed %i\n", err);
+               printk(KERN_ERR "XEN console request irq failed %i\n", err);
                return err;
        }
 

_______________________________________________
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®.