[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Xen PM: Enter all ACPI S states on boot CPU.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1184924331 -3600 # Node ID ae672309bb95c2d9fb7d6898bbbfbc72ade0a811 # Parent bb5c23bbc7b7e233dc0db3834a73ee3e0f00d545 Xen PM: Enter all ACPI S states on boot CPU. Signed-off-by: Kevin Tian <kevin.tian@xxxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/arch/x86/acpi/power.c | 34 +++++++++++----------------------- 1 files changed, 11 insertions(+), 23 deletions(-) diff -r bb5c23bbc7b7 -r ae672309bb95 xen/arch/x86/acpi/power.c --- a/xen/arch/x86/acpi/power.c Fri Jul 20 09:38:27 2007 +0100 +++ b/xen/arch/x86/acpi/power.c Fri Jul 20 10:38:51 2007 +0100 @@ -124,7 +124,7 @@ static int enter_state(u32 state) if ( !spin_trylock(&pm_lock) ) return -EBUSY; - + pmprintk(XENLOG_INFO, "PM: Preparing system for %s sleep\n", acpi_states[state]); @@ -153,12 +153,15 @@ static int enter_state(u32 state) switch ( state ) { - case ACPI_STATE_S3: - do_suspend_lowlevel(); - break; - default: - error = -EINVAL; - break; + case ACPI_STATE_S3: + do_suspend_lowlevel(); + break; + case ACPI_STATE_S5: + acpi_enter_sleep_state(ACPI_STATE_S5); + break; + default: + error = -EINVAL; + break; } pmprintk(XENLOG_INFO, "Back to C!\n"); @@ -181,14 +184,6 @@ static int enter_state(u32 state) thaw_domains(); spin_unlock(&pm_lock); return error; -} - -static void acpi_power_off(void) -{ - pmprintk(XENLOG_INFO, "%s called\n", __FUNCTION__); - local_irq_disable(); - /* Some SMP machines only can poweroff in boot CPU */ - acpi_enter_sleep_state(ACPI_STATE_S5); } static long enter_state_helper(void *data) @@ -227,7 +222,7 @@ int acpi_enter_sleep(struct xenpf_enter_ if ( !(sleep->pm1a_cnt_val & ACPI_BITMASK_SLEEP_ENABLE) ) { outw((u16)sleep->pm1a_cnt_val, acpi_sinfo.pm1a_cnt); - if (acpi_sinfo.pm1b_cnt) + if ( acpi_sinfo.pm1b_cnt ) outw((u16)sleep->pm1b_cnt_val, acpi_sinfo.pm1b_cnt); return 0; } @@ -236,13 +231,6 @@ int acpi_enter_sleep(struct xenpf_enter_ acpi_sinfo.pm1a_cnt_val = sleep->pm1a_cnt_val; acpi_sinfo.pm1b_cnt_val = sleep->pm1b_cnt_val; acpi_sinfo.sleep_state = sleep->sleep_state; - - /* ACPI power-off method. */ - if ( acpi_sinfo.sleep_state == ACPI_STATE_S5 ) - { - for ( ; ; ) - acpi_power_off(); - } return continue_hypercall_on_cpu(0, enter_state_helper, &acpi_sinfo); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |