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

[Xen-changelog] [xen-3.2-testing] x86 acpi: Clean up output tracing. Ensure it is synced to serial line



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1214582491 -3600
# Node ID 3303257b7b3c583382a95f03b13388e3203e5967
# Parent  df2af4150d76d4d2f55ef258ee7314a1b6235c6e
x86 acpi: Clean up output tracing. Ensure it is synced to serial line
before entering Sx state.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   17883:ad156e312aefd4deca7d968c13a6b9ed0ece45f8
xen-unstable date:        Fri Jun 20 15:21:04 2008 +0100
---
 xen/arch/x86/acpi/power.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff -r df2af4150d76 -r 3303257b7b3c xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c Fri Jun 27 17:00:59 2008 +0100
+++ b/xen/arch/x86/acpi/power.c Fri Jun 27 17:01:31 2008 +0100
@@ -27,8 +27,6 @@
 #include <public/platform.h>
 #include <asm/tboot.h>
 
-#define pmprintk(_l, _f, _a...) printk(_l "<PM> " _f "\n", ## _a )
-
 static char opt_acpi_sleep[20];
 string_param("acpi_sleep", opt_acpi_sleep);
 
@@ -124,7 +122,7 @@ static int enter_state(u32 state)
     if ( !spin_trylock(&pm_lock) )
         return -EBUSY;
 
-    pmprintk(XENLOG_INFO, "Preparing system for ACPI S%d state.", state);
+    printk(XENLOG_INFO "Preparing system for ACPI S%d state.", state);
 
     freeze_domains();
 
@@ -139,11 +137,14 @@ static int enter_state(u32 state)
 
     acpi_sleep_prepare(state);
 
+    console_start_sync();
+    printk("Entering ACPI S%d state.\n", state);
+
     local_irq_save(flags);
 
     if ( (error = device_power_down()) )
     {
-        pmprintk(XENLOG_ERR, "Some devices failed to power down.");
+        printk(XENLOG_ERR "Some devices failed to power down.");
         goto done;
     }
 
@@ -162,8 +163,6 @@ static int enter_state(u32 state)
         break;
     }
 
-    pmprintk(XENLOG_DEBUG, "Back to C.");
-
     /* Restore CR4 and EFER from cached values. */
     write_cr4(read_cr4());
     if ( cpu_has_efer )
@@ -171,10 +170,11 @@ static int enter_state(u32 state)
 
     device_power_up();
 
-    pmprintk(XENLOG_INFO, "Finishing wakeup from ACPI S%d state.", state);
+    printk(XENLOG_INFO "Finishing wakeup from ACPI S%d state.", state);
 
  done:
     local_irq_restore(flags);
+    console_end_sync();
     acpi_sleep_post(state);
     if ( !hvm_cpu_up() )
         BUG();
@@ -206,7 +206,7 @@ int acpi_enter_sleep(struct xenpf_enter_
          ((sleep->pm1a_cnt_val ^ sleep->pm1b_cnt_val) &
           ACPI_BITMASK_SLEEP_ENABLE) )
     {
-        pmprintk(XENLOG_ERR, "Mismatched pm1a/pm1b setting.");
+        gdprintk(XENLOG_ERR, "Mismatched pm1a/pm1b setting.");
         return -EINVAL;
     }
 
@@ -264,7 +264,7 @@ acpi_status asmlinkage acpi_enter_sleep_
     if ( tboot_in_measured_env() )
     {
         tboot_sleep(sleep_state);
-        pmprintk(XENLOG_ERR, "TBOOT failed entering s3 state\n");
+        printk(XENLOG_ERR "TBOOT failed entering s3 state\n");
         return_ACPI_STATUS(AE_ERROR);
     }
 
@@ -297,7 +297,7 @@ static int __init acpi_sleep_init(void)
             p += strspn(p, ", \t");
     }
 
-    printk(XENLOG_INFO "<PM> ACPI (supports");
+    printk(XENLOG_INFO "ACPI sleep modes:");
     for ( i = 0; i < ACPI_S_STATE_COUNT; i++ )
     {
         if ( i == ACPI_STATE_S3 )
@@ -308,7 +308,7 @@ static int __init acpi_sleep_init(void)
         else
             sleep_states[i] = 0;
     }
-    printk(")\n");
+    printk("\n");
 
     return 0;
 }

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