ia64/xen-unstable

changeset 17897:ad156e312aef

x86 acpi: Clean up output tracing. Ensure it is synced to serial line
before entering Sx state.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 20 15:21:04 2008 +0100 (2008-06-20)
parents 26ecd1f9e128
children 926a366ca82f
files xen/arch/x86/acpi/power.c
line diff
     1.1 --- a/xen/arch/x86/acpi/power.c	Fri Jun 20 12:26:23 2008 +0100
     1.2 +++ b/xen/arch/x86/acpi/power.c	Fri Jun 20 15:21:04 2008 +0100
     1.3 @@ -27,8 +27,6 @@
     1.4  #include <public/platform.h>
     1.5  #include <asm/tboot.h>
     1.6  
     1.7 -#define pmprintk(_l, _f, _a...) printk(_l "<PM> " _f "\n", ## _a )
     1.8 -
     1.9  static char opt_acpi_sleep[20];
    1.10  string_param("acpi_sleep", opt_acpi_sleep);
    1.11  
    1.12 @@ -124,7 +122,7 @@ static int enter_state(u32 state)
    1.13      if ( !spin_trylock(&pm_lock) )
    1.14          return -EBUSY;
    1.15  
    1.16 -    pmprintk(XENLOG_INFO, "Preparing system for ACPI S%d state.", state);
    1.17 +    printk(XENLOG_INFO "Preparing system for ACPI S%d state.", state);
    1.18  
    1.19      freeze_domains();
    1.20  
    1.21 @@ -139,11 +137,14 @@ static int enter_state(u32 state)
    1.22  
    1.23      acpi_sleep_prepare(state);
    1.24  
    1.25 +    console_start_sync();
    1.26 +    printk("Entering ACPI S%d state.\n", state);
    1.27 +
    1.28      local_irq_save(flags);
    1.29  
    1.30      if ( (error = device_power_down()) )
    1.31      {
    1.32 -        pmprintk(XENLOG_ERR, "Some devices failed to power down.");
    1.33 +        printk(XENLOG_ERR "Some devices failed to power down.");
    1.34          goto done;
    1.35      }
    1.36  
    1.37 @@ -162,8 +163,6 @@ static int enter_state(u32 state)
    1.38          break;
    1.39      }
    1.40  
    1.41 -    pmprintk(XENLOG_DEBUG, "Back to C.");
    1.42 -
    1.43      /* Restore CR4 and EFER from cached values. */
    1.44      write_cr4(read_cr4());
    1.45      if ( cpu_has_efer )
    1.46 @@ -171,10 +170,11 @@ static int enter_state(u32 state)
    1.47  
    1.48      device_power_up();
    1.49  
    1.50 -    pmprintk(XENLOG_INFO, "Finishing wakeup from ACPI S%d state.", state);
    1.51 +    printk(XENLOG_INFO "Finishing wakeup from ACPI S%d state.", state);
    1.52  
    1.53   done:
    1.54      local_irq_restore(flags);
    1.55 +    console_end_sync();
    1.56      acpi_sleep_post(state);
    1.57      if ( !hvm_cpu_up() )
    1.58          BUG();
    1.59 @@ -206,7 +206,7 @@ int acpi_enter_sleep(struct xenpf_enter_
    1.60           ((sleep->pm1a_cnt_val ^ sleep->pm1b_cnt_val) &
    1.61            ACPI_BITMASK_SLEEP_ENABLE) )
    1.62      {
    1.63 -        pmprintk(XENLOG_ERR, "Mismatched pm1a/pm1b setting.");
    1.64 +        gdprintk(XENLOG_ERR, "Mismatched pm1a/pm1b setting.");
    1.65          return -EINVAL;
    1.66      }
    1.67  
    1.68 @@ -278,7 +278,7 @@ acpi_status asmlinkage acpi_enter_sleep_
    1.69      if ( tboot_in_measured_env() )
    1.70      {
    1.71          tboot_sleep(sleep_state);
    1.72 -        pmprintk(XENLOG_ERR, "TBOOT failed entering s3 state\n");
    1.73 +        printk(XENLOG_ERR "TBOOT failed entering s3 state\n");
    1.74          return_ACPI_STATUS(AE_ERROR);
    1.75      }
    1.76  
    1.77 @@ -320,7 +320,7 @@ static int __init acpi_sleep_init(void)
    1.78              p += strspn(p, ", \t");
    1.79      }
    1.80  
    1.81 -    printk(XENLOG_INFO "<PM> ACPI (supports");
    1.82 +    printk(XENLOG_INFO "ACPI sleep modes:");
    1.83      for ( i = 0; i < ACPI_S_STATE_COUNT; i++ )
    1.84      {
    1.85          if ( i == ACPI_STATE_S3 )
    1.86 @@ -331,7 +331,7 @@ static int __init acpi_sleep_init(void)
    1.87          else
    1.88              sleep_states[i] = 0;
    1.89      }
    1.90 -    printk(")\n");
    1.91 +    printk("\n");
    1.92  
    1.93      return 0;
    1.94  }